Skip to content

Commit

Permalink
build: fix h5 link error
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Jan 9, 2025
1 parent 0b88da3 commit 5528a00
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,15 @@ link_directories(${libelf_LIBRARY_DIRS})
if(HERMES_ENABLE_VFD)
set(HERMES_REQUIRED_HDF5_VERSION 1.14.0)
set(HERMES_REQUIRED_HDF5_COMPONENTS C)
find_package(HDF5 ${HERMES_REQUIRED_HDF5_VERSION} CONFIG NAMES hdf5
COMPONENTS ${HERMES_REQUIRED_HDF5_COMPONENTS} shared)
find_package(HDF5 REQUIRED)
if(HDF5_FOUND)
message(STATUS "found HDF5 ${HDF5_VERSION} at ${HDF5_INCLUDE_DIR}")
set(HDF5_HERMES_VFD_EXT_INCLUDE_DEPENDENCIES
${HDF5_HERMES_VFD_EXT_INCLUDE_DEPENDENCIES}
${HDF5_INCLUDE_DIR})
set(HDF5_HERMES_VFD_EXT_LIB_DEPENDENCIES
${HDF5_HERMES_VFD_EXT_LIB_DEPENDENCIES}
${HDF5_C_SHARED_LIBRARY})
${HDF5_C_LIBRARIES})
else()
# Allow for HDF5 autotools builds
find_package(HDF5 ${HERMES_REQUIRED_HDF5_VERSION} MODULE REQUIRED
Expand Down

0 comments on commit 5528a00

Please sign in to comment.