Back to home page

EIC code displayed by LXR

 
 

    


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   find_dependency(podio @podio_VERSION@ CONFIG EXACT)
0074 endif()
0075 if(PluginGeoModel IN_LIST Acts_COMPONENTS)
0076   find_dependency(GeoModelCore @GeoModelCore_VERSION@ CONFIG EXACT)
0077   find_dependency(GeoModelIO @GeoModelIO_VERSION@ CONFIG EXACT)
0078 endif()
0079 if (PluginHashing IN_LIST Acts_COMPONENTS)
0080   find_dependency(Annoy @ANNOY_VERSION@ CONFIG EXACT)
0081 endif()
0082 if (PluginGnn IN_LIST Acts_COMPONENTS)
0083   if (@ACTS_GNN_ENABLE_TORCH@)
0084     find_dependency(Torch CONFIG)
0085   endif()
0086   if (@ACTS_GNN_ENABLE_CUDA@)
0087     enable_language(CUDA)
0088     find_dependency(CUDAToolkit)
0089   endif()
0090   if (@ACTS_GNN_ENABLE_MODULEMAP@)
0091     find_dependency(ModuleMapGraph CONFIG)
0092   endif()
0093   if (@ACTS_GNN_ENABLE_ONNX@)
0094     find_dependency(onnxruntime @_acts_onnxruntime_version@)
0095   endif()
0096   if (@ACTS_GNN_ENABLE_TENSORRT@)
0097     find_dependency(TensorRT)
0098   endif()
0099 endif()
0100 
0101 # dependencies that we have built ourselves but cannot be
0102 # straightforwardly handed to cmake
0103 if(NOT @ACTS_USE_SYSTEM_EIGEN3@)
0104   add_library(Eigen3::Eigen INTERFACE IMPORTED GLOBAL)
0105   target_include_directories(Eigen3::Eigen INTERFACE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
0106 endif()
0107 
0108 if(PluginEDM4hep IN_LIST Acts_COMPONENTS)
0109   include(${CMAKE_CURRENT_LIST_DIR}/ActsPodioEdmTargets.cmake)
0110 endif()
0111 
0112 if(PluginDetray IN_LIST Acts_COMPONENTS)
0113   find_dependency(vecmem @vecmem_VERSION@ CONFIG EXACT)
0114   find_dependency(covfie @cofvie_VERSION@ CONFIG EXACT)
0115   find_dependency(algebra-plugins @algebra-plugins_VERSION@ CONFIG EXACT)
0116   find_dependency(actsvg @actsvg_VERSION@ CONFIG EXACT)
0117   find_dependency(detray @detray_VERSION@ CONFIG EXACT)
0118 endif()
0119 
0120 if (PluginCovfie IN_LIST Acts_COMPONENTS)
0121   find_dependency(covfie @covfie_VERSION@ CONFIG EXACT)
0122 endif()
0123 
0124 # load **all** available components. we can not just include the requested
0125 # components since there can be interdependencies between them.
0126 if(NOT Acts_FIND_QUIETLY)
0127   message(STATUS "loading components:")
0128 endif()
0129 foreach(_component ${Acts_COMPONENTS})
0130   if(NOT Acts_FIND_QUIETLY)
0131     message(STATUS "  ${_component}")
0132   endif()
0133   # include the targets file to create the imported targets for the user
0134   include(${CMAKE_CURRENT_LIST_DIR}/Acts${_component}Targets.cmake)
0135 endforeach()