From bf7104f53f1cdf8f0e4a3879d8103f1ad1e7e3db Mon Sep 17 00:00:00 2001 From: Frank Gaede <frank.gaede@desy.de> Date: Thu, 30 Jul 2015 16:36:55 +0000 Subject: [PATCH] - fixed new cmake build scripts (Markus) --- DDG4/CMakeLists.txt | 2 +- DDRec/CMakeLists.txt | 4 ++++ cmake/DD4hepBuild.cmake | 9 +++++++-- examples/CMakeLists.txt | 3 ++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt index bcf919f48..49a6884dd 100644 --- a/DDG4/CMakeLists.txt +++ b/DDG4/CMakeLists.txt @@ -11,7 +11,7 @@ #========================================================================== dd4hep_package( DDG4 USES [GEANT4 REQUIRED COMPONENTS gdml ui_all vis_all] - DDCore + BOOST DDCore OPTIONAL CLHEP [XercesC QUIET] INCLUDE_DIRS include INSTALL_INCLUDES include/DDG4) diff --git a/DDRec/CMakeLists.txt b/DDRec/CMakeLists.txt index 0a8daffd0..99390e5a6 100644 --- a/DDRec/CMakeLists.txt +++ b/DDRec/CMakeLists.txt @@ -17,6 +17,10 @@ dd4hep_package(DDRec INSTALL_INCLUDES include/DDRec) #---Add Library------------------------------------------------------------- +if(DD4HEP_USE_GEAR) + add_definitions("-D DD4HEP_USE_GEAR") +endif() + dd4hep_add_package_library(DDRec SOURCES src/*.cpp OPTIONAL [GEAR COMPONENTS geartgeo SOURCES src/gear/DDGear.cpp DEFINITIONS DD4HEP_USE_GEAR ] diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index a5a02ee02..27e256b8d 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -229,10 +229,10 @@ function ( dd4hep_find_packageEx PKG_NAME ) # Propagate values to caller string ( TOUPPER "${pkg}" PKG ) if ( "${pkg}" STREQUAL "${PKG}" ) - set ( libs ${${PKG}_LIBRARIES} ${${pkg}_LIBRARY} ${${pkg}_LIBRARIES} ) + set ( libs ${${PKG}_LIBRARIES} ${${pkg}_LIBRARY} ${${pkg}_LIBRARIES} ${${pkg}_COMPONENT_LIBRARIES} ) set ( incs ${${PKG}_INCLUDE_DIRS} ${${pkg}_INCLUDE_DIR} ${${pkg}_INCLUDE_DIRS} ) else() - set ( libs ${${PKG}_LIBRARIES} ${${pkg}_LIBRARY} ${${pkg}_LIBRARIES} ${${PKG}_LIBRARY} ${${PKG}_LIBRARIES} ) + set ( libs ${${PKG}_LIBRARIES} ${${pkg}_LIBRARY} ${${pkg}_LIBRARIES} ${${PKG}_LIBRARY} ${${PKG}_LIBRARIES} ${${pkg}_COMPONENT_LIBRARIES} ${${PKG}_COMPONENT_LIBRARIES}) set ( incs ${${PKG}_INCLUDE_DIRS} ${${pkg}_INCLUDE_DIR} ${${pkg}_INCLUDE_DIRS} ${${PKG}_INCLUDE_DIR} ${${PKG}_INCLUDE_DIRS} ) endif() dd4hep_make_unique_list ( libs VALUES ${libs} ) @@ -956,6 +956,11 @@ function ( dd4hep_add_executable binary ) dd4hep_debug ( "${tag} Executable optional: ${ARG_OPTIONAL}" ) # get_property ( pkg_library GLOBAL PROPERTY ${pkg}_LIBRARIES ) + message (STATUS "${tag} ---> package ${pkg}_LIBRARIES libraries ${pkg_library} " ) + + string ( TOUPPER "${pkg}" PKG ) + get_property ( pkg_library GLOBAL PROPERTY ${PKG}_LIBRARIES ) + message (STATUS "${tag} ---> package ${PKG}_LIBRARIES libraries ${pkg_library} " ) # # Sources may also be supplied without argument tag: # diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 31e3bd371..7f35cae3d 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -29,5 +29,6 @@ include ( ${DD4hep_DIR}/cmake/DD4hep.cmake ) dd4hep_package ( DD4hepExample MAJOR 0 MINOR 0 PATCH 1 ) # dd4hep_enable_tests ( - AlignDet CLICSiD ClientTests SimpleDetector + AlignDet CLICSiD ClientTests ) +#SimpleDetector -- GitLab