diff --git a/CMakeLists.txt b/CMakeLists.txt index 54d4817..2ba937d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,7 +134,8 @@ include(GNUInstallDirs) if(NOT DEACTIVATE_LZ4) if(PREFER_EXTERNAL_LZ4) - find_package(LZ4) + find_package(lz4 REQUIRED CONFIG) + set(LZ4_FOUND TRUE) else() message(STATUS "Using LZ4 internal sources.") endif() @@ -156,7 +157,6 @@ endif() if(NOT DEACTIVATE_ZLIB) # import the ZLIB_ROOT environment variable to help finding the zlib library if(PREFER_EXTERNAL_ZLIB) - set(ZLIB_ROOT $ENV{ZLIB_ROOT}) find_package(ZLIB) if(NOT ZLIB_FOUND ) message(STATUS "No zlib found. Using internal sources.") @@ -171,7 +171,7 @@ endif() if(NOT DEACTIVATE_ZSTD) if(PREFER_EXTERNAL_ZSTD) - find_package(Zstd) + find_package(zstd REQUIRED CONFIG) else() message(STATUS "Using ZSTD internal sources.") endif() diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt index fd6d695..8ef909d 100644 --- a/blosc/CMakeLists.txt +++ b/blosc/CMakeLists.txt @@ -88,7 +88,7 @@ endif(WIN32) if(NOT DEACTIVATE_LZ4) if(LZ4_FOUND) - set(LIBS ${LIBS} ${LZ4_LIBRARY}) + set(LIBS ${LIBS} $,LZ4::lz4_shared,LZ4::lz4_static>) else(LZ4_FOUND) file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) set(SOURCES ${SOURCES} ${LZ4_FILES}) @@ -98,7 +98,7 @@ endif(NOT DEACTIVATE_LZ4) if(NOT DEACTIVATE_SNAPPY) if(SNAPPY_FOUND) - set(LIBS ${LIBS} ${SNAPPY_LIBRARY}) + set(LIBS ${LIBS} "Snappy::snappy") else(SNAPPY_FOUND) file(GLOB SNAPPY_FILES ${SNAPPY_LOCAL_DIR}/*.cc) set(SOURCES ${SOURCES} ${SNAPPY_FILES}) @@ -108,7 +108,7 @@ endif(NOT DEACTIVATE_SNAPPY) if(NOT DEACTIVATE_ZLIB) if(ZLIB_FOUND) - set(LIBS ${LIBS} ${ZLIB_LIBRARY}) + set(LIBS ${LIBS} "ZLIB::ZLIB") else(ZLIB_FOUND) file(GLOB ZLIB_FILES ${ZLIB_LOCAL_DIR}/*.c) set(SOURCES ${SOURCES} ${ZLIB_FILES}) @@ -118,7 +118,7 @@ endif(NOT DEACTIVATE_ZLIB) if (NOT DEACTIVATE_ZSTD) if (ZSTD_FOUND) - set(LIBS ${LIBS} ${ZSTD_LIBRARY}) + set(LIBS ${LIBS} $,zstd::libzstd_shared,zstd::libzstd_static>) else (ZSTD_FOUND) # Enable assembly code only when not using MSVC *and* x86 is there if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform