diff --git a/external/external_build.cmake b/external/external_build.cmake index ae8242a..aa3eab2 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -86,7 +86,10 @@ else (INTERNAL_HDF5) if(HDF5_ROOTDIR) SET(ENV{HDF5_ROOT} ${HDF5_ROOTDIR}) endif(HDF5_ROOTDIR) - find_package(HDF5 COMPONENTS C CXX HL) + find_package(HDF5 COMPONENTS C CXX HL static) + 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) endif (INTERNAL_HDF5) foreach(include_dir ${HDF5_INCLUDE_DIR})