Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Examples/Algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
add_subdirectory(Digitization)
add_component(Digitization ExamplesDigitization)
add_subdirectory(Fatras)
add_subdirectory_if(Geant4 ACTS_BUILD_EXAMPLES_GEANT4)
add_subdirectory(Generators)
add_subdirectory_if(GeneratorsPythia8 ACTS_BUILD_EXAMPLES_PYTHIA8)
add_subdirectory(MaterialMapping)
add_component(MaterialMapping ExamplesMaterialMapping)
add_subdirectory(Printers)
add_subdirectory(Propagation)
add_subdirectory_if(Traccc ACTS_BUILD_PLUGIN_TRACCC)
add_subdirectory(TrackFinding)
add_component(TrackFinding ExamplesTrackFinding)
add_subdirectory_if(TrackFindingGnn ACTS_BUILD_EXAMPLES_GNN)
add_subdirectory_if(TrackFindingML ACTS_BUILD_PLUGIN_ONNX)
add_subdirectory(TrackFitting)
Expand All @@ -18,3 +18,5 @@ add_subdirectory_if(Alignment ACTS_BUILD_ALIGNMENT)
add_subdirectory(Utilities)
add_subdirectory(AmbiguityResolution)
add_subdirectory(HelloWorld)

propagate_components_to_parent()
5 changes: 4 additions & 1 deletion Examples/Algorithms/Digitization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ acts_add_library(
src/DigitizationConfigurator.cpp
src/ModuleClusters.cpp
src/MuonSpacePointDigitizer.cpp
ACTS_INCLUDE_FOLDER include/ActsExamples
)
target_include_directories(
ActsExamplesDigitization
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_link_libraries(ActsExamplesDigitization PUBLIC Acts::ExamplesFramework)
Expand Down
5 changes: 4 additions & 1 deletion Examples/Algorithms/MaterialMapping/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ acts_add_library(
ExamplesMaterialMapping
src/MaterialValidation.cpp
src/MaterialMapping.cpp
ACTS_INCLUDE_FOLDER include/ActsExamples
)

target_include_directories(
ActsExamplesMaterialMapping
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(
ActsExamplesMaterialMapping
Expand Down
9 changes: 6 additions & 3 deletions Examples/Algorithms/TrackFinding/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ acts_add_library(
src/TrackParamsLookupEstimation.cpp
src/GridTripletSeedingAlgorithm.cpp
src/OrthogonalTripletSeedingAlgorithm.cpp
ACTS_INCLUDE_FOLDER include/ActsExamples
)

target_include_directories(
ActsExamplesTrackFinding
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_link_libraries(
ActsExamplesTrackFinding
PUBLIC Acts::ExamplesMagneticField
)

acts_compile_headers(ExamplesTrackFinding GLOB "include/**/*.hpp")

# If Hashing examples are enabled, add them to the build
if(ACTS_BUILD_EXAMPLES_HASHING)
target_sources(
Expand All @@ -34,3 +35,5 @@ if(ACTS_BUILD_EXAMPLES_HASHING)

target_link_libraries(ActsExamplesTrackFinding PUBLIC Annoy)
endif()

acts_compile_headers(ExamplesTrackFinding GLOB "include/**/*.hpp")
6 changes: 4 additions & 2 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
add_subdirectory(Algorithms)
add_component (Framework ExamplesFramework)
add_subdirectory(Detectors)
add_subdirectory(Framework)
add_subdirectory(Algorithms)
add_subdirectory(Io)
add_subdirectory_if(Scripts ACTS_BUILD_ANALYSIS_APPS)

propagate_components_to_parent()
8 changes: 5 additions & 3 deletions Examples/Detectors/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
add_subdirectory(Common)
add_subdirectory_if(DD4hepDetector ACTS_BUILD_EXAMPLES_DD4HEP)
add_component(Common ExamplesDetectorsCommon)
add_component_if(DD4hepDetector ExamplesDetectorDD4hep ACTS_BUILD_EXAMPLES_DD4HEP)
add_subdirectory(GenericDetector)
add_subdirectory_if(Geant4Detector ACTS_BUILD_EXAMPLES_GEANT4)
add_subdirectory(MagneticField)
add_component(MagneticField ExamplesMagneticField)
add_subdirectory_if(TGeoDetector ACTS_BUILD_EXAMPLES_ROOT)
add_subdirectory(ITkModuleSplitting)
add_subdirectory(TelescopeDetector)
add_subdirectory(MuonSpectrometerMockupDetector)
add_subdirectory_if(GeoModelDetector ACTS_BUILD_PLUGIN_GEOMODEL)

propagate_components_to_parent()
5 changes: 4 additions & 1 deletion Examples/Detectors/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ acts_add_library(
src/Detector.cpp
src/AlignmentDecorator.cpp
src/StructureSelector.cpp
ACTS_INCLUDE_FOLDER include/ActsExamples
)
target_include_directories(
ActsExamplesDetectorsCommon
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(
ActsExamplesDetectorsCommon
Expand Down
9 changes: 6 additions & 3 deletions Examples/Detectors/DD4hepDetector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ acts_add_library(
src/DD4hepDetector.cpp
src/AlignedDD4hepDetectorElement.cpp
src/OpenDataDetector.cpp
ACTS_INCLUDE_FOLDER include/ActsExamples
)

target_include_directories(
ActsExamplesDetectorDD4hep
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(
ActsExamplesDetectorDD4hep
Expand All @@ -29,12 +32,12 @@ if(ACTS_BUILD_EXAMPLES_GEANT4)

target_sources(
ActsExamplesDetectorDD4hep
PUBLIC src/DDG4DetectorConstruction.cpp src/DD4hepDetectorGeant4.cpp
PRIVATE src/DDG4DetectorConstruction.cpp src/DD4hepDetectorGeant4.cpp
)
else()
target_sources(
ActsExamplesDetectorDD4hep
PUBLIC src/DD4hepDetectorGeant4Stub.cpp
PRIVATE src/DD4hepDetectorGeant4Stub.cpp
)
endif()

Expand Down
9 changes: 7 additions & 2 deletions Examples/Detectors/MagneticField/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
acts_add_library(ExamplesMagneticField src/ScalableBFieldService.cpp)
acts_add_library(ExamplesMagneticField
src/ScalableBFieldService.cpp
ACTS_INCLUDE_FOLDER include/ActsExamples
)
target_include_directories(
ActsExamplesMagneticField
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(ActsExamplesMagneticField PUBLIC Acts::ExamplesFramework)

Expand Down
4 changes: 3 additions & 1 deletion Examples/Framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ acts_add_library(

target_include_directories(
ActsExamplesFramework
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(
ActsExamplesFramework
Expand Down
8 changes: 5 additions & 3 deletions Examples/Io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
add_subdirectory(Csv)
add_subdirectory_if(EDM4hep ACTS_BUILD_EXAMPLES_EDM4HEP)
add_component_if(Podio ExamplesIoPodio ACTS_BUILD_EXAMPLES_PODIO)
add_component_if(EDM4hep ExamplesIoEDM4hep ACTS_BUILD_EXAMPLES_EDM4HEP)
add_subdirectory(HepMC3)
add_subdirectory(Json)
add_component(Json ExamplesIoJson)
add_subdirectory(Obj)
add_subdirectory_if(Root ACTS_BUILD_EXAMPLES_ROOT)
add_subdirectory_if(Svg ACTS_BUILD_PLUGIN_ACTSVG)
add_subdirectory_if(Podio ACTS_BUILD_EXAMPLES_PODIO)

propagate_components_to_parent()
5 changes: 4 additions & 1 deletion Examples/Io/EDM4hep/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ acts_add_library(
src/EDM4hepParticleOutputConverter.cpp
src/EDM4hepSimHitOutputConverter.cpp
src/EDM4hepUtil.cpp
ACTS_INCLUDE_FOLDER include/ActsExamples
)

acts_compile_headers(ExamplesIoEDM4hep GLOB include/**/*.hpp)

target_include_directories(
ActsExamplesIoEDM4hep
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(
ActsExamplesIoEDM4hep
Expand Down
5 changes: 4 additions & 1 deletion Examples/Io/Json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ acts_add_library(
src/JsonMaterialWriter.cpp
src/JsonSurfacesWriter.cpp
src/JsonDigitizationConfig.cpp
ACTS_INCLUDE_FOLDER include/ActsExamples
)
target_include_directories(
ActsExamplesIoJson
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(
ActsExamplesIoJson
Expand Down
5 changes: 4 additions & 1 deletion Examples/Io/Podio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ acts_add_library(
src/PodioInputConverter.cpp
src/PodioMeasurementOutputConverter.cpp
src/PodioMeasurementInputConverter.cpp
ACTS_INCLUDE_FOLDER include/ActsExamples
)

target_include_directories(
ActsExamplesIoPodio
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(
ActsExamplesIoPodio
Expand Down
1 change: 1 addition & 0 deletions cmake/ActsComponentsHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function(add_subdirectory_if path)
if(${ARGN})
message(STATUS "Enable subdirectory '${_rel}'")
add_subdirectory(${path})
propagate_components_to_parent()
else()
message(STATUS "Ignore subdirectory '${_rel}'")
endif()
Expand Down
6 changes: 6 additions & 0 deletions cmake/ActsConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ if(PluginGnn IN_LIST Acts_COMPONENTS)
find_dependency(TensorRT)
endif()
endif()
if (ExamplesFramework IN_LIST Acts_COMPONENTS)
find_dependency(HepMC3 @HEPMC3_VERSION@ CONFIG EXACT)
endif()
if (ExamplesIoPodio IN_LIST Acts_COMPONENTS)
find_dependency(podio @podio_VERSION@ CONFIG EXACT)
endif()

# dependencies that we have built ourselves but cannot be
# straightforwardly handed to cmake
Expand Down