Skip to content

Commit

Permalink
[CMake] add HDF5 as target_include_dir for libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Feb 4, 2025
1 parent a0ab178 commit 2872adb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/buildblock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ if (LLN_FOUND)
target_link_libraries(buildblock PUBLIC ${LLN_LIBRARIES})
endif()

if (RDF_FOUND)
# TODO cannot do this as it creates circular dependencies
# target_link_libraries(buildblock PUBLIC local_IO_GE)
# TODO Remove but currently needed for ProjDataGEHDF5
if (HAVE_HDF5)
target_include_directories(buildblock PUBLIC ${HDF5_INCLUDE_DIRS})
endif()

# TODO currently needed as filters need fourier
Expand Down
5 changes: 5 additions & 0 deletions src/data_buildblock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ endif()
include(stir_lib_target)

target_link_libraries(${dir} PUBLIC buildblock)

if (HAVE_HDF5)
# for GEHDF5
target_include_directories(data_buildblock PUBLIC ${HDF5_INCLUDE_DIRS})
endif()
5 changes: 5 additions & 0 deletions src/recon_buildblock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ if (STIR_WITH_Parallelproj_PROJECTOR)
endif()
endif()

if (HAVE_HDF5)
# for GEHDF5
target_include_directories(recon_buildblock PUBLIC ${HDF5_INCLUDE_DIRS})
endif()

if (STIR_WITH_CUDA)
target_link_libraries(recon_buildblock PRIVATE CUDA::cudart)
endif()

0 comments on commit 2872adb

Please sign in to comment.