Warning, /acts/Examples/Detectors/DD4hepDetector/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 acts_add_library(
0002 ExamplesDetectorDD4hep
0003 SHARED
0004 src/DD4hepDetector.cpp
0005 src/AlignedDD4hepDetectorElement.cpp
0006 )
0007
0008 target_include_directories(
0009 ActsExamplesDetectorDD4hep
0010 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
0011 )
0012 target_link_libraries(
0013 ActsExamplesDetectorDD4hep
0014 PUBLIC Acts::PluginDD4hep Acts::ExamplesDetectorsCommon
0015 )
0016
0017 if(ACTS_BUILD_EXAMPLES_GEANT4)
0018 if(${DD4hep_VERSION} VERSION_LESS 1.11)
0019 target_link_libraries(
0020 ActsExamplesDetectorDD4hep
0021 PUBLIC Acts::ExamplesGeant4 ${DD4hep_DDG4_LIBRARY}
0022 )
0023 else()
0024 target_link_libraries(
0025 ActsExamplesDetectorDD4hep
0026 PUBLIC Acts::ExamplesGeant4 DD4hep::DDG4
0027 )
0028 endif()
0029
0030 target_sources(
0031 ActsExamplesDetectorDD4hep
0032 PUBLIC src/DDG4DetectorConstruction.cpp src/DD4hepDetectorGeant4.cpp
0033 )
0034 else()
0035 target_sources(
0036 ActsExamplesDetectorDD4hep
0037 PUBLIC src/DD4hepDetectorGeant4Stub.cpp
0038 )
0039 endif()
0040
0041 if(${DD4hep_VERSION} VERSION_LESS 1.11)
0042 target_include_directories(
0043 ActsExamplesDetectorDD4hep
0044 PUBLIC ${DD4hep_INCLUDE_DIRS}
0045 )
0046 target_link_libraries(
0047 ActsExamplesDetectorDD4hep
0048 PUBLIC ${DD4hep_DDCORE_LIBRARY}
0049 )
0050 else()
0051 target_link_libraries(ActsExamplesDetectorDD4hep PUBLIC DD4hep::DDCore)
0052 endif()
0053
0054 # not sure why this needs to be set, but dd4hep fails to compile otherwise
0055 set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
0056 set_target_properties(
0057 ActsExamplesDetectorDD4hep
0058 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
0059 )