diff --git a/CMakeLists.txt b/CMakeLists.txt index 009a3a5f8..da6c85ddd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -232,7 +232,14 @@ IF (USE_HDF5 OR ENABLE_NETCDF_4) SET(USE_HDF5 ON) SET(USE_NETCDF4 ON) - FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) + #FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) + FIND_LIBRARY(HDF5_LIB NAMES hdf5 libhdf5 hdf5dll) + FIND_LIBRARY(HDF5_HL_LIB NAMES hdf5_hl libhdf5_hl hdf5_hldll) + + SET(HDF5_LIBRARIES ${HDF5_LIB} ${HDF5_HL_LIB}) + FIND_PATH(HDF5_INCLUDE_DIR H5public.h) + + MESSAGE(STATUS "${HDF5_LIB}, ${HDF5_HL_LIB}, ${HDF5_INCLUDE_DIR}") INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR})