mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
Modified how CMake builds detect szip.
This commit is contained in:
parent
69b2124240
commit
6ca2170495
@ -452,7 +452,6 @@ IF(ENABLE_RPC)
|
||||
ENDIF()
|
||||
|
||||
# Option to Enable HDF5
|
||||
OPTION(USE_SZIP "Use SZip" OFF)
|
||||
OPTION(USE_HDF5 "Use HDF5." ${ENABLE_NETCDF_4})
|
||||
|
||||
IF(USE_HDF5 OR ENABLE_NETCDF_4)
|
||||
@ -563,9 +562,16 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
|
||||
ENDIF()
|
||||
|
||||
#Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip.
|
||||
CHECK_LIBRARY_EXISTS(hdf5 H5Z_SZIP "" USE_SZIP)
|
||||
IF(USE_SZIP)
|
||||
FIND_PACKAGE(SZIP NO_MODULE REQUIRED)
|
||||
INCLUDE_DIRECTORIES(${SZIP_INCLUDE_DIR})
|
||||
FIND_LIBRARY(SZIP NAMES szip sz)
|
||||
IF(SZIP)
|
||||
SET(SZIP_LIBRARY ${SZIP})
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "HDF5 Requires SZIP, but cannot find libszip or libsz.")
|
||||
ENDIF()
|
||||
#FIND_PACKAGE(SZIP NO_MODULE REQUIRED)
|
||||
#INCLUDE_DIRECTORIES(${SZIP_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(H5_USE_16_API 1)
|
||||
|
@ -28,6 +28,7 @@ NetCDF-2 API: @HAS_NC2@
|
||||
NetCDF-4 API: @HAS_NC4@
|
||||
HDF4 Support: @HAS_HDF4@
|
||||
HDF5 Support: @HAS_HDF5@
|
||||
HDF5/SZIP Support: @HAS_SZIP@
|
||||
PNetCDF Support: @HAS_PNETCDF@
|
||||
Parallel Support: @HAS_PARALLEL@
|
||||
DAP Support: @HAS_DAP@
|
||||
|
Loading…
Reference in New Issue
Block a user