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
0020 # print version and components information
0021 if(NOT Acts_FIND_QUIETLY)
0022 message(STATUS "found Acts version ${Acts_VERSION} commit ${Acts_COMMIT_HASH_SHORT}")
0023 endif()
0024
0025 # check that requested components are available
0026 foreach(_component ${Acts_FIND_COMPONENTS})
0027 # check if this component is available
0028 if(NOT _component IN_LIST Acts_COMPONENTS)
0029 if (${Acts_FIND_REQUIRED_${_component}})
0030 # not supported, but required -> fail
0031 set(Acts_FOUND False)
0032 set(Acts_NOT_FOUND_MESSAGE "required component '${_component}' not found")
0033 else()
0034 # not supported and optional -> skip
0035 list(REMOVE_ITEM Acts_FIND_COMPONENTS ${_component})
0036 if(NOT Acts_FIND_QUIETLY)
0037 message(STATUS "optional component '${_component}' not found")
0038 endif()
0039 endif()
0040 endif()
0041 endforeach()
0042
0043 # add this to the current CMAKE_MODULE_PATH to find third party modules
0044 # that not provide a XXXConfig.cmake or XXX-config.cmake file
0045 list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/Modules)
0046
0047 # find external dependencies that are needed to link with Acts. since the
0048 # exported Acts targets only store the linked external target names they need
0049 # to be found again. this avoids hard-coded paths and makes the installed
0050 # config/library relocatable. use exact version match where possible to ensure
0051 # the same versions are found that were used at build time.
0052 # `find_dependency` is a wrapper around `find_package` that automatically
0053 # handles QUIET and REQUIRED parameters.
0054 include(CMakeFindDependencyMacro)
0055 find_dependency(Boost @Boost_VERSION_STRING@ CONFIG EXACT)
0056 if(@ACTS_USE_SYSTEM_EIGEN3@)
0057 find_dependency(Eigen3 @Eigen3_VERSION@ CONFIG EXACT)
0058 endif()
0059 if(PluginDD4hep IN_LIST Acts_COMPONENTS)
0060 find_dependency(DD4hep @DD4hep_VERSION@ CONFIG EXACT)
0061 endif()
0062 if(PluginJson IN_LIST Acts_COMPONENTS)
0063 find_dependency(nlohmann_json @nlohmann_json_VERSION@ CONFIG EXACT)
0064 endif()
0065 if(PluginRoot IN_LIST Acts_COMPONENTS)
0066 find_dependency(ROOT @ROOT_VERSION@ CONFIG EXACT)
0067 endif()
0068 if(PluginActSVG IN_LIST Acts_COMPONENTS)
0069 find_dependency(actsvg @actsvg_VERSION@ CONFIG EXACT)
0070 endif()
0071 if(PluginEDM4hep IN_LIST Acts_COMPONENTS)
0072 find_dependency(EDM4HEP @EDM4HEP_VERSION@ CONFIG EXACT)
0073 endif()
0074 if(PluginPodio IN_LIST Acts_COMPONENTS)
0075 find_dependency(podio @podio_VERSION@ CONFIG EXACT)
0076 endif()
0077 if(PluginGeoModel IN_LIST Acts_COMPONENTS)
0078 find_dependency(GeoModelCore @GeoModelCore_VERSION@ CONFIG EXACT)
0079 find_dependency(GeoModelIO @GeoModelIO_VERSION@ CONFIG EXACT)
0080 endif()
0081 if (PluginHashing IN_LIST Acts_COMPONENTS)
0082 find_dependency(Annoy @ANNOY_VERSION@ CONFIG EXACT)
0083 endif()
0084 if (PluginExaTrkX IN_LIST Acts_COMPONENTS)
0085 if (@ACTS_EXATRKX_ENABLE_TORCH@)
0086 find_dependency(Torch CONFIG)
0087 endif()
0088 if (@ACTS_EXATRKX_ENABLE_CUDA@)
0089 enable_language(CUDA)
0090 find_dependency(CUDAToolkit)
0091 endif()
0092 if (@ACTS_EXATRKX_ENABLE_MODULEMAP@)
0093 find_dependency(ModuleMapGraph CONFIG)
0094 endif()
0095 if (@ACTS_EXATRKX_ENABLE_ONNX@)
0096 find_dependency(onnxruntime @_acts_onnxruntime_version@)
0097 endif()
0098 if (@ACTS_EXATRKX_ENABLE_TENSORRT@)
0099 find_dependency(TensorRT)
0100 endif()
0101 endif()
0102
0103 # dependencies that we have built ourselves but cannot be
0104 # straightforwardly handed to cmake
0105 if(NOT @ACTS_USE_SYSTEM_EIGEN3@)
0106 add_library(Eigen3::Eigen INTERFACE IMPORTED GLOBAL)
0107 target_include_directories(Eigen3::Eigen INTERFACE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
0108 endif()
0109
0110 if(PluginPodio IN_LIST Acts_COMPONENTS)
0111 include(${CMAKE_CURRENT_LIST_DIR}/ActsPodioEdmTargets.cmake)
0112 endif()
0113
0114 if(PluginDetray IN_LIST Acts_COMPONENTS)
0115 find_dependency(vecmem @vecmem_VERSION@ CONFIG EXACT)
0116 find_dependency(covfie @cofvie_VERSION@ CONFIG EXACT)
0117 find_dependency(algebra-plugins @algebra-plugins_VERSION@ CONFIG EXACT)
0118 find_dependency(actsvg @actsvg_VERSION@ CONFIG EXACT)
0119 find_dependency(detray @detray_VERSION@ CONFIG EXACT)
0120 endif()
0121
0122 if (PluginCovfie IN_LIST Acts_COMPONENTS)
0123 find_dependency(covfie @covfie_VERSION@ CONFIG EXACT)
0124 endif()
0125
0126 # load **all** available components. we can not just include the requested
0127 # components since there can be interdependencies between them.
0128 if(NOT Acts_FIND_QUIETLY)
0129 message(STATUS "loading components:")
0130 endif()
0131 foreach(_component ${Acts_COMPONENTS})
0132 if(NOT Acts_FIND_QUIETLY)
0133 message(STATUS " ${_component}")
0134 endif()
0135 # include the targets file to create the imported targets for the user
0136 include(${CMAKE_CURRENT_LIST_DIR}/Acts${_component}Targets.cmake)
0137 endforeach()