diff --git a/cmake/DD4hep.cmake b/cmake/DD4hep.cmake index eb50838ae8d70b5c9d4fdff7fcddbc40a559d198..454ef5108a7f9cc6d7375e44f2f4949cb48211dc 100644 --- a/cmake/DD4hep.cmake +++ b/cmake/DD4hep.cmake @@ -34,7 +34,7 @@ endfunction() # calls all the function/includes/configurations that are needed to be done to create dd4hep plugins #--------------------------------------------------------------------------------------------------- function ( dd4hep_instantiate_package PackageName ) - MESSAGE (STATUS "instantiating the dd4hep package ${PackageName}" ) + MESSAGE (STATUS "Instantiating the DD4hep package ${PackageName}" ) IF ( NOT ${DD4hep_FOUND} ) MESSAGE ( FATAL "DD4HEP was not found" ) diff --git a/cmake/DD4hepConfig.cmake.in b/cmake/DD4hepConfig.cmake.in index aae9b77b796d80b2c3fe392a1889a9f16f917b98..405eb343ba8d144a3fb5178bcd3d7e2d8396d221 100644 --- a/cmake/DD4hepConfig.cmake.in +++ b/cmake/DD4hepConfig.cmake.in @@ -50,19 +50,30 @@ INCLUDE( ${DD4hep_ROOT}/cmake/DD4hepMacros.cmake ) # additional components are set by cmake in variable PKG_FIND_COMPONENTS # first argument should be the package name if(@DD4HEP_USE_GEANT4@) - CHECK_PACKAGE_LIBS(DD4hep DDCore DDSegmentation DDRec DDG4) - #--- if geant 4 was built with CLHEP we need to export this to client packages if( @GEANT4_USE_CLHEP@) set(GEANT4_USE_CLHEP 1 ) endif() - set( Geant4_DIR @Geant4_DIR@) + set(Geant4_DIR @Geant4_DIR@) -else() - CHECK_PACKAGE_LIBS(DD4hep DDCore DDSegmentation DDRec) endif() +CHECK_PACKAGE_LIBS(DD4hep DDCore) + +IF(DD4hep_FIND_COMPONENTS) + MESSAGE( STATUS "Looking for these Components ${DD4hep_FIND_COMPONENTS}" ) + + FOREACH(comp ${DD4hep_FIND_COMPONENTS}) + #CHECK_PACKAGE_LIBS is looking for components too, just need to check if they were found, if requested + STRING( TOUPPER ${comp} _ulibname ) + if(NOT DD4hep_${_ulibname}_FOUND) + MESSAGE(FATAL_ERROR "Did not find required component: ${comp}") + ENDIF() + ENDFOREACH() +ENDIF() + + ##---- build with Boost ? #if(@DD4HEP_USE_BOOST@) diff --git a/doc/release.notes b/doc/release.notes index 0ceb8da0fc9ca0d75f225f204e4529ffa51b88de..5f77a38b4181396e36fd0de8d5de7df049feec14 100644 --- a/doc/release.notes +++ b/doc/release.notes @@ -4,6 +4,15 @@ DD4hep ---- Release Notes ================================= +2015/05/11 Andre Sailer +----------------------- + - CMake updates: + - Split libraries into components: use find_package(DD4hep COMPONENTS <component> [...] ) + to find the components you need. + - At the moment there are these components are sensible to link against: DDRec, DDG4, DDEve, DDSegmentation + - To link against the librarie use either DD4hep_COMPONENT_LIBRARIES or DD4hep_<COMPONENT>_LIBRARY, + where <COMPONENT> needs to be replaced by the UPPER case name of the component + 2015/05/09 Markus Frank ----------------------- - Allow to access detectors by type from lcdd.