From 4f51b04c9216a2590824481fe1713ae2ff8dcc17 Mon Sep 17 00:00:00 2001 From: Paul Gessinger Date: Tue, 13 Aug 2024 16:20:03 +0200 Subject: [PATCH] fix compilation --- Examples/Algorithms/Geant4/CMakeLists.txt | 14 +++++--------- .../GeoModelG4/GeoModelDetectorConstruction.hpp | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Examples/Algorithms/Geant4/CMakeLists.txt b/Examples/Algorithms/Geant4/CMakeLists.txt index 4153c4734c8..efa5d2280b7 100644 --- a/Examples/Algorithms/Geant4/CMakeLists.txt +++ b/Examples/Algorithms/Geant4/CMakeLists.txt @@ -15,14 +15,6 @@ add_library( src/PhysicsListFactory.cpp src/Geant4Manager.cpp) -if (ACTS_BUILD_EXAMPLES_DD4HEP) - target_sources(ActsExamplesGeant4 PUBLIC src/DDG4DetectorConstruction.cpp) -endif() - -if (ACTS_BUILD_PLUGIN_GEOMODEL) - target_sources(ActsExamplesGeant4 PUBLIC src/GeoModelDetectorConstruction.cpp) -endif() - target_compile_definitions( ActsExamplesGeant4 PUBLIC ${Geant4_DEFINITIONS}) @@ -49,15 +41,19 @@ if (ACTS_BUILD_EXAMPLES_DD4HEP) ActsExamplesGeant4 PUBLIC ActsExamplesDetectorDD4hep DD4hep::DDCore DD4hep::DDG4) endif() + + target_sources(ActsExamplesGeant4 PUBLIC src/DDG4DetectorConstruction.cpp) endif() if (ACTS_BUILD_PLUGIN_GEOMODEL) + target_sources(ActsExamplesGeant4 PUBLIC src/GeoModelDetectorConstruction.cpp) + find_library(GeoModel2G4_LIBRARY GeoModel2G4 REQUIRED) target_link_libraries( ActsExamplesGeant4 - PRIVATE ActsPluginGeoModel ${GeoModel2G4_LIBRARY}) + PUBLIC ActsPluginGeoModel ${GeoModel2G4_LIBRARY}) endif() install( diff --git a/Examples/Algorithms/Geant4/include/ActsExamples/GeoModelG4/GeoModelDetectorConstruction.hpp b/Examples/Algorithms/Geant4/include/ActsExamples/GeoModelG4/GeoModelDetectorConstruction.hpp index 36e23411f07..38bfef2ef8e 100644 --- a/Examples/Algorithms/Geant4/include/ActsExamples/GeoModelG4/GeoModelDetectorConstruction.hpp +++ b/Examples/Algorithms/Geant4/include/ActsExamples/GeoModelG4/GeoModelDetectorConstruction.hpp @@ -8,9 +8,9 @@ #pragma once +#include "Acts/Plugins/GeoModel/GeoModelTree.hpp" #include "ActsExamples/Geant4/DetectorConstructionFactory.hpp" #include "ActsExamples/Geant4/RegionCreator.hpp" -#include #include