Warning, /DD4hep/DDEve/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 #==========================================================================
0002 # AIDA Detector description implementation
0003 #--------------------------------------------------------------------------
0004 # Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 # All rights reserved.
0006 #
0007 # For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 # For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 #
0010 #==========================================================================
0011 SET_PROPERTY(DIRECTORY . PROPERTY PACKAGE_NAME DDEve)
0012
0013 add_library(DDEve_Interface INTERFACE)
0014 add_library(DD4hep::DDEve_Interface ALIAS DDEve_Interface)
0015 target_include_directories(DDEve_Interface
0016 INTERFACE
0017 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
0018 $<INSTALL_INTERFACE:include>
0019 )
0020
0021 if(NOT TARGET ROOT::Eve)
0022 MESSAGE(STATUS "ROOT::Eve not found: not building DDEve")
0023 return()
0024 endif()
0025
0026 target_link_libraries(DDEve_Interface INTERFACE ROOT::Core ROOT::Rint ROOT::Eve ROOT::Gui ROOT::Graf3d ROOT::RGL ROOT::EG)
0027 if(ROOT_VERSION VERSION_GREATER_EQUAL 6.27.00)
0028 target_link_libraries(DDEve_Interface INTERFACE ROOT::ROOTGeomViewer)
0029 endif()
0030
0031
0032 dd4hep_add_dictionary(G__DDEve
0033 SOURCES ../DDCore/include/ROOT/Warnings.h include/DDEve/*.h
0034 EXCLUDE include/DDEve/Utilities.h
0035 include/DDEve/ParticleActors.h
0036 include/DDEve/HitActors.h
0037 include/DDEve/Factories.h
0038 LINKDEF ../DDCore/include/ROOT/LinkDef.h
0039 USES DD4hep::DDCore
0040 )
0041
0042 if(TARGET ROOT::ROOTEve)
0043 dd4hep_print("Building the web display using ROOT7")
0044 SET(DDEVE_ROOT7_SOURCES root7/WebDisplay.cpp)
0045 SET(DDEVE_ROOT7_LINK ROOT::ROOTEve)
0046 endif()
0047
0048 if(TARGET LCIO::lcio)
0049 SET(DDEVE_LCIO_SOURCES lcio/LCIOEventHandler.cpp)
0050 SET(DDEVE_LCIO_LINK LCIO::lcio)
0051 endif()
0052
0053 dd4hep_add_plugin(DDEvePlugins SOURCES src/*.cpp ${DDEVE_LCIO_SOURCES} ${DDEVE_ROOT7_SOURCES}
0054 GENERATED G__DDEve.cxx
0055 USES DD4hep::DDCore DD4hep::DDEve_Interface ${DDEVE_LCIO_LINK} ${DDEVE_ROOT7_LINK}
0056 )
0057
0058 if(DD4HEP_USE_GEANT4)
0059 dd4hep_add_dictionary(G__DDG4IO
0060 SOURCES ../DDCore/include/ROOT/Warnings.h DDEve/DDG4IO.C
0061 LINKDEF ../DDCore/include/ROOT/LinkDef.h
0062 USES DD4hep::DDG4
0063 )
0064 add_library(DDG4IO DDEve/IO.cpp G__DDG4IO.cxx)
0065 target_link_libraries(DDG4IO DD4hep::DDG4 DD4hep::DDEve_Interface)
0066 set_target_properties(DDG4IO PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
0067 install(TARGETS DDG4IO EXPORT DD4hep
0068 LIBRARY DESTINATION lib
0069 ARCHIVE DESTINATION lib
0070 )
0071 endif()
0072
0073 add_executable(ddeve DDEve/DDEve.cpp)
0074 target_link_libraries(ddeve DDEve_Interface)
0075
0076
0077 set_target_properties(DDEvePlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
0078
0079
0080 install(DIRECTORY DDEve DESTINATION examples )
0081 install(DIRECTORY include/DDEve DESTINATION include)
0082 install(TARGETS ddeve DDEvePlugins DDEve_Interface EXPORT DD4hep
0083 ARCHIVE DESTINATION lib
0084 LIBRARY DESTINATION lib
0085 RUNTIME DESTINATION bin
0086 )