mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-11 16:40:36 +08:00
Correct an issue where zip development files may not be immediately available.
This commit is contained in:
parent
b1d5e1fad3
commit
295096bacb
@ -681,7 +681,7 @@ else() # No option specified
|
||||
endif()
|
||||
|
||||
# Try to enable NCZarr zip support
|
||||
option(NETCDF_ENABLE_NCZARR_ZIP "Enable NCZarr ZIP support." ON)
|
||||
option(NETCDF_ENABLE_NCZARR_ZIP "Enable NCZarr ZIP support." ${NETCDF_ENABLE_NCZARR})
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
||||
|
@ -410,11 +410,16 @@ else()
|
||||
endif()
|
||||
set(STD_FILTERS ${STD_FILTERS} ${FOUND_STD_FILTERS})
|
||||
IF (NETCDF_ENABLE_NCZARR_ZIP)
|
||||
find_package(Zip REQUIRED)
|
||||
target_include_directories(netcdf
|
||||
PRIVATE
|
||||
find_package(Zip)
|
||||
if(Zip_FOUND)
|
||||
target_include_directories(netcdf
|
||||
PRIVATE
|
||||
${Zip_INCLUDE_DIRS}
|
||||
)
|
||||
)
|
||||
else()
|
||||
message(status "libzip development package not found, disabling NETCDF_ENABLE_NCZARR_ZIP")
|
||||
set(NETCDF_ENABLE_NCZARR_ZIP OFF CACHE BOOL "Enable NCZARR_ZIP functionality.")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
################################
|
||||
|
@ -43,6 +43,7 @@ S3 Support: @HAS_S3@
|
||||
S3 SDK: @WHICH_S3_SDK@
|
||||
|
||||
NCZarr Support: @HAS_NCZARR@
|
||||
NCZarr Zip Support: @HAS_NCZARR_ZIP@
|
||||
|
||||
Diskless Support: @HAS_DISKLESS@
|
||||
MMap Support: @HAS_MMAP@
|
||||
|
Loading…
Reference in New Issue
Block a user