Merge branch 'cmake-hdf5-variable-names' of https://github.com/nschloe/netcdf-c into nschloe-cmake-hdf5-variable-names

This commit is contained in:
Ward Fisher 2014-10-15 15:24:37 -06:00
commit d9ae7dff7a
2 changed files with 11 additions and 11 deletions

View File

@ -407,8 +407,8 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
# specify HDF5_HL_LIB, HDF5_LIB, HDF5_INCLUDE_DIR manually.
IF(HDF5_LIB AND HDF5_HL_LIB AND HDF5_INCLUDE_DIR)
SET(HDF5_LIBRARIES ${HDF5_LIB} ${HDF5_HL_LIB})
SET(HDF5_C_LIBRARY ${HDF5_LIB})
SET(HDF5_HL_LIBRARY ${HDF5_HL_LIB})
SET(HDF5_C_LIBRARIES ${HDF5_LIB})
SET(HDF5_HL_LIBRARIES ${HDF5_HL_LIB})
MESSAGE(STATUS "Using HDF5 Library: ${HDF5_LIB}")
MESSAGE(STATUS "Using HDF5_HL LIbrary: ${HDF5_HL_LIB}")
ELSE()
@ -426,9 +426,9 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
IF(NOT MSVC)
# Depending on the install, either HDF5_hdf_library or
# HDF5_C_LIBRARY may be defined. We must check for either.
IF(HDF5_C_LIBRARY)
SET(HDF5_hdf5_LIBRARY ${HDF5_C_LIBRARY})
# HDF5_C_LIBRARIES may be defined. We must check for either.
IF(HDF5_C_LIBRARIES)
SET(HDF5_hdf5_LIBRARY ${HDF5_C_LIBRARIES})
ENDIF()
# Find out if HDF5 was built with parallel support.

View File

@ -49,18 +49,18 @@ ENDIF()
IF(USE_HDF5 OR USE_NETCDF4)
IF(NOT MSVC)
# Some version of cmake define HDF5_hdf5_LIBRARY instead of
# HDF5_LIBRARY. Same with HDF5_HL_LIBRARY
IF(HDF5_hdf5_LIBRARY AND NOT HDF5_C_LIBRARY)
SET(HDF5_C_LIBRARY ${HDF5_hdf5_LIBRARY})
# HDF5_LIBRARY. Same with HDF5_HL_LIBRARIES
IF(HDF5_hdf5_LIBRARY AND NOT HDF5_C_LIBRARIES)
SET(HDF5_C_LIBRARIES ${HDF5_hdf5_LIBRARY})
ENDIF()
IF(HDF5_hdf5_hl_LIBRARY AND NOT HDF5_HL_LIBRARY)
SET(HDF5_HL_LIBRARY ${HDF5_hdf5_hl_LIBRARY})
IF(HDF5_hdf5_hl_LIBRARY AND NOT HDF5_HL_LIBRARIES)
SET(HDF5_HL_LIBRARIES ${HDF5_hdf5_hl_LIBRARY})
ENDIF()
# The order of the libraries is important here for static
# builds:
# Make sure that HDF5_C_LIBRARY appears *after*
# HDF5_HL_LIBRARY.
SET(TLL_LIBS ${HDF5_HL_LIBRARY} ${HDF5_C_LIBRARY} ${TLL_LIBS} ${SZIP_LIBRARY})
SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY})
ELSE() # Windows CMake defines HDF5_LIBRARIES.
SET(TLL_LIBS ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY})
ENDIF()