mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-13 17:18:08 +08:00
Merge pull request #2116 from gsjaardema/patch-48
Make sure HDF5_C_LIBRARY and HDF5_HL_LIBRARY set
This commit is contained in:
commit
69ff6fbe78
@ -745,6 +745,11 @@ IF(USE_HDF5)
|
||||
# HDF5_C_LIBRARY, HDF5_HL_LIBRARY and HDF5_LIBRARIES.
|
||||
###
|
||||
IF(MSVC)
|
||||
####
|
||||
# Environmental variables in Windows when using MSVC
|
||||
# are a hot mess between versions.
|
||||
####
|
||||
|
||||
##
|
||||
# HDF5 1.8.15 defined HDF5_LIBRARIES.
|
||||
##
|
||||
@ -764,16 +769,23 @@ IF(USE_HDF5)
|
||||
ENDIF(${HDF5_VERSION} VERSION_GREATER "1.8.15")
|
||||
|
||||
ELSE(MSVC)
|
||||
####
|
||||
# Environmental variables in Windows when using MSVC
|
||||
# are a hot mess between versions.
|
||||
####
|
||||
|
||||
|
||||
# Depending on the install, either HDF5_hdf_library or
|
||||
# HDF5_C_LIBRARIES may be defined. We must check for either.
|
||||
IF(HDF5_C_LIBRARIES AND NOT HDF5_hdf5_LIBRARY)
|
||||
SET(HDF5_hdf5_LIBRARY ${HDF5_C_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
# Some versions of FIND_PACKAGE set HDF5_C_LIBRARIES, but not HDF5_C_LIBRARY
|
||||
# We use HDF5_C_LIBRARY below, so need to make sure it is set.
|
||||
IF(HDF5_C_LIBRARIES AND NOT HDF5_C_LIBRARY)
|
||||
SET(HDF5_C_LIBRARY ${HDF5_C_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
# Same issue as above...
|
||||
IF(HDF5_HL_LIBRARIES AND NOT HDF5_HL_LIBRARY)
|
||||
SET(HDF5_HL_LIBRARY ${HDF5_HL_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
ENDIF(MSVC)
|
||||
IF(NOT HDF5_C_LIBRARY)
|
||||
|
Loading…
x
Reference in New Issue
Block a user