From 2da555a2d5dfaaac578b4e8e6e28585391c6604d Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Mon, 22 Feb 2016 10:54:37 -0700 Subject: [PATCH] Fix setting of HDF5 include directory path when explicitly specified The HDF5 include directory needs to be updated when explicitly setting the HDF5 libraries and include path. This is done on line 561 when FindPackage finds the hdf5 libraries, but was not being done in the manual setting. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2639cfb89..5aabbf1a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -495,6 +495,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) SET(HDF5_LIBRARIES ${HDF5_C_LIBRARY} ${HDF5_HL_LIBRARY}) SET(HDF5_C_LIBRARIES ${HDF5_C_LIBRARY}) SET(HDF5_HL_LIBRARIES ${HDF5_HL_LIBRARY}) + INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR}) MESSAGE(STATUS "Using HDF5 C Library: ${HDF5_C_LIBRARY}") MESSAGE(STATUS "Using HDF5 HL LIbrary: ${HDF5_HL_LIBRARY}") ELSE(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR) # We are seeking out HDF5 with Find Package.