More headache between discrepancies in CMake HDF5 variables. Updated to work on Windows as well as *nix.

This commit is contained in:
Ward Fisher 2017-02-16 13:00:07 -07:00
parent 9db19d75ec
commit f545023d0f

View File

@ -7,7 +7,7 @@
##################################
#Minimum required CMake Version
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required(VERSION 3.6.1)
#Project Name
project(netCDF C)
@ -619,7 +619,9 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
IF(${HDF5_VERSION} VERSION_GREATER "1.8.15")
IF(NOT HDF5_LIBRARIES AND HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY AND HDF5_HL_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY)
SET(HDF5_C_LIBRARY ${HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY})
SET(HDF5_C_LIBRARY_hdf5 ${HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY})
SET(HDF5_HL_LIBRARY ${HDF5_HL_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY})
SET(HDF5_LIBRARIES ${HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY} ${HDF5_HL_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY})
ENDIF()
ENDIF(${HDF5_VERSION} VERSION_GREATER "1.8.15")