Commit 9b4696c7 authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: Mantis-1457: another fix for a proper HDF5 detection

parent e368cd0b
......@@ -54,3 +54,10 @@ ExternalProject_Add(HDF5
LOG_BUILD 1
LOG_INSTALL 1
)
# this should not be needed but see Mantis-1457
if(UNIX)
set(_SB_HDF5_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
set(_SB_HDF5_C_LIBRARY ${SB_INSTALL_PREFIX}/lib/libhdf5${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_HDF5_HL_LIBRARY ${SB_INSTALL_PREFIX}/lib/libhdf5_hl${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
......@@ -25,8 +25,14 @@ SETUP_SUPERBUILD(NETCDF)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(NETCDF HDF5 ZLIB CURL HDF4 JPEG)
set(NETCDF_SB_CONFIG ${NETCDF_SB_CONFIG} -DHDF5_C_LIBRARY:PATH=${SB_INSTALL_PREFIX}/lib/libhdf5.so
-DHDF5_HL_LIBRARY:PATH=${SB_INSTALL_PREFIX}/lib/libhdf5_hl.so -DHDF5_INCLUDE_DIR:PATH=${SB_INSTALL_PREFIX}/include)
set(NETCDF_SB_CONFIG)
# this should not be needed but see Mantis-1457
if(UNIX)
ADD_SUPERBUILD_CMAKE_VAR(NETCDF HDF5_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(NETCDF HDF5_C_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(NETCDF HDF5_HL_LIBRARY)
endif()
ExternalProject_Add(NETCDF
PREFIX NETCDF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment