diff --git a/DDAlign/CMakeLists.txt b/DDAlign/CMakeLists.txt index cb2f8bf4574aee3688d1de9359b2ba8f80877181..5ed61510eaae9a2aad9716d51f6ab16e3e6c025a 100644 --- a/DDAlign/CMakeLists.txt +++ b/DDAlign/CMakeLists.txt @@ -11,7 +11,7 @@ file(GLOB DDAlign_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) -add_library(DDAlign SHARED ${DDAlign_SOURCES} ) +add_library(DDAlign SHARED ${DDAlign_SOURCES}) target_include_directories(DDAlign PUBLIC @@ -29,6 +29,8 @@ new_dd4hep_add_plugin(DDAlignPlugins LINK_LIBRARIES DDAlign ) + +set_target_properties(DDAlign DDAlignPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) + INSTALL(DIRECTORY include/DDAlign DESTINATION include) -INSTALL(TARGETS DDAlign EXPORT DD4hep DESTINATION lib) -INSTALL(TARGETS DDAlignPlugins DESTINATION lib) +INSTALL(TARGETS DDAlign DDAlignPlugins EXPORT DD4hep DESTINATION lib) diff --git a/DDCond/CMakeLists.txt b/DDCond/CMakeLists.txt index 10b9a38734f065265f39aa8ee54185f8afd16f81..cb1e1f6c85cf341998fa81db0bdd04d7a253764f 100644 --- a/DDCond/CMakeLists.txt +++ b/DDCond/CMakeLists.txt @@ -11,7 +11,7 @@ #---Generate ROOT dictionary----------------------------------------------------- #find_package (ROOT 6.08 REQUIRED COMPONENTS Geom GenVector Eve Gui Graf3d RGL EG) # COMPONENTS Geom GenVector Eve Gui Graf3d RGL EG -new_dd4hep_add_dictionary( G__DDCond +new_dd4hep_add_dictionary(G__DDCond SOURCES src/ConditionsDictionary.h DEPENDS DDCore DDParsers ) @@ -39,6 +39,8 @@ new_dd4hep_add_plugin(DDCondPlugins SOURCES src/plugins/*.cpp src/Type1/*.cpp LINK_LIBRARIES DDCond) + +set_target_properties(DDCond DDCondPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) + INSTALL(DIRECTORY include/DDCond DESTINATION include) -INSTALL(TARGETS DDCond EXPORT DD4hep DESTINATION lib) -INSTALL(TARGETS DDCondPlugins DESTINATION lib) +INSTALL(TARGETS DDCond DDCondPlugins EXPORT DD4hep DESTINATION lib) diff --git a/DDCore/CMakeLists.txt b/DDCore/CMakeLists.txt index b862ed3a9200e151ef4118e8acd8e53587c8830c..55dd3cedb7289ef2ada98e3074f329b454a46148 100644 --- a/DDCore/CMakeLists.txt +++ b/DDCore/CMakeLists.txt @@ -78,10 +78,13 @@ target_link_libraries(DDCore ${XML_LIBRARIES} # XercesC or not ) -TARGET_COMPILE_FEATURES(DDCore - PUBLIC cxx_alignof - #cxx_std_${CMAKE_CXX_STANDARD} # Needs cmake 3.8 - ) +if(${CMAKE_VERSION} VERSION_GREATER 3.7.99) + target_compile_features(DDCore + PUBLIC + cxx_std_${CMAKE_CXX_STANDARD} # Needs cmake 3.8 + ) +endif() + # # Generate DDCore plugins--------------------------------------------------------- new_dd4hep_add_plugin(DDCorePlugins SOURCES src/plugins/*.cpp @@ -90,9 +93,11 @@ new_dd4hep_add_plugin(DDCorePlugins SOURCES src/plugins/*.cpp # This plugins depends on the ROOT GDML readers. Hence, extra library IF(TARGET ROOT::Gdml) new_dd4hep_add_plugin(DDGDMLPlugins - SOURCES src/gdml/*.cpp - LINK_LIBRARIES DDCore ROOT::Core ROOT::Gdml - ) + SOURCES src/gdml/*.cpp + LINK_LIBRARIES DDCore ROOT::Core ROOT::Gdml + ) + set_target_properties(DDGDMLPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) + install(TARGETS DDGDMLPlugins EXPORT DD4hep LIBRARY DESTINATION lib) ELSE() MESSAGE(WARN "ROOT does not include GDML, not building DDCore GDML Plugins") ENDIF() @@ -100,9 +105,11 @@ ENDIF() #--------------------------- Specialized PYTHON plugin ---------------------------- IF(TARGET ROOT::PyROOT) new_dd4hep_add_plugin(DDPythonPlugins - SOURCES src/python/*.cpp - LINK_LIBRARIES DDCore ROOT::Core ROOT::PyROOT - ) + SOURCES src/python/*.cpp + LINK_LIBRARIES DDCore ROOT::Core ROOT::PyROOT + ) + set_target_properties(DDPythonPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) + install(TARGETS DDPythonPlugins EXPORT DD4hep LIBRARY DESTINATION lib) ELSE() MESSAGE(WARN "ROOT does not include PyRoot, not building DDCore DDPython Plugins") ENDIF() @@ -122,6 +129,5 @@ INSTALL(DIRECTORY DESTINATION include ) - -INSTALL(TARGETS DDCore EXPORT DD4hep DESTINATION lib) -INSTALL(TARGETS DDCorePlugins DESTINATION lib) +set_target_properties(DDCore DDCorePlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) +INSTALL(TARGETS DDCore DDCorePlugins EXPORT DD4hep LIBRARY DESTINATION lib) diff --git a/DDDetectors/CMakeLists.txt b/DDDetectors/CMakeLists.txt index 9a0767359f93ec6d5285160b797a347bb8ca9792..5c87be38dba925dff32e3b4cdc46e4baff57f244 100644 --- a/DDDetectors/CMakeLists.txt +++ b/DDDetectors/CMakeLists.txt @@ -20,8 +20,9 @@ new_dd4hep_add_plugin(DDDetectors SOURCES src/*.cpp LINK_LIBRARIES DDRec - INCLUDE_DIRS include + INCLUDE_DIRS $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ) -INSTALL(TARGETS DDDetectors DESTINATION lib) -INSTALL(DIRECTORY compact DESTINATION DDDetectors) +set_target_properties(DDDetectors PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) +install(TARGETS DDDetectors EXPORT DD4hep LIBRARY DESTINATION lib) +install(DIRECTORY compact DESTINATION DDDetectors) diff --git a/DDDigi/CMakeLists.txt b/DDDigi/CMakeLists.txt index b45a205da4872553429f37d6257eaba34650041b..1970df099c5076a45f076fe1515a6addb6894d58 100644 --- a/DDDigi/CMakeLists.txt +++ b/DDDigi/CMakeLists.txt @@ -8,16 +8,9 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #========================================================================== -# dd4hep_package( DDDigi -# USES DDCore -# [ROOT REQUIRED COMPONENTS Geom GenVector RIO] -# BOOST -# INCLUDE_DIRS include -# INSTALL_INCLUDES include/DDDigi ) - -#---Add Library--------------------------------------------------------------------- file(GLOB DDDigi_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) add_library(DDDigi SHARED ${DDDigi_SOURCES}) + target_link_libraries(DDDigi PUBLIC DDCore Boost::boost ROOT::Core ROOT::Geom ROOT::GenVector ROOT::RIO) @@ -41,8 +34,8 @@ endif() #--------------------------- Legacy libraries ------------------------------------- new_dd4hep_add_dictionary(G__DDDigi - SOURCES ${DDCore_INCLUDE_DIRS}/include/ROOT/Warnings.h python/DDDigiDict.C - LINKDEF ${DDCore_INCLUDE_DIRS}/include/ROOT/LinkDef.h + SOURCES ../DDCore/include/ROOT/Warnings.h python/DDDigiDict.C + LINKDEF ../DDCore/include/ROOT/LinkDef.h DEPENDS DDCore ROOT::Core ROOT::Geom ROOT::GenVector ROOT::RIO Boost::boost ) #--------------------------- Plugin library for the digitization framework ------- @@ -53,6 +46,9 @@ new_dd4hep_add_plugin(DDDigiPlugins ) #---Package installation procedure(s) ---------------------------------------------- + +set_target_properties(DDDigi DDDigiPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) + file(GLOB DDigi_python python/*.py python/*.C) install(FILES ${DDigi_python} DESTINATION python) install(TARGETS DDDigi DDDigiPlugins EXPORT DD4hep LIBRARY DESTINATION lib) diff --git a/DDEve/CMakeLists.txt b/DDEve/CMakeLists.txt index aaf446ed406d25eb4690aa8c902bd572d8801bb1..52fa2a2fc4977e6e2cae9faf8f087a4c8297479e 100644 --- a/DDEve/CMakeLists.txt +++ b/DDEve/CMakeLists.txt @@ -8,12 +8,7 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #========================================================================== -# dd4hep_package( DDEve -# USES DDCore [ROOT REQUIRED COMPONENTS Eve Gui Graf3d RGL EG] -# INCLUDE_DIRS include -# INSTALL_INCLUDES include/DDEve) -# -#---Add Plugin Library----------------------------------------------------- + add_library(DDEve_Interface INTERFACE) target_include_directories(DDEve_Interface INTERFACE @@ -23,12 +18,12 @@ target_include_directories(DDEve_Interface target_link_libraries(DDEve_Interface INTERFACE ROOT::Core ROOT::Rint ROOT::Eve ROOT::Gui ROOT::Graf3d ROOT::RGL ROOT::EG) new_dd4hep_add_dictionary(G__DDEve - SOURCES ${DDCore_INCLUDE_DIRS}/include/ROOT/Warnings.h include/DDEve/*.h + SOURCES ../DDCore/include/ROOT/Warnings.h include/DDEve/*.h EXCLUDE include/DDEve/Utilities.h include/DDEve/ParticleActors.h include/DDEve/HitActors.h include/DDEve/Factories.h - LINKDEF ${DDCore_INCLUDE_DIRS}/include/ROOT/LinkDef.h + LINKDEF ../DDCore/include/ROOT/LinkDef.h DEPENDS DDCore ) @@ -37,26 +32,33 @@ if(TARGET LCIO::LCIO) SET(DDEVE_LCIO_LINK LCIO::LCIO) endif() -new_dd4hep_add_plugin (DDEvePlugins SOURCES src/*.cpp ${DDEVE_LCIO_SOURCES} +new_dd4hep_add_plugin(DDEvePlugins SOURCES src/*.cpp ${DDEVE_LCIO_SOURCES} GENERATED G__DDEve.cxx LINK_LIBRARIES DDCore DDEve_Interface ${DDEVE_LCIO_LINK} ) if(DD4HEP_USE_GEANT4) new_dd4hep_add_dictionary(G__DDG4IO - SOURCES ${DDCore_INCLUDE_DIRS}/include/ROOT/Warnings.h DDEve/DDG4IO.C - LINKDEF ${DDCore_INCLUDE_DIRS}/include/ROOT/LinkDef.h + SOURCES ../DDCore/include/ROOT/Warnings.h DDEve/DDG4IO.C + LINKDEF ../DDCore/include/ROOT/LinkDef.h DEPENDS DDG4 ) add_library(DDG4IO SHARED DDEve/IO.cpp G__DDG4IO.cxx) target_link_libraries(DDG4IO DDG4 DDEve_Interface) + set_target_properties(DDG4IO PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) + install(TARGETS DDG4IO EXPORT DD4hep LIBRARY DESTINATION lib) endif() -#----------------------------------------------------------------------------------- add_executable(ddeve DDEve/DDEve.cpp) target_link_libraries(ddeve DDEve_Interface) -#----------------------------------------------------------------------------------- -#---Package installation procedure(s) ------------------------------------- -dd4hep_install_dir ( DDEve DESTINATION examples ) -install(TARGETS ddeve RUNTIME DESTINATION bin) \ No newline at end of file + +set_target_properties(DDEvePlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) + + +install(DIRECTORY DDEve DESTINATION examples ) +install(DIRECTORY include/DDEve DESTINATION include) +install(TARGETS ddeve DDEvePlugins DDEve_Interface EXPORT DD4hep + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + ) \ No newline at end of file diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt index 0fd65cecbec4d08a7cc5e7b30ee2db9214d83e78..289d6a14d4c39fc99d0e6973bdd8e21efb372be5 100644 --- a/DDG4/CMakeLists.txt +++ b/DDG4/CMakeLists.txt @@ -14,19 +14,12 @@ IF(NOT DD4HEP_USE_GEANT4) RETURN() ENDIF() -# dd4hep_package( DDG4 -# USES [GEANT4 REQUIRED COMPONENTS gdml ui_all vis_all] -# [ROOT REQUIRED COMPONENTS Geom GenVector RIO] -# BOOST DDCore -# OPTIONAL ${CLHEP} [XercesC QUIET] -# INCLUDE_DIRS include -# INSTALL_INCLUDES include/DDG4 ) - dd4hep_print ( "|++> CLHEP_LIBRARIES ${CLHEP_LIBRARIES} ${CLHEP_LIBRARY}" ) #---Add Library--------------------------------------------------------------------- file(GLOB DDG4_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) add_library(DDG4 SHARED ${DDG4_SOURCES}) + target_link_libraries(DDG4 PUBLIC DDCore @@ -71,7 +64,7 @@ if(PYTHONLIBS_FOUND) SOURCES tpython/DDPython.C INCLUDES ${PYTHON_INCLUDE_DIRS} ) - if(ROOT_python_FOUND) + if(TARGET ROOT::PyROOT) #--------------------------- Specialized python plugins -------------------------- MESSAGE(STATUS "ROOT Has Python, creating DDPython library and plugins") add_library(DDPython SHARED G__DDPython.cxx tpython/DDPython.cpp) @@ -89,6 +82,9 @@ if(PYTHONLIBS_FOUND) #---Helper to overcome deficiency of the python executable concerning multi-threading add_executable(pyddg4 pyddg4.cpp) target_link_libraries(pyddg4 PUBLIC DDPython ROOT::Core ROOT::PyROOT) + + # install these libraries + set_target_properties(DDPython DDG4Python PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) INSTALL(TARGETS DDPython pyddg4 DDG4Python EXPORT DD4hep LIBRARY DESTINATION lib RUNTIME DESTINATION bin) @@ -104,7 +100,9 @@ IF(TARGET LCIO::LCIO) SOURCES lcio/*.cpp LINK_LIBRARIES DDG4 LCIO::LCIO ) - install(TARGETS DDG4LCIO LIBRARY DESTINATION lib) + install(TARGETS DDG4LCIO EXPORT DD4hep LIBRARY DESTINATION lib) + set_target_properties(DDG4LCIO PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) + ENDIF() # #--------------------------- DDRec dependent Plugins ----------------------------- #This does not compile at the moment @@ -113,7 +111,7 @@ ENDIF() # SOURCES reco/*.cpp # LINK_LIBRARIES DDCore DDG4 DDRec # ) -# install(TARGETS DDG4Reco LIBRARY DESTINATION lib) +# install(TARGETS DDG4Reco EXPORT DD4hep LIBRARY DESTINATION lib) # ENDIF() #----------------------------------------------------------------------------------- add_executable(g4gdmlDisplay g4gdmlDisplay.cpp) @@ -124,17 +122,19 @@ target_link_libraries(g4gdmlDisplay DDG4) target_link_libraries(g4FromXML DDG4) #---Package installation procedure(s) ---------------------------------------------- -dd4hep_install_dir(examples DESTINATION examples/DDG4) -dd4hep_install_files(FILES python/*.py python/*.C DESTINATION python) +file(GLOB DDG4_python python/*.py python/*.C) +install(FILES ${DDG4_python} DESTINATION python) + install(PROGRAMS python/DDSim/bin/ddsim DESTINATION bin) -dd4hep_install_dir(python/DDSim DESTINATION python) +install(DIRECTORY python/DDSim DESTINATION python) -INSTALL(TARGETS DDG4 EXPORT DD4hep DESTINATION lib) -INSTALL(TARGETS DDG4 DDG4Plugins - g4gdmlDisplay - g4FromXML - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin - ) +install(DIRECTORY examples DESTINATION examples/DDG4) + +set_target_properties(DDG4 DDG4Plugins DDG4Legacy PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) -INSTALL(DIRECTORY include/DDG4 DESTINATION include) + +install(TARGETS DDG4 DDG4Plugins DDG4Legacy g4gdmlDisplay g4FromXML + EXPORT DD4hep + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin) +install(DIRECTORY include/DDG4 DESTINATION include) diff --git a/DDParsers/CMakeLists.txt b/DDParsers/CMakeLists.txt index 2f5053bda6ac0891f6e9792da5fe730907daf025..201728d74b5d8a98ee20cf1147f3e2bb33254e36 100644 --- a/DDParsers/CMakeLists.txt +++ b/DDParsers/CMakeLists.txt @@ -9,19 +9,6 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #================================================================================= -# dd4hep_package( DDParsers -# USES [ROOT REQUIRED] -# OPTIONAL XERCESC -# INCLUDE_DIRS include -# INSTALL_INCLUDES include/Evaluator include/Parsers ) - -# dd4hep_add_package_library ( DDParsers -# INCLUDE_DIRS -# LINK_LIBRARIES -# SOURCES src/Parsers/*.cpp src/Evaluator/*.cpp -# OPTIONAL [BOOST SOURCES src/Spirit/*.cpp] -# ) - file(GLOB DDParsers_SOURCES src/Parsers/*.cpp src/Evaluator/*.cpp) if(Boost_FOUND) @@ -51,10 +38,6 @@ target_link_libraries(DDParsers PUBLIC ${XML_LIBRARIES} ) -INSTALL(TARGETS DDParsers EXPORT DD4hep DESTINATION lib) - -INSTALL(DIRECTORY - include/Parsers - include/Evaluator - DESTINATION include - ) +set_target_properties(DDParsers PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) +install(TARGETS DDParsers EXPORT DD4hep LIBRARY DESTINATION lib) +install(DIRECTORY include/Parsers include/Evaluator DESTINATION include) diff --git a/DDRec/CMakeLists.txt b/DDRec/CMakeLists.txt index 5e175d2152e2f73b9eee8153d4aaccd4a8d7af2b..3ae485f44beff0aa37328bf0431a1d86644dca99 100644 --- a/DDRec/CMakeLists.txt +++ b/DDRec/CMakeLists.txt @@ -23,12 +23,11 @@ new_dd4hep_add_dictionary( G__DDRec file(GLOB DDRec_SOURCES src/*.cpp ) -#SOURCES include/ROOT/Warnings.h - if(DD4HEP_USE_GEAR) FIND_PACAKGE(Gear REQUIRED COMPONENTS geartgeo) SET(GEAR_SOURCE_FILE src/gear/DDGear.cpp) - SET_SOURCE_FILE_PROPERTIES(${GEAR_SOURCE_FILE} + SET_SOURCE_FILES_PROPERTIES(${GEAR_SOURCE_FILE} + PROPERTIES COMPILE_DEFINITIONS DD4HEP_USE_GEAR ) endif() @@ -51,7 +50,6 @@ TARGET_LINK_LIBRARIES(DDRec PUBLIC ${GEAR_COMPONENT_LIBRARIES} ) - if(GEAR_FOUND) SET(DDREC_PLUGIN_GEAR src/gear/createGearForILD.cpp @@ -61,7 +59,7 @@ if(GEAR_FOUND) endif() -new_dd4hep_add_plugin(DDRecPlugins +new_dd4hep_add_plugin(DDRecPlugins SOURCES src/plugins/*.cpp ${DDREC_PLUGIN_GEAR} LINK_LIBRARIES DDRec DEFINITIONS ${DDREC_PLUGIN_DEFINITIONS} @@ -81,12 +79,9 @@ else() endif() endif() -dd4hep_install_files(FILES python/*.py DESTINATION python) - -INSTALL(DIRECTORY - include/DDRec - DESTINATION include - ) +set_target_properties(DDRec DDRecPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) -INSTALL(TARGETS DDRec EXPORT DD4hep DESTINATION lib) -INSTALL(TARGETS DDRecPlugins DESTINATION lib) +file(GLOB DDRec_python python/*.py) +INSTALL(FILES ${DDRec_python} DESTINATION python) +INSTALL(DIRECTORY include/DDRec DESTINATION include) +INSTALL(TARGETS DDRec DDRecPlugins EXPORT DD4hep LIBRARY DESTINATION lib) diff --git a/DDTest/CMakeLists.txt b/DDTest/CMakeLists.txt index 4adb2e88032ca6ef28d91c5ab79bd28e725e5438..70e555101aa741238be8b7a1aceacb16876fccf2 100644 --- a/DDTest/CMakeLists.txt +++ b/DDTest/CMakeLists.txt @@ -24,7 +24,7 @@ foreach(TEST_NAME ) add_executable(${TEST_NAME} src/${TEST_NAME}.cc) target_link_libraries(${TEST_NAME} DDCore DDRec DDTest) - install(TARGETS ${TEST_NAME} DESTINATION bin) + install(TARGETS ${TEST_NAME} RUNTIME DESTINATION bin) set(cmd ${CMAKE_INSTALL_PREFIX}/bin/run_test.sh ${TEST_NAME}) add_test(NAME t_${TEST_NAME} COMMAND ${cmd} ${TEST_NAME}) @@ -37,7 +37,7 @@ foreach(TEST_NAME ) add_executable(${TEST_NAME} src/${TEST_NAME}.cc) target_link_libraries(${TEST_NAME} DDCore DDRec DDTest) - install(TARGETS ${TEST_NAME} DESTINATION bin) + install(TARGETS ${TEST_NAME} RUNTIME DESTINATION bin) add_test(NAME t_${TEST_NAME} COMMAND ${CMAKE_INSTALL_PREFIX}/bin/run_test.sh ${TEST_NAME} file:${CMAKE_CURRENT_SOURCE_DIR}/units.xml) set_tests_properties(t_${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST_FAILED") @@ -62,3 +62,4 @@ if (DD4HEP_USE_GEANT4) SET_TESTS_PROPERTIES( test_ddsim PROPERTIES FAIL_REGULAR_EXPRESSION "Exception;EXCEPTION;ERROR;Error" ) endif() +install(DIRECTORY include/DD4hep DESTINATION include) \ No newline at end of file diff --git a/UtilityApps/CMakeLists.txt b/UtilityApps/CMakeLists.txt index b38f7da078104233eb867588904e524e860527b6..f05726ff3461f31dcef56627c93c86cbcf66c7f8 100644 --- a/UtilityApps/CMakeLists.txt +++ b/UtilityApps/CMakeLists.txt @@ -8,11 +8,6 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #========================================================================== -# dd4hep_package(UtilityApps -# USES DDCore -# [ROOT REQUIRED COMPONENTS Geom] -# ) -#----------------------------------------------------------------------------------- add_executable(geoDisplay src/display.cpp) target_link_libraries(geoDisplay DDCore) #----------------------------------------------------------------------------------- @@ -38,7 +33,6 @@ add_executable(graphicalScan src/graphicalScan.cpp) target_link_libraries(graphicalScan ROOT::Core ROOT::Geom DDRec ROOT::Hist) #----------------------------------------------------------------------------------- - if(TARGET Geant4::Interface) add_executable(dumpdetector src/dumpdetector.cpp) target_link_libraries(dumpdetector Geant4::Interface DDCore DDRec) @@ -86,5 +80,6 @@ INSTALL(TARGETS geoDisplay graphicalScan dumpdetector teveDisplay + EXPORT DD4hep RUNTIME DESTINATION bin ) \ No newline at end of file diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index 4bfb0951c987aff8a9d5f4e72e2da1e52132e5d5..6ae7a7912d05b6839646ec93c8484fe9c49f342b 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -1671,7 +1671,6 @@ macro(DD4HEP_SETUP_ROOT_TARGETS) endforeach() ENDIF(NOT TARGET ROOT::Core) - MESSAGE(STATUS "ROOT Libraries ${ROOT_LIBRARIES}") MESSAGE(STATUS "ROOT CXX_FLAGS ${ROOT_CXX_FLAGS}") MESSAGE(STATUS "ROOT INCL DIRS ${ROOT_INCLUDE_DIRS}") diff --git a/cmake/DD4hepConfig.cmake.in b/cmake/DD4hepConfig.cmake.in index ce9cc9ed37a1549b19f9175a04d2098147d6918f..b01fd1562cdc5ac1e6ec18304fba5ee0ec71c4ed 100644 --- a/cmake/DD4hepConfig.cmake.in +++ b/cmake/DD4hepConfig.cmake.in @@ -26,6 +26,7 @@ set ( DD4hep_ROOT "${_thisdir}" ) set ( DD4hep_VERSION "@DD4hep_VERSION@" ) set ( DD4hep_SOVERSION "@DD4hep_SOVERSION@" ) set ( DD4HEP_USE_GEANT4 "@DD4HEP_USE_GEANT4@" ) +set ( DD4HEP_USE_LCIO "@DD4HEP_USE_LCIO@" ) set ( DD4HEP_USE_XERCESC "@DD4HEP_USE_XERCESC@" ) set ( DD4hep_BUILD_CXX_STANDARD @CMAKE_CXX_STANDARD@ ) @@ -33,11 +34,7 @@ set ( DD4hep_BUILD_CXX_STANDARD @CMAKE_CXX_STANDARD@ ) if (NOT "${CMAKE_CXX_STANDARD}" EQUAL "${DD4hep_BUILD_CXX_STANDARD}") message( SEND_ERROR "CMAKE_CXX_STANDARD is set to C++${CMAKE_CXX_STANDARD} but C++${DD4hep_BUILD_CXX_STANDARD} is required for DD4hep.") endif() - -# set ( CMAKE_CXX_STANDARD_REQUIRED ON ) -# set ( CMAKE_CXX_EXTENSIONS OFF ) -# set ( Geant4_DIR "@Geant4_DIR@" ) # set ( GEANT4_USE_CLHEP "@GEANT4_USE_CLHEP@" ) # set ( ROOTSYS "$ENV{ROOTSYS}" ) @@ -90,15 +87,12 @@ MESSAGE(STATUS "include dirs ${DD4hep_INCLUDE_DIRS}") #set( DD4hep_LIBRARIES DD4hep_LIBRARIES-NOTFOUND ) #mark_as_advanced( DD4hep_LIBRARY_DIRS DD4hep_LIBRARIES ) -set(DD4hep_LIBRARIES DD4hep::DDParsers DD4hep::DDCore DD4hep::DDRec) - -#include( ${DD4hep_DIR}/cmake/DD4hepMacros.cmake ) +set(DD4hep_LIBRARIES DD4hep::DDCore) SET(DD4hep_COMPONENT_LIBRARIES) IF(DD4hep_FIND_COMPONENTS) dd4hep_print( "|++> DD4hep: Looking for 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 IF(NOT TARGET DD4hep::${comp}) MESSAGE(FATAL_ERROR "|++> Did not find required component: ${comp}") ENDIF()