Warning, /DD4hep/cmake/DD4hepConfig.cmake.in is written in an unsupported language. File is not indexed.
0001 ##############################################################################
0002 # cmake configuration file for @CMAKE_PROJECT_NAME@
0003 #
0004 # returns following variables:
0005 #
0006 # @CMAKE_PROJECT_NAME@_FOUND : set to TRUE if @CMAKE_PROJECT_NAME@ found
0007 # @CMAKE_PROJECT_NAME@_VERSION : package version
0008 # @CMAKE_PROJECT_NAME@_ROOT : path to this @CMAKE_PROJECT_NAME@ installation
0009 # @CMAKE_PROJECT_NAME@_LIBRARIES : list of @CMAKE_PROJECT_NAME@ libraries
0010 # @CMAKE_PROJECT_NAME@_INCLUDE_DIRS : list of paths to be used with INCLUDE_DIRECTORIES
0011 # @CMAKE_PROJECT_NAME@_LIBRARY_DIRS : list of paths to be used with LINK_DIRECTORIES
0012 #
0013 # @author Jan Engels, Desy
0014 ##############################################################################
0015
0016 # Locate the @CMAKE_PROJECT_NAME@ install prefix. This CMake file is installed in two
0017 # different locations (root and "cmake" subdir) that we must disambiguate.
0018 get_filename_component(_thisdir "${CMAKE_CURRENT_LIST_FILE}" PATH)
0019 get_filename_component(_lastdir "${_thisdir}" NAME)
0020 if (_lastdir STREQUAL "cmake")
0021 get_filename_component(_thisdir "${_thisdir}" PATH)
0022 endif()
0023
0024 set ( @CMAKE_PROJECT_NAME@_DIR "${_thisdir}" )
0025 set ( @CMAKE_PROJECT_NAME@_ROOT "${_thisdir}" )
0026 set ( @CMAKE_PROJECT_NAME@_VERSION "@DD4hep_VERSION@" )
0027 set ( @CMAKE_PROJECT_NAME@_SOVERSION "@DD4hep_SOVERSION@" )
0028 set ( DD4HEP_BUILD_DEBUG @DD4HEP_BUILD_DEBUG@ )
0029 set ( DD4HEP_USE_GEANT4 @DD4HEP_USE_GEANT4@ )
0030 set ( DD4HEP_USE_CLHEP @DD4HEP_USE_CLHEP@ )
0031 set ( DD4HEP_USE_LCIO @DD4HEP_USE_LCIO@ )
0032 set ( DD4HEP_USE_EDM4HEP @DD4HEP_USE_EDM4HEP@ )
0033 set ( DD4HEP_USE_XERCESC @DD4HEP_USE_XERCESC@ )
0034 set ( DD4HEP_USE_TBB @DD4HEP_USE_TBB@ )
0035 set ( DD4HEP_USE_GEANT4_UNITS @DD4HEP_USE_GEANT4_UNITS@ )
0036 set ( DD4HEP_RELAX_PYVER @DD4HEP_RELAX_PYVER@ )
0037 set ( @CMAKE_PROJECT_NAME@_BUILD_CXX_STANDARD @CMAKE_CXX_STANDARD@ )
0038
0039 include ( ${@CMAKE_PROJECT_NAME@_DIR}/cmake/DD4hep.cmake )
0040
0041 include(CMakeFindDependencyMacro)
0042
0043 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${@CMAKE_PROJECT_NAME@_DIR}/cmake )
0044
0045 # ---------- include dirs -----------------------------------------------------
0046 set(@CMAKE_PROJECT_NAME@_INCLUDE_DIRS "")
0047
0048
0049 FIND_DEPENDENCY(Boost REQUIRED)
0050
0051 if(DD4HEP_USE_GEANT4)
0052 MESSAGE(STATUS "@CMAKE_PROJECT_NAME@ uses Geant4")
0053 IF(DD4HEP_USE_CLHEP)
0054 find_dependency(CLHEP REQUIRED CONFIG)
0055 UNSET(CLHEP_INCLUDE_DIR)
0056 ENDIF()
0057 find_dependency(Geant4 10.2.2 REQUIRED gdml ui_all vis_all CONFIG)
0058 DD4HEP_SETUP_GEANT4_TARGETS()
0059 endif()
0060
0061 FIND_DEPENDENCY(ROOT REQUIRED CONFIG)
0062 DD4HEP_SETUP_ROOT_TARGETS()
0063
0064 if(DD4HEP_USE_LCIO)
0065 MESSAGE(STATUS "@CMAKE_PROJECT_NAME@ uses LCIO")
0066 find_dependency(LCIO REQUIRED CONFIG)
0067 DD4HEP_SETUP_LCIO_TARGETS()
0068 endif()
0069
0070 if(DD4HEP_USE_TBB)
0071 MESSAGE(STATUS "@CMAKE_PROJECT_NAME@ uses TBB")
0072 find_dependency(TBB REQUIRED CONFIG)
0073 endif()
0074
0075 if(NOT CMAKE_PROJECT_NAME STREQUAL @CMAKE_PROJECT_NAME@)
0076 include("${@CMAKE_PROJECT_NAME@_ROOT}/cmake/@CMAKE_PROJECT_NAME@Config-targets.cmake")
0077 endif()
0078
0079 # Backward compatible @CMAKE_PROJECT_NAME@_INCLUDE_DIRS and @CMAKE_PROJECT_NAME@_LIBRARIES variables
0080 GET_TARGET_PROPERTY(@CMAKE_PROJECT_NAME@_INCLUDE_DIRS DD4hep::@DD4HEP_SELECTED_PACKAGE@ INTERFACE_INCLUDE_DIRECTORIES)
0081 set(@CMAKE_PROJECT_NAME@_LIBRARIES DD4hep::@DD4HEP_SELECTED_PACKAGE@)
0082
0083 # Backward compatible @CMAKE_PROJECT_NAME@_COMPONENT_LIBRARIES variable
0084 SET(@CMAKE_PROJECT_NAME@_COMPONENT_LIBRARIES)
0085 IF(@CMAKE_PROJECT_NAME@_FIND_COMPONENTS)
0086 dd4hep_print( "|++> @CMAKE_PROJECT_NAME@: Looking for Components: ${@CMAKE_PROJECT_NAME@_FIND_COMPONENTS}" )
0087 FOREACH(comp ${@CMAKE_PROJECT_NAME@_FIND_COMPONENTS})
0088 IF(NOT TARGET DD4hep::${comp})
0089 MESSAGE(FATAL_ERROR "|++> Did not find required component: ${comp}")
0090 ENDIF()
0091 LIST(APPEND @CMAKE_PROJECT_NAME@_COMPONENT_LIBRARIES DD4hep::${comp})
0092 ENDFOREACH()
0093 ENDIF()
0094
0095 #---- build with xercesc or tinyxml ?
0096 INCLUDE( ${@CMAKE_PROJECT_NAME@_DIR}/cmake/DD4hep_XML_setup.cmake )
0097
0098 # ---------- final checking ---------------------------------------------------
0099 INCLUDE( FindPackageHandleStandardArgs )
0100 # set DD4HEP_FOUND to TRUE if all listed variables are TRUE and not empty
0101 FIND_PACKAGE_HANDLE_STANDARD_ARGS( @CMAKE_PROJECT_NAME@ DEFAULT_MSG @CMAKE_PROJECT_NAME@_DIR @CMAKE_PROJECT_NAME@_INCLUDE_DIRS @CMAKE_PROJECT_NAME@_LIBRARIES )
0102
0103 SET( @CMAKE_PROJECT_NAME@_FOUND ${@CMAKE_PROJECT_NAME@_FOUND} )