Warning, /acts/Examples/Detectors/DD4hepDetector/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 add_library(
0002 ActsExamplesDetectorDD4hep
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
0015 ActsCore
0016 ActsPluginDD4hep
0017 ActsExamplesFramework
0018 ActsExamplesDetectorsCommon
0019 )
0020
0021 if(ACTS_BUILD_EXAMPLES_GEANT4)
0022 if(${DD4hep_VERSION} VERSION_LESS 1.11)
0023 target_link_libraries(
0024 ActsExamplesDetectorDD4hep
0025 PUBLIC ActsExamplesGeant4 ${DD4hep_DDG4_LIBRARY}
0026 )
0027 else()
0028 target_link_libraries(
0029 ActsExamplesDetectorDD4hep
0030 PUBLIC ActsExamplesGeant4 DD4hep::DDG4
0031 )
0032 endif()
0033
0034 target_sources(
0035 ActsExamplesDetectorDD4hep
0036 PUBLIC src/DDG4DetectorConstruction.cpp src/DD4hepDetectorGeant4.cpp
0037 )
0038 else()
0039 target_sources(
0040 ActsExamplesDetectorDD4hep
0041 PUBLIC src/DD4hepDetectorGeant4Stub.cpp
0042 )
0043 endif()
0044
0045 if(${DD4hep_VERSION} VERSION_LESS 1.11)
0046 target_include_directories(
0047 ActsExamplesDetectorDD4hep
0048 PUBLIC ${DD4hep_INCLUDE_DIRS}
0049 )
0050 target_link_libraries(
0051 ActsExamplesDetectorDD4hep
0052 PUBLIC ${DD4hep_DDCORE_LIBRARY}
0053 )
0054 else()
0055 target_link_libraries(ActsExamplesDetectorDD4hep PUBLIC DD4hep::DDCore)
0056 endif()
0057
0058 # not sure why this needs to be set, but dd4hep fails to compile otherwise
0059 set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
0060 set_target_properties(
0061 ActsExamplesDetectorDD4hep
0062 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
0063 )
0064 dd4hep_set_version(ActsExamplesDetectorDD4hep MAJOR 1 MINOR 0 PATCH 0)
0065 dd4hep_generate_rootmap(ActsExamplesDetectorDD4hep)
0066
0067 install(
0068 TARGETS ActsExamplesDetectorDD4hep
0069 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
0070 )