Skip to content

Commit

Permalink
Remove HDF5 hack (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
tridelat authored Dec 12, 2024
1 parent 43439c3 commit 9c3aa8e
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ else(HYDROCHRONO_ENABLE_IRRLICHT)
find_package(Chrono CONFIG REQUIRED)
endif(HYDROCHRONO_ENABLE_IRRLICHT)

find_package(HDF5 NAMES hdf5 COMPONENTS CXX ${SEARCH_TYPE})
set(HDF5_USE_STATIC_LIBRARIES ON)
find_package(HDF5 REQUIRED COMPONENTS CXX)


#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -113,11 +114,12 @@ target_include_directories(
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
${CHRONO_INCLUDE_DIRS}
${CHRONO_INCLUDE_DIRS}

PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/
${CMAKE_CURRENT_SOURCE_DIR}/include
${HDF5_INCLUDE_DIRS}
)

target_compile_definitions(HydroChrono
Expand All @@ -143,18 +145,11 @@ set_target_properties(HydroChrono
POSITION_INDEPENDENT_CODE ON
)

# temporary hack
# seems there is no namespace target hdf5:: on linux
# for HDF5 version 1.10 to 1.14 ?
if(NOT TARGET hdf5::hdf5_cpp-static)
add_library(hdf5::hdf5_cpp-static ALIAS hdf5_cpp-static)
endif()

target_link_libraries(HydroChrono
PUBLIC
${CHRONO_LIBRARIES}
PRIVATE
hdf5::hdf5_cpp-static
${HDF5_LIBRARIES}

)

Expand Down Expand Up @@ -183,9 +178,6 @@ target_include_directories(
${CHRONO_INCLUDE_DIRS}
)

if(HYDROCHRONO_ENABLE_IRRLICHT)
endif(HYDROCHRONO_ENABLE_IRRLICHT)

target_compile_options(HydroChronoGUI BEFORE
PUBLIC
${CHRONO_CXX_FLAGS}
Expand Down

0 comments on commit 9c3aa8e

Please sign in to comment.