Skip to content

Commit 54fd25b

Browse files
authored
Simplify finding DD4hep in CMakeLists.txt to fix builds on MacOS (#44)
1 parent c901633 commit 54fd25b

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

CMakeLists.txt

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ set(CMAKE_MODULE_PATH
1111
# Use GNU-style hierarchy for installing build products
1212
include(GNUInstallDirs)
1313

14-
find_package(ROOT REQUIRED)
15-
find_package(podio REQUIRED HINTS $ENV{PODIO})
16-
find_package(Gaudi REQUIRED)
17-
find_package(EDM4HEP)
18-
find_package(k4FWCore REQUIRED)
19-
find_package(sipm REQUIRED)
20-
2114
#----------------------------------------------------------------------------
2215
# Find Geant4 package, activating all available UI and Vis drivers by default
2316
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
@@ -30,15 +23,17 @@ else()
3023
find_package(Geant4 REQUIRED)
3124
endif()
3225

33-
IF(NOT TARGET DD4hep::DDCore)
34-
find_package ( DD4hep REQUIRED )
35-
include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
36-
include ( ${DD4hep_DIR}/cmake/DD4hepBuild.cmake )
37-
dd4hep_configure_output()
38-
ENDIF()
39-
26+
find_package ( DD4hep REQUIRED )
4027
dd4hep_set_compiler_flags()
41-
dd4hep_configure_output()
28+
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
29+
30+
31+
find_package(ROOT REQUIRED)
32+
find_package(podio REQUIRED HINTS $ENV{PODIO})
33+
find_package(Gaudi REQUIRED)
34+
find_package(EDM4HEP)
35+
find_package(k4FWCore REQUIRED)
36+
find_package(sipm REQUIRED)
4237

4338
set(BOOST_ROOT "$ENV{BOOST_ROOT}")
4439

0 commit comments

Comments
 (0)