From 1327ab6915f6238b9d4a6b28b3a98d91e467b7c0 Mon Sep 17 00:00:00 2001 From: Manuel Reis Date: Thu, 10 Oct 2024 14:30:29 +0200 Subject: [PATCH 1/2] cmake - when building libnczarr, include zip.h if NETCDF_ENABLE_NCZARR_ZIP=ON --- libnczarr/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libnczarr/CMakeLists.txt b/libnczarr/CMakeLists.txt index 820a142e6..2d88fc245 100644 --- a/libnczarr/CMakeLists.txt +++ b/libnczarr/CMakeLists.txt @@ -65,6 +65,10 @@ if (USE_HDF5) target_link_libraries(nczarr PRIVATE HDF5::HDF5) endif(USE_HDF5) +if(NETCDF_ENABLE_NCZARR_ZIP) + target_include_directories(nczarr PRIVATE ${Zip_INCLUDE_DIRS}) +endif(NETCDF_ENABLE_NCZARR_ZIP) + if(STATUS_PARALLEL) target_link_libraries(nczarr PUBLIC MPI::MPI_C) endif(STATUS_PARALLEL) From 2d052a27b48110055f3587fb86e993c9ddb81725 Mon Sep 17 00:00:00 2001 From: Manuel Reis Date: Thu, 10 Oct 2024 18:20:24 +0200 Subject: [PATCH 2/2] Extend library filter library lookup to lib64/ --- cmake/modules/FindBlosc.cmake | 9 +++------ cmake/modules/FindSzip.cmake | 8 ++------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/cmake/modules/FindBlosc.cmake b/cmake/modules/FindBlosc.cmake index da280a810..40d470c3a 100644 --- a/cmake/modules/FindBlosc.cmake +++ b/cmake/modules/FindBlosc.cmake @@ -26,17 +26,14 @@ IF(Blosc_INCLUDE_DIRS) GET_FILENAME_COMPONENT(Blosc_LIBRARY_DIRS ${Blosc_LIBRARY_DIRS} PATH) ENDIF("${Blosc_LIBRARY_DIRS}" MATCHES "/include$") - IF(EXISTS "${Blosc_LIBRARY_DIRS}/lib") - SET(Blosc_LIBRARY_DIRS ${Blosc_LIBRARY_DIRS}/lib) - ENDIF(EXISTS "${Blosc_LIBRARY_DIRS}/lib") - # Find Blosc libraries FIND_LIBRARY(Blosc_DEBUG_LIBRARY NAMES bloscd blosc_d libbloscd libblosc_d libblosc PATH_SUFFIXES Debug ${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_ARCHITECTURE}/Debug - PATHS ${Blosc_LIBRARY_DIRS} NO_DEFAULT_PATH) + PATHS ${Blosc_LIBRARY_DIRS} ${Blosc_LIBRARY_DIRS}/lib ${Blosc_LIBRARY_DIRS}/lib64 NO_DEFAULT_PATH) FIND_LIBRARY(Blosc_RELEASE_LIBRARY NAMES blosc libblosc PATH_SUFFIXES Release ${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_ARCHITECTURE}/Release - PATHS ${Blosc_LIBRARY_DIRS} NO_DEFAULT_PATH) + PATHS ${Blosc_LIBRARY_DIRS} ${Blosc_LIBRARY_DIRS}/lib ${Blosc_LIBRARY_DIRS}/lib64 NO_DEFAULT_PATH) + SET(Blosc_LIBRARIES ) IF(Blosc_DEBUG_LIBRARY AND Blosc_RELEASE_LIBRARY) diff --git a/cmake/modules/FindSzip.cmake b/cmake/modules/FindSzip.cmake index c6f56f5bf..2ede6287f 100644 --- a/cmake/modules/FindSzip.cmake +++ b/cmake/modules/FindSzip.cmake @@ -29,17 +29,13 @@ IF(Szip_INCLUDE_DIRS) GET_FILENAME_COMPONENT(Szip_LIBRARY_DIRS ${Szip_LIBRARY_DIRS} PATH) ENDIF("${Szip_LIBRARY_DIRS}" MATCHES "/include$") - IF(EXISTS "${Szip_LIBRARY_DIRS}/lib") - SET(Szip_LIBRARY_DIRS ${Szip_LIBRARY_DIRS}/lib) - ENDIF(EXISTS "${Szip_LIBRARY_DIRS}/lib") - # Find Szip libraries FIND_LIBRARY(Szip_DEBUG_LIBRARY NAMES szipd szip_d libszipd libszip_d szip libszip sz2 libsz2 PATH_SUFFIXES Debug ${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_ARCHITECTURE}/Debug - PATHS ${Szip_LIBRARY_DIRS} NO_DEFAULT_PATH) + PATHS ${Szip_LIBRARY_DIRS} ${Szip_LIBRARY_DIRS}/lib ${Szip_LIBRARY_DIRS}/lib64 NO_DEFAULT_PATH) FIND_LIBRARY(Szip_RELEASE_LIBRARY NAMES szip libszip sz libsz sz2 libsz2 PATH_SUFFIXES Release ${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_ARCHITECTURE}/Release - PATHS ${Szip_LIBRARY_DIRS} NO_DEFAULT_PATH) + PATHS ${Szip_LIBRARY_DIRS} ${Szip_LIBRARY_DIRS}/lib ${Szip_LIBRARY_DIRS}/lib64 NO_DEFAULT_PATH) SET(Szip_LIBRARIES) SET(Szip_LIBRARY)