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 if(@ACTS_USE_SYSTEM_BOOST@)
0056 find_dependency(Boost @Boost_VERSION_STRING@ CONFIG EXACT)
0057 endif()
0058 if(@ACTS_USE_SYSTEM_EIGEN3@)
0059 find_dependency(Eigen3 @Eigen3_VERSION@ CONFIG EXACT)
0060 endif()
0061 if(PluginDD4hep IN_LIST Acts_COMPONENTS)
0062 find_dependency(DD4hep @DD4hep_VERSION@ CONFIG EXACT)
0063 endif()
0064 if(PluginJson IN_LIST Acts_COMPONENTS)
0065 find_dependency(nlohmann_json @nlohmann_json_VERSION@ CONFIG EXACT)
0066 endif()
0067 if(PluginTGeo IN_LIST Acts_COMPONENTS)
0068 find_dependency(ROOT @ROOT_VERSION@ CONFIG EXACT)
0069 endif()
0070 if(PluginActSVG IN_LIST Acts_COMPONENTS)
0071 find_dependency(actsvg @actsvg_VERSION@ CONFIG EXACT)
0072 endif()
0073 if(PluginEDM4hep IN_LIST Acts_COMPONENTS)
0074 find_dependency(EDM4HEP @EDM4HEP_VERSION@ CONFIG EXACT)
0075 endif()
0076 if(PluginPodio IN_LIST Acts_COMPONENTS)
0077 find_dependency(podio @podio_VERSION@ CONFIG EXACT)
0078 endif()
0079
0080 # dependencies that we have built ourselves but cannot be
0081 # straightforwardly handed to cmake
0082 if(NOT @ACTS_USE_SYSTEM_BOOST@)
0083 add_library(Boost::boost INTERFACE IMPORTED GLOBAL)
0084 target_include_directories(Boost::boost INTERFACE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
0085 endif()
0086 if(NOT @ACTS_USE_SYSTEM_EIGEN3@)
0087 add_library(Eigen3::Eigen INTERFACE IMPORTED GLOBAL)
0088 target_include_directories(Eigen3::Eigen INTERFACE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
0089 endif()
0090
0091 # dependencies which cannot be searched in CONFIG mode
0092 if(PluginSycl IN_LIST Acts_COMPONENTS)
0093 find_package(SYCL REQUIRED)
0094 endif()
0095
0096 if(PluginPodio IN_LIST Acts_COMPONENTS)
0097 include(${CMAKE_CURRENT_LIST_DIR}/ActsPodioEdmTargets.cmake)
0098 endif()
0099
0100 # load **all** available components. we can not just include the requested
0101 # components since there can be interdependencies between them.
0102 if(NOT Acts_FIND_QUIETLY)
0103 message(STATUS "loading components:")
0104 endif()
0105 foreach(_component ${Acts_COMPONENTS})
0106 if(NOT Acts_FIND_QUIETLY)
0107 message(STATUS " ${_component}")
0108 endif()
0109 # include the targets file to create the imported targets for the user
0110 include(${CMAKE_CURRENT_LIST_DIR}/Acts${_component}Targets.cmake)
0111 endforeach()
0112