Skip to content

Commit

Permalink
Downstream configure and detray plugin cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
fredevb committed Jul 9, 2024
1 parent ffc9abc commit 4534ade
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,18 @@ set_option_if(
set_option_if(
ACTS_BUILD_PLUGIN_TGEO
ACTS_BUILD_PLUGIN_DD4HEP OR ACTS_BUILD_EXAMPLES OR ACTS_BUILD_EVERYTHING)
set_option_if(ACTS_BUILD_PLUGIN_TRACCC
ACTS_BUILD_EVERYTHING)
set_option_if(
ACTS_BUILD_PLUGIN_JSON
ACTS_BUILD_EXAMPLES OR ACTS_BUILD_EVERYTHING)
ACTS_BUILD_EXAMPLES OR ACTS_BUILD_EVERYTHING OR ACTS_BUILD_PLUGIN_TRACCC)
set_option_if(
ACTS_BUILD_FATRAS
ACTS_BUILD_EXAMPLES OR ACTS_BUILD_EVERYTHING)
set_option_if(ACTS_BUILD_PLUGIN_LEGACY ACTS_BUILD_EVERYTHING)
set_option_if(ACTS_BUILD_PLUGIN_EXATRKX ACTS_BUILD_EXAMPLES_EXATRKX)
set_option_if(ACTS_BUILD_PLUGIN_FPEMON
ACTS_BUILD_EXAMPLES OR ACTS_BUILD_EVERYTHING)
set_option_if(ACTS_BUILD_PLUGIN_TRACCC
ACTS_BUILD_EVERYTHING)

# feature tests
include(CheckCXXSourceCompiles)
Expand Down
10 changes: 3 additions & 7 deletions Examples/Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ else()
target_sources(ActsPythonBindings PRIVATE src/GeoModelStub.cpp)
endif()

if(ACTS_BUILD_PLUGIN_DETRAY)
target_link_libraries(ActsPythonBindings PUBLIC ActsPluginDetray)
target_sources(ActsPythonBindings PRIVATE src/Detray.cpp)
else()
target_sources(ActsPythonBindings PRIVATE src/DetrayStub.cpp)
endif()

if(ACTS_BUILD_PLUGIN_ACTSVG)
target_link_libraries(ActsPythonBindings PUBLIC ActsExamplesIoSvg)
target_sources(ActsPythonBindings PRIVATE src/Svg.cpp)
Expand Down Expand Up @@ -207,8 +200,11 @@ endif()
if(ACTS_BUILD_PLUGIN_TRACCC)
target_link_libraries(ActsPythonBindings PUBLIC ActsPluginCovfie)
target_sources(ActsPythonBindings PRIVATE src/Covfie.cpp)
target_link_libraries(ActsPythonBindings PUBLIC ActsPluginDetray)
target_sources(ActsPythonBindings PRIVATE src/Detray.cpp)
else()
target_sources(ActsPythonBindings PRIVATE src/CovfieStub.cpp)
target_sources(ActsPythonBindings PRIVATE src/DetrayStub.cpp)
endif()

configure_file(setup.sh.in ${_python_dir}/setup.sh @ONLY)
Expand Down
2 changes: 1 addition & 1 deletion Plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_component_if(Json PluginJson ACTS_BUILD_PLUGIN_JSON)
add_component_if(Legacy PluginLegacy ACTS_BUILD_PLUGIN_LEGACY)
add_component_if(Onnx PluginOnnx ACTS_BUILD_PLUGIN_ONNX)
add_component_if(ExaTrkX PluginExaTrkX ACTS_BUILD_PLUGIN_EXATRKX)
add_component_if(Detray PluginDetray ACTS_BUILD_PLUGIN_DETRAY)
add_component_if(Detray PluginDetray ACTS_BUILD_PLUGIN_TRACCC)
add_component_if(Covfie PluginCovfie ACTS_BUILD_PLUGIN_TRACCC)

# dependent plugins. depend either on a independent plugins or on one another
Expand Down
10 changes: 8 additions & 2 deletions Tests/DownstreamProject/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ find_package(
Fatras
PluginJson
PluginLegacy
PluginTGeo)
PluginTGeo
PluginCovfie
PluginDetray
PluginTraccc)

# place artifacts in GNU-like paths, e.g. binaries in `<build>/bin`
include(GNUInstallDirs)
Expand All @@ -27,7 +30,10 @@ target_link_libraries(
ActsFatras
ActsPluginJson
ActsPluginLegacy
ActsPluginTGeo)
ActsPluginTGeo
ActsPluginCovfie
ActsPluginDetray
ActsPluginTraccc)

option(DD4HEP "Build with DD4hep" ON)
if(DD4HEP)
Expand Down

0 comments on commit 4534ade

Please sign in to comment.