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