Skip to content

Commit

Permalink
CMake: fix using Geant4 internal clhep
Browse files Browse the repository at this point in the history
the target is now(?) prefixed with Geant4:: otherwise we get a linking error
  • Loading branch information
andresailer committed Nov 19, 2024
1 parent a39add6 commit 6310217
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/DD4hepBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,11 @@ MACRO(DD4HEP_SETUP_GEANT4_TARGETS)
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Geant4_INCLUDE_DIRS}"
)
TARGET_LINK_LIBRARIES(CLHEP::CLHEP INTERFACE G4clhep)
if(TARGET Geant4::G4clhep)
TARGET_LINK_LIBRARIES(CLHEP::CLHEP INTERFACE Geant4::G4clhep)
else()
TARGET_LINK_LIBRARIES(CLHEP::CLHEP INTERFACE G4clhep)
endif()

else()
IF(NOT TARGET CLHEP::CLHEP)
Expand Down

0 comments on commit 6310217

Please sign in to comment.