diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index 68536e5a8..bcd3407f7 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -828,7 +828,7 @@ MACRO(DD4HEP_SETUP_GEANT4_TARGETS) dd4hep_debug("Using Geant4 internal CLHEP") if(TARGET CLHEP::CLHEP) message(WARNING "CLHEP::CLHEP already exists, this may cause problems if there are two different installations of CLHEP, one from Geant4 and one external") - elseif(NOT TARGET CLHEP::CLHEP) + else() ADD_LIBRARY(CLHEP::CLHEP INTERFACE IMPORTED GLOBAL) endif() SET_TARGET_PROPERTIES(CLHEP::CLHEP