diff --git a/Plugins/DD4hep/CMakeLists.txt b/Plugins/DD4hep/CMakeLists.txt index f3a7beec033686f3b66392123e5cab48b8a24567..723dc12fca01ff9f03552cdac1c121bfa5f9739a 100644 --- a/Plugins/DD4hep/CMakeLists.txt +++ b/Plugins/DD4hep/CMakeLists.txt @@ -1,17 +1,19 @@ -file (GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") +file(GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") -add_library (ActsDD4hepPlugin SHARED ${src_files}) +add_library(ActsDD4hepPlugin SHARED ${src_files}) -target_include_directories (ActsDD4hepPlugin PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) -target_include_directories (ActsDD4hepPlugin PUBLIC ${DD4hep_INCLUDE_DIRS}) -target_link_libraries (ActsDD4hepPlugin PUBLIC ActsCore) -target_link_libraries (ActsDD4hepPlugin PUBLIC ActsTGeoPlugin) -target_link_libraries (ActsDD4hepPlugin PUBLIC ${DD4hep_DDCORE_LIBRARY}) +target_include_directories(ActsDD4hepPlugin PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) +target_include_directories(ActsDD4hepPlugin PUBLIC ${DD4hep_INCLUDE_DIRS}) +target_link_libraries(ActsDD4hepPlugin PUBLIC ActsCore) +target_link_libraries(ActsDD4hepPlugin PUBLIC ActsTGeoPlugin) +target_link_libraries(ActsDD4hepPlugin PUBLIC ${DD4hep_DDCORE_LIBRARY}) -install (TARGETS ActsDD4hepPlugin - EXPORT ActsDD4hepPluginTargets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -install (DIRECTORY include/Acts DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install( + TARGETS ActsDD4hepPlugin + EXPORT ActsDD4hepPluginTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install( + DIRECTORY include/Acts + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) acts_add_targets_to_cdash_project(PROJECT ActsDD4hepPlugin TARGETS ActsDD4hepPlugin) diff --git a/Plugins/Digitization/CMakeLists.txt b/Plugins/Digitization/CMakeLists.txt index 6b0974730613fb03f13e01ab0c0d9ff0633c0928..6ff33a7ce277cbdd287055be23d2d39667ee4286 100644 --- a/Plugins/Digitization/CMakeLists.txt +++ b/Plugins/Digitization/CMakeLists.txt @@ -1,14 +1,17 @@ -file (GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") +file(GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") -add_library (ActsDigitizationPlugin SHARED ${src_files}) +add_library(ActsDigitizationPlugin SHARED ${src_files}) target_include_directories(ActsDigitizationPlugin PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) target_include_directories(ActsDigitizationPlugin PUBLIC ${ROOT_INCLUDE_DIRS}) target_link_libraries(ActsDigitizationPlugin PUBLIC ActsCore) -install (TARGETS ActsDigitizationPlugin EXPORT ActsDigitizationPluginTargets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -install (DIRECTORY include/Acts DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install( + TARGETS ActsDigitizationPlugin + EXPORT ActsDigitizationPluginTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install( + DIRECTORY include/Acts + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) acts_add_targets_to_cdash_project(PROJECT ActsDigitizationPlugin TARGETS ActsDigitizationPlugin) diff --git a/Plugins/Identification/CMakeLists.txt b/Plugins/Identification/CMakeLists.txt index e1bc257c3a7123d98214336092f2bc0557db7578..e3a7571fb19ba982a53cb913e04541e9361832f4 100644 --- a/Plugins/Identification/CMakeLists.txt +++ b/Plugins/Identification/CMakeLists.txt @@ -1,6 +1,12 @@ add_library(IdentificationPlugin INTERFACE) + target_include_directories(IdentificationPlugin INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) target_link_libraries(IdentificationPlugin INTERFACE ActsCore) -install(TARGETS IdentificationPlugin EXPORT ActsIdentificationPluginTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(DIRECTORY include/Acts DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install( + TARGETS IdentificationPlugin + EXPORT ActsIdentificationPluginTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install( + DIRECTORY include/Acts + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/Plugins/Json/CMakeLists.txt b/Plugins/Json/CMakeLists.txt index 3da078b0bff9d2cf9e26648cbced0bccd120aede..435ea5cf9cfaf593398efbdac3d094ed21f67f1f 100644 --- a/Plugins/Json/CMakeLists.txt +++ b/Plugins/Json/CMakeLists.txt @@ -1,13 +1,12 @@ -file (GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") - -add_library (ActsJsonPlugin INTERFACE) - -target_include_directories (ActsJsonPlugin SYSTEM INTERFACE ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}) -target_include_directories (ActsJsonPlugin INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) - -install (TARGETS ActsJsonPlugin - EXPORT ActsJsonPluginTargets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -install (DIRECTORY include/Acts DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - +add_library(ActsJsonPlugin INTERFACE) + +target_include_directories(ActsJsonPlugin SYSTEM INTERFACE ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}) +target_include_directories(ActsJsonPlugin INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) + +install( + TARGETS ActsJsonPlugin + EXPORT ActsJsonPluginTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install( + DIRECTORY include/Acts + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/Plugins/MaterialMapping/CMakeLists.txt b/Plugins/MaterialMapping/CMakeLists.txt index fd6874e3c0269f0182de6ea053ac45c185e5cb17..5da5d3ff818c6c1aaa72680dee8e0bd37c8eb98e 100644 --- a/Plugins/MaterialMapping/CMakeLists.txt +++ b/Plugins/MaterialMapping/CMakeLists.txt @@ -1,13 +1,16 @@ -file (GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") +file(GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") -add_library (ActsMaterialMappingPlugin SHARED ${src_files}) +add_library(ActsMaterialMappingPlugin SHARED ${src_files}) -target_include_directories (ActsMaterialMappingPlugin PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) -target_link_libraries (ActsMaterialMappingPlugin PUBLIC ActsCore) +target_include_directories(ActsMaterialMappingPlugin PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) +target_link_libraries(ActsMaterialMappingPlugin PUBLIC ActsCore) -install (TARGETS ActsMaterialMappingPlugin - EXPORT ActsMaterialMappingPluginTargets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install (DIRECTORY include/Acts DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install( + TARGETS ActsMaterialMappingPlugin + EXPORT ActsMaterialMappingPluginTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install( + DIRECTORY include/Acts + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) acts_add_targets_to_cdash_project(PROJECT ActsMaterialMappingPlugin TARGETS ActsMaterialMappingPlugin) diff --git a/Plugins/TGeo/CMakeLists.txt b/Plugins/TGeo/CMakeLists.txt index f0d62d3ae5e7fba36b78b9e6767f0f8ffc6b3b95..9fe65ab73349cfcc78f0c23fcc1cc44a85059c9d 100644 --- a/Plugins/TGeo/CMakeLists.txt +++ b/Plugins/TGeo/CMakeLists.txt @@ -1,6 +1,6 @@ -file (GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") +file(GLOB_RECURSE src_files "src/*.cpp" "include/*.hpp") -add_library (ActsTGeoPlugin SHARED ${src_files}) +add_library(ActsTGeoPlugin SHARED ${src_files}) target_include_directories(ActsTGeoPlugin PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) target_include_directories(ActsTGeoPlugin PUBLIC ${ROOT_INCLUDE_DIRS}) @@ -8,21 +8,12 @@ target_link_libraries(ActsTGeoPlugin PUBLIC ActsCore) target_link_libraries(ActsTGeoPlugin PUBLIC ROOT::Geom) target_link_libraries(ActsTGeoPlugin PUBLIC IdentificationPlugin) -# PROBLEM: depending on LCG version, ROOT might have been compiled with c++17 or -# not. Detect and set standard on this target -set(_root_cxx_flags ${ROOT_CXX_FLAGS}) -separate_arguments(_root_cxx_flags) -if("-std=c++1z" IN_LIST _root_cxx_flags OR "-std=c++17" IN_LIST _root_cxx_flags) - # per-target standard reqirements are only possible in 3.8 or higher - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.8.0") - target_compile_features(ActsTGeoPlugin PUBLIC cxx_std_17) - else() - message(FATAL_ERROR "ROOT compiled with C++17, but this CMake version cannot set it") - endif() -endif() - -install (TARGETS ActsTGeoPlugin EXPORT ActsTGeoPluginTargets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install (DIRECTORY include/Acts DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install( + TARGETS ActsTGeoPlugin + EXPORT ActsTGeoPluginTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install( + DIRECTORY include/Acts + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) acts_add_targets_to_cdash_project(PROJECT ActsTGeoPlugin TARGETS ActsTGeoPlugin)