diff --git a/CMakeLists.txt b/CMakeLists.txt index f726a0a..1dbcdc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,7 +140,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() @@ -162,7 +163,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.") @@ -177,7 +177,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 ceb27b8..36c5777 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