diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 0e45a37b9a90a201982dad1e3dd2acec6ca38c87..940b0e41bd8f140f43b2c56547d33dafe90e6f7b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -41,7 +41,7 @@ dd4hep_configure_output() SET(DD4HEP_EXAMPLES "AlignDet CLICSiD ClientTests Conditions DDCMS DDCodex DDDB DDDigi DDG4 DDG4_MySensDet LHeD OpticalSurfaces Persistency SimpleDetector" CACHE STRING "List of DD4hep Examples to build") SEPARATE_ARGUMENTS(DD4HEP_EXAMPLES) -MESSAGE(STATUS "Will be building these examples: ${DD4HEP_BUILD_EXAMPLES}") +MESSAGE(STATUS "Will be building these examples: ${DD4HEP_EXAMPLES}") FOREACH(DDExample IN LISTS DD4HEP_EXAMPLES) dd4hep_print("|> Building ${DDExample}") diff --git a/examples/DDCMS/CMakeLists.txt b/examples/DDCMS/CMakeLists.txt index 0f61b7ad8fd3f47c8ddb0df2ebc28c04b462bb7f..5bb65f9dba08d43a98a6d7a8216ead8094567b98 100644 --- a/examples/DDCMS/CMakeLists.txt +++ b/examples/DDCMS/CMakeLists.txt @@ -22,20 +22,17 @@ IF(NOT TARGET DD4hep::DDCore) ENDIF() dd4hep_set_compiler_flags() +# #========================================================================== -set (Geant4_builtin_clhep_FOUND ON) -# Configure Geant4 +# Configure Geant4 to if we have a builtin CLHEP if(DD4HEP_USE_GEANT4) find_package( Geant4 REQUIRED ) - if(NOT Geant4_builtin_clhep_FOUND) - SET(DD4HEP_USE_CLHEP TRUE) - else() + if(Geant4_builtin_clhep_FOUND) include_directories(${Geant4_INCLUDE_DIRS}) + DD4HEP_SETUP_GEANT4_TARGETS() endif() - dd4hep_print("|++> Setup Geant4 targets.") - DD4HEP_SETUP_GEANT4_TARGETS() endif() - +# # CLHEP dependent stuff if(NOT TARGET CLHEP::CLHEP) # ensure we only look for CLHEP once