Back to home page

EIC code displayed by LXR

 
 

    


Warning, /DD4hep/DDRec/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 # Author: F.Gaede (Desy)
0011 #
0012 #==========================================================================
0013 SET_PROPERTY(DIRECTORY . PROPERTY PACKAGE_NAME DDRec)
0014 dd4hep_print("|++> Will build DDRec")
0015 dd4hep_add_dictionary( G__DDRec
0016   SOURCES ../DDCore/include/ROOT/Warnings.h
0017   GENERATED src/RecDictionary.h
0018   LINKDEF ../DDCore/include/ROOT/LinkDef.h
0019   USES DD4hep::DDCore DD4hep::DDParsers
0020 )
0021 
0022 file(GLOB DDRec_SOURCES src/*.cpp )
0023 
0024 if(DD4HEP_USE_GEAR)
0025   dd4hep_print("|++++> Adding gear to DDRec")
0026   FIND_PACKAGE(GEAR REQUIRED COMPONENTS geartgeo)
0027   SET(GEAR_SOURCE_FILE src/gear/DDGear.cpp)
0028 endif()
0029 
0030 ADD_LIBRARY(DDRec
0031   ${DDRec_SOURCES}
0032   ${GEAR_SOURCE_FILE}
0033   G__DDRec.cxx
0034   )
0035 ADD_LIBRARY(DD4hep::DDRec ALIAS DDRec)
0036 
0037 TARGET_INCLUDE_DIRECTORIES(DDRec
0038   PUBLIC
0039   $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
0040   $<INSTALL_INTERFACE:include>
0041   )
0042 
0043 TARGET_LINK_LIBRARIES(DDRec PUBLIC
0044   DD4hep::DDCore
0045   ${GEAR_LIBRARIES}
0046   ${GEAR_COMPONENT_LIBRARIES}
0047   )
0048 
0049 if(GEAR_FOUND)
0050   FOREACH(GEAR_INC_DIR ${GEAR_INCLUDE_DIRS})
0051     TARGET_INCLUDE_DIRECTORIES(DDRec
0052       SYSTEM PUBLIC
0053       $<BUILD_INTERFACE:${GEAR_INC_DIR}>
0054       )
0055   ENDFOREACH()
0056   SET(DDREC_PLUGIN_GEAR
0057     src/gear/createGearForILD.cpp
0058     src/gear/createGearForCLIC.cpp
0059     src/gear/createGearForSiD.cpp)
0060 endif()
0061   
0062 
0063 dd4hep_add_plugin(DDRecPlugins
0064   SOURCES src/plugins/*.cpp ${DDREC_PLUGIN_GEAR}
0065   USES DDRec
0066 )
0067 
0068 if(DD4HEP_USE_GEAR)
0069   add_executable(convertToGear src/convertToGear.cc)
0070   target_link_libraries(convertToGear ${GEAR_LIBRARIES} ${GEAR_COMPONENT_LIBRARIES} DDRec)
0071 endif()
0072 
0073 set_target_properties(DDRec DDRecPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
0074 
0075 file(GLOB DDRec_python python/*.py)
0076 install(FILES ${DDRec_python} DESTINATION ${DD4HEP_PYTHON_INSTALL_DIR})
0077 install(DIRECTORY include/DDRec DESTINATION include)
0078 install(TARGETS DDRec DDRecPlugins EXPORT DD4hep
0079   ARCHIVE DESTINATION lib
0080   LIBRARY DESTINATION lib
0081   )