Fix external dependencies building instructions

This commit is contained in:
Guilhem Lavaux 2017-05-13 17:29:35 +02:00
parent 835ba96fa2
commit 23a8b07229

View File

@ -27,7 +27,7 @@ CHECK_CHANGE_STATE(INTERNAL_BOOST Boost_LIBRARIES Boost_INCLUDE_DIRS)
CHECK_CHANGE_STATE(INTERNAL_EIGEN EIGEN3_INCLUDE_DIRS)
CHECK_CHANGE_STATE(INTERNAL_GSL GSL_LIBRARY GSL_CBLAS_LIBRARY GSL_INCLUDE)
CHECK_CHANGE_STATE(INTERNAL_HDF5
HDF5_INCLUDE_DIR HDF5_LIBRARIES HDF5_CXX_LIBRARIES HDF5_DIR
HDF5_INCLUDE_DIR HDF5_LIBRARIES HDF5_CXX_LIBRARIES
HDF5_C_STATIC_LIBRARY HDF5_HL_STATIC_LIBRARY HDF5_CXX_STATIC_LIBRARY)
CHECK_CHANGE_STATE(INTERNAL_DLIB DLIB_INCLUDE_DIR DLIB_LIBRARIES)
@ -105,15 +105,18 @@ else (INTERNAL_HDF5)
if(HDF5_ROOTDIR)
SET(ENV{HDF5_ROOT} ${HDF5_ROOTDIR})
endif(HDF5_ROOTDIR)
find_package(HDF5 COMPONENTS C CXX HL CONFIG QUIET)
find_package(HDF5 CONFIG QUIET COMPONENTS C CXX HL static)
if (NOT HDF5_FOUND)
cmessage(CWARNING "Could not find HDF5 cmake config. Try classical exploration")
find_package(HDF5 COMPONENTS C CXX HL)
cmessage(STATUS "HDF5 lib: ${HDF5_LIBRARIES}")
cmessage(STATUS "HDF5 includes: ${HDF5_INCLUDE_DIRS}")
get_filename_component(HDF5_BIN_DIR ${HDF5_C_LIBRARY_hdf5} DIRECTORY)
cmessage(STATUS "HDF5 C lib: ${HDF5_C_LIBRARY}")
get_filename_component(HDF5_BIN_DIR ${HDF5_C_LIBRARY} DIRECTORY)
cmessage(STATUS "HDF5 libpath: ${HDF5_BIN_DIR}")
else()
cmessage(STATUS "Found HDF5 cmake config.")
cmessage(STATUS "HDF5_C_STATIC_LIBRARY : ${HDF5_C_STATIC_LIBRARY}")
set(HDF5_LIBRARIES ${HDF5_C_STATIC_LIBRARY} CACHE STRING "HDF5 lib" FORCE)
set(HDF5_HL_LIBRARIES ${HDF5_HL_STATIC_LIBRARY} CACHE STRING "HDF5 HL lib" FORCE)
set(HDF5_CXX_LIBRARIES ${HDF5_CXX_STATIC_LIBRARY} CACHE STRING "HDF5 C++ lib" FORCE)
@ -284,6 +287,8 @@ IF (INTERNAL_EIGEN)
URL_HASH SHA256=04f8a4fa4afedaae721c1a1c756afeea20d3cdef0ce3293982cf1c518f178502
PREFIX ${BUILD_PREFIX}/eigen-prefix
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXT_INSTALL}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
)
SET(EIGEN3_INCLUDE_DIRS ${EXT_INSTALL}/include/eigen3)