Skip to content

Commit

Permalink
fixup: use hdf5 library if available
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Sep 16, 2024
1 parent ebca449 commit 0aa9785
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ if(Cabana_ENABLE_SILO)
endif()

if(Cabana_ENABLE_HDF5)
# FIXME: replace with HDF5::HDF5 when requiring newer CMake
target_link_libraries(Core INTERFACE ${HDF5_LIBRARIES})
# FIXME: remove when requiring newer CMake
if(CMAKE_VERSION VERSION_LESS 3.26)
target_link_libraries(Core INTERFACE ${HDF5_LIBRARIES})
else()
target_link_libraries(Core INTERFACE HDF5::HDF5)
endif()
endif()

if(Cabana_ENABLE_MPI)
Expand Down

0 comments on commit 0aa9785

Please sign in to comment.