mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-12 18:10:24 +08:00
Different method for checking HDF5 version requirement
This method works for me when I have a local HDF5 build; the previous method seems to have issues comparing version numbers...
This commit is contained in:
parent
bfee002d77
commit
abe4d0107e
@ -134,8 +134,13 @@ if(USE_HDF5)
|
||||
#####
|
||||
# First, find the C and HL libraries.
|
||||
#####
|
||||
find_package(HDF5 ${HDF5_VERSION_REQUIRED} COMPONENTS C HL REQUIRED)
|
||||
find_package(HDF5 COMPONENTS C HL REQUIRED)
|
||||
|
||||
message(STATUS "Found HDF5 version: ${HDF5_VERSION}")
|
||||
if(${HDF5_VERSION} VERSION_LESS ${HDF5_VERSION_REQUIRED})
|
||||
message(FATAL_ERROR "NetCDF requires HDF5 version ${HDF5_VERSION_REQUIRED} or later; found version ${HDF5_VERSION}.")
|
||||
endif()
|
||||
|
||||
message(STATUS "Using HDF5 include dir: ${HDF5_INCLUDE_DIRS}")
|
||||
target_link_libraries(netcdf
|
||||
PRIVATE
|
||||
|
Loading…
x
Reference in New Issue
Block a user