From 8cf392a4f7816c0c1bd45e8328a7362700204e68 Mon Sep 17 00:00:00 2001 From: Frederik Date: Sun, 28 Jul 2024 14:09:00 +0200 Subject: [PATCH] changes --- CMakeLists.txt | 2 -- Plugins/Traccc/CMakeLists.txt | 1 - Tests/DownstreamProject/CMakeLists.txt | 6 +++-- cmake/ActsConfig.cmake.in | 27 ++++++++++++++--------- thirdparty/algebra-plugins/CMakeLists.txt | 2 ++ thirdparty/traccc/CMakeLists.txt | 2 ++ 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 418656a82b96..28b27d7b47b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -301,8 +301,6 @@ endmacro() # the same package twice. This avoids having complex if/else trees to sort out # when a particular package is actually needed. -add_definitions(-DALGEBRA_PLUGINS_INCLUDE_ARRAY) - # plugin dependencies if(ACTS_BUILD_PLUGIN_ACTSVG) diff --git a/Plugins/Traccc/CMakeLists.txt b/Plugins/Traccc/CMakeLists.txt index e59112d2d032..a2f5bf2fed48 100644 --- a/Plugins/Traccc/CMakeLists.txt +++ b/Plugins/Traccc/CMakeLists.txt @@ -13,7 +13,6 @@ target_link_libraries( PUBLIC ActsCore traccc::core - traccc::io vecmem::core detray::utils detray::io diff --git a/Tests/DownstreamProject/CMakeLists.txt b/Tests/DownstreamProject/CMakeLists.txt index e7502a5a8566..91a9fc1dd4b8 100644 --- a/Tests/DownstreamProject/CMakeLists.txt +++ b/Tests/DownstreamProject/CMakeLists.txt @@ -12,7 +12,8 @@ find_package( PluginLegacy PluginTGeo PluginCovfie - PluginDetray) + PluginDetray + PluginTraccc) # place artifacts in GNU-like paths, e.g. binaries in `/bin` include(GNUInstallDirs) @@ -31,7 +32,8 @@ target_link_libraries( ActsPluginLegacy ActsPluginTGeo ActsPluginCovfie - ActsPluginDetray) + ActsPluginDetray + ActsPluginTraccc) option(DD4HEP "Build with DD4hep" ON) if(DD4HEP) diff --git a/cmake/ActsConfig.cmake.in b/cmake/ActsConfig.cmake.in index 7d39baac86ac..0ae63438d2fb 100644 --- a/cmake/ActsConfig.cmake.in +++ b/cmake/ActsConfig.cmake.in @@ -81,6 +81,23 @@ if(PluginGeoModel IN_LIST Acts_COMPONENTS) find_dependency(GeoModelIO @GeoModel_VERSION@ CONFIG EXACT) endif() +if (PluginCovfie IN_LIST Acts_COMPONENTS) + find_dependency(covfie @covfie_VERSION@ CONFIG EXACT) +endif() + +if(PluginDetray IN_LIST Acts_COMPONENTS OR PluginTraccc IN_LIST Acts_COMPONENTS) + find_dependency(vecmem @vecmem_VERSION@ CONFIG EXACT) + find_dependency(algebra-plugins @algebra-plugins_VERSION@ CONFIG EXACT) + find_dependency(detray @detray_VERSION@ CONFIG EXACT) +endif() + +if(PluginTraccc IN_LIST Acts_COMPONENTS) + if(NOT @ACTS_USE_SYSTEM_TRACCC@) + add_library(traccc_all INTERFACE IMPORTED GLOBAL) + target_include_directories(traccc_all INTERFACE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") + endif() +endif() + # dependencies that we have built ourselves but cannot be # straightforwardly handed to cmake if(NOT @ACTS_USE_SYSTEM_BOOST@) @@ -96,16 +113,6 @@ if(PluginPodio IN_LIST Acts_COMPONENTS) include(${CMAKE_CURRENT_LIST_DIR}/ActsPodioEdmTargets.cmake) endif() -if (PluginCovfie IN_LIST Acts_COMPONENTS) - find_dependency(covfie @covfie_VERSION@ CONFIG EXACT) -endif() - -if(PluginDetray IN_LIST Acts_COMPONENTS) - find_dependency(vecmem @vecmem_VERSION@ CONFIG EXACT) - find_dependency(algebra-plugins @algebra-plugins_VERSION@ CONFIG EXACT) - find_dependency(detray @detray_VERSION@ CONFIG EXACT) -endif() - # load **all** available components. we can not just include the requested # components since there can be interdependencies between them. if(NOT Acts_FIND_QUIETLY) diff --git a/thirdparty/algebra-plugins/CMakeLists.txt b/thirdparty/algebra-plugins/CMakeLists.txt index 75fb0f9ad77b..f7508fb069f4 100644 --- a/thirdparty/algebra-plugins/CMakeLists.txt +++ b/thirdparty/algebra-plugins/CMakeLists.txt @@ -14,6 +14,8 @@ message( STATUS "Building algebra-plugins as part of the Acts project" ) FetchContent_Declare( AlgebraPlugins ${ACTS_ALGEBRAPLUGINS_SOURCE} ) +add_definitions(-DALGEBRA_PLUGINS_INCLUDE_ARRAY) + # Options used in the build of Algebra Plugins. set(ALGEBRA_PLUGINS_BUILD_TESTING FALSE CACHE BOOL "Turn off the build of the Algebra Plugins unit tests") diff --git a/thirdparty/traccc/CMakeLists.txt b/thirdparty/traccc/CMakeLists.txt index d187dc94d64e..f3c32fb0b483 100644 --- a/thirdparty/traccc/CMakeLists.txt +++ b/thirdparty/traccc/CMakeLists.txt @@ -41,6 +41,8 @@ set( TRACCC_BUILD_TESTING OFF CACHE BOOL "Turn off the build of the Traccc unit tests" ) set( TRACCC_BUILD_EXAMPLES OFF CACHE BOOL "Turn off the build of the Traccc examples" ) +set ( TRACCC_BUILD_IO OFF CACHE BOOL + "Turn off the build of Traccc io" ) # Now set up its build. FetchContent_MakeAvailable( traccc ) \ No newline at end of file