Warning, /acts/cmake/ActsConfig.cmake.in is written in an unsupported language. File is not indexed.
0001 # CMake config for the Acts package
0002 #
0003 # Defines CMake targets for requested and available components. All additional
0004 # information, e.g. include directories and dependencies, are defined as
0005 # target-specific properties and are automatically propagated when linking to
0006 # the target.
0007 #
0008 # Defines the following additional variables:
0009 #
0010 # - Acts_COMPONENTS
0011 # - Acts_COMMIT_HASH
0012 # - Acts_COMMIT_HASH_SHORT
0013
0014 @PACKAGE_INIT@
0015
0016 set(Acts_COMPONENTS @_components@)
0017 set(Acts_COMMIT_HASH "@_acts_commit_hash@")
0018 set(Acts_COMMIT_HASH_SHORT "@_acts_commit_hash_short@")
0019 set(ACTS_GEOMETRY_MODULE_ABI_TAG "@ACTS_GEOMETRY_MODULE_ABI_TAG@")
0020
0021 # print version and components information
0022 if(NOT Acts_FIND_QUIETLY)
0023 message(
0024 STATUS
0025 "Found ACTS version ${Acts_VERSION} commit ${Acts_COMMIT_HASH_SHORT}"
0026 )
0027 endif()
0028
0029 # check that requested components are available
0030 foreach(_component ${Acts_FIND_COMPONENTS})
0031 # check if this component is available
0032 if(NOT _component IN_LIST Acts_COMPONENTS)
0033 if(${Acts_FIND_REQUIRED_${_component}})
0034 # not supported, but required -> fail
0035 set(Acts_FOUND False)
0036 set(Acts_NOT_FOUND_MESSAGE
0037 "required component '${_component}' not found"
0038 )
0039 else()
0040 # not supported and optional -> skip
0041 list(REMOVE_ITEM Acts_FIND_COMPONENTS ${_component})
0042 if(NOT Acts_FIND_QUIETLY)
0043 message(STATUS "optional component '${_component}' not found")
0044 endif()
0045 endif()
0046 endif()
0047 endforeach()
0048
0049 # add this to the current CMAKE_MODULE_PATH to find third party modules
0050 # that not provide a XXXConfig.cmake or XXX-config.cmake file, and to allow
0051 # including Acts-provided cmake helpers (e.g. ActsDD4hepGeometryModuleHelpers)
0052 list(
0053 APPEND CMAKE_MODULE_PATH
0054 ${CMAKE_CURRENT_LIST_DIR}/Modules
0055 ${CMAKE_CURRENT_LIST_DIR}
0056 )
0057
0058 # find external dependencies that are needed to link with Acts. since the
0059 # exported Acts targets only store the linked external target names they need
0060 # to be found again. this avoids hard-coded paths and makes the installed
0061 # config/library relocatable. use exact version match where possible to ensure
0062 # the same versions are found that were used at build time.
0063 # `find_dependency` is a wrapper around `find_package` that automatically
0064 # handles QUIET and REQUIRED parameters.
0065 include(CMakeFindDependencyMacro)
0066 find_dependency(Boost @Boost_VERSION_STRING@ CONFIG EXACT)
0067 if(@ACTS_USE_SYSTEM_EIGEN3@)
0068 find_dependency(Eigen3 @Eigen3_VERSION@ CONFIG EXACT)
0069 endif()
0070 if(PluginDD4hep IN_LIST Acts_COMPONENTS)
0071 find_dependency(DD4hep @DD4hep_VERSION@ CONFIG EXACT)
0072 endif()
0073 if(PluginJson IN_LIST Acts_COMPONENTS)
0074 find_dependency(nlohmann_json @nlohmann_json_VERSION@ CONFIG EXACT)
0075 endif()
0076 if(PluginRoot IN_LIST Acts_COMPONENTS)
0077 find_dependency(ROOT @ROOT_VERSION@ CONFIG EXACT)
0078 endif()
0079 if(PluginActSVG IN_LIST Acts_COMPONENTS)
0080 find_dependency(actsvg @actsvg_VERSION@ CONFIG EXACT)
0081 endif()
0082 if(PluginEDM4hep IN_LIST Acts_COMPONENTS)
0083 find_dependency(EDM4HEP @EDM4HEP_VERSION@ CONFIG EXACT)
0084 find_dependency(podio @podio_VERSION@ CONFIG EXACT)
0085 endif()
0086 if(PluginGeoModel IN_LIST Acts_COMPONENTS)
0087 find_dependency(GeoModelCore @GeoModelCore_VERSION@ CONFIG EXACT)
0088 find_dependency(GeoModelIO @GeoModelIO_VERSION@ CONFIG EXACT)
0089 endif()
0090 if(PluginHashing IN_LIST Acts_COMPONENTS)
0091 find_dependency(Annoy @ANNOY_VERSION@ CONFIG EXACT)
0092 endif()
0093
0094 # dependencies that we have built ourselves but cannot be
0095 # straightforwardly handed to cmake
0096 if(NOT @ACTS_USE_SYSTEM_EIGEN3@)
0097 add_library(Eigen3::Eigen INTERFACE IMPORTED GLOBAL)
0098 target_include_directories(
0099 Eigen3::Eigen
0100 INTERFACE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}"
0101 )
0102 endif()
0103
0104 if(PluginEDM4hep IN_LIST Acts_COMPONENTS)
0105 include(${CMAKE_CURRENT_LIST_DIR}/ActsPodioEdmTargets.cmake)
0106 endif()
0107
0108 if(PluginDetray IN_LIST Acts_COMPONENTS)
0109 find_dependency(vecmem @vecmem_VERSION@ CONFIG EXACT)
0110 find_dependency(covfie @covfie_VERSION@ CONFIG EXACT)
0111 find_dependency(actsvg @actsvg_VERSION@ CONFIG EXACT)
0112 find_dependency(detray @detray_VERSION@ CONFIG EXACT)
0113 endif()
0114
0115 if(PluginCovfie IN_LIST Acts_COMPONENTS)
0116 find_dependency(covfie @covfie_VERSION@ CONFIG EXACT)
0117 endif()
0118
0119 # load **all** available components. we can not just include the requested
0120 # components since there can be interdependencies between them.
0121 if(NOT Acts_FIND_QUIETLY)
0122 message(STATUS "loading components:")
0123 endif()
0124 foreach(_component ${Acts_COMPONENTS})
0125 if(NOT Acts_FIND_QUIETLY)
0126 message(STATUS " ${_component}")
0127 endif()
0128 # include the targets file to create the imported targets for the user
0129 include(${CMAKE_CURRENT_LIST_DIR}/Acts${_component}Targets.cmake)
0130 endforeach()