Back to home page

EIC code displayed by LXR

 
 

    


Warning, /algorithms/cmake/algorithmsConfig.cmake.in is written in an unsupported language. File is not indexed.

0001 # CMake config for the algorithms 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 @PACKAGE_INIT@
0009 
0010 set(algorithms_COMPONENTS @_components@)
0011 
0012 # print version and components information
0013 if(NOT algorithms_FIND_QUIETLY)
0014   message(STATUS "found algorithms version ${algorithms_VERSION}")
0015 endif()
0016 
0017 # check that requested components are available
0018 foreach(_component ${algorithms_FIND_COMPONENTS})
0019   # check if this component is available
0020   if(NOT _component IN_LIST algorithms_COMPONENTS)
0021     if (${algorithms_FIND_REQUIRED_${_component}})
0022       # not supported, but required -> fail
0023       set(algorithms_FOUND False)
0024       set(algorithms_NOT_FOUND_MESSAGE "required component '${_component}' not found")
0025     else()
0026       # not supported and optional -> skip
0027       list(REMOVE_ITEM algorithms_FIND_COMPONENTS ${_component})
0028       if(NOT algorithms_FIND_QUIETLY)
0029         message(STATUS "optional component '${_component}' not found")
0030       endif()
0031     endif()
0032   endif()
0033 endforeach()
0034 
0035 # find external dependencies that are needed to link with algorithms. since the
0036 # exported algorithms targets only store the linked external target names they need
0037 # to be found again. this avoids hard-coded paths and makes the installed
0038 # config/library relocatable. use exact version match where possible to ensure
0039 # the same versions are found that were used at build time.
0040 # `find_dependency` is a wrapper around `find_package` that automatically
0041 # handles QUIET and REQUIRED parameters.
0042 include(CMakeFindDependencyMacro)
0043 find_dependency(fmt @fmt_VERSION@ CONFIG EXACT)
0044 if(Acts IN_LIST algorithms_COMPONENTS)
0045   find_dependency(Acts @Acts_VERSION@ CONFIG EXACT)
0046 endif()
0047 
0048 # load **all** available components. we can not just include the requested
0049 # components since there can be interdependencies between them.
0050 if(NOT algorithms_FIND_QUIETLY)
0051   message(STATUS "loading components:")
0052 endif()
0053 foreach(_component ${algorithms_COMPONENTS})
0054   if(NOT algorithms_FIND_QUIETLY)
0055     message(STATUS "  ${_component}")
0056   endif()
0057   # include the targets file to create the imported targets for the user
0058   include(${CMAKE_CURRENT_LIST_DIR}/algorithms${_component}Targets.cmake)
0059   # create backwards compatible alias
0060   string(TOLOWER ${_component} _component_LOWER)
0061   if(NOT TARGET algorithms::algo${_component_LOWER})
0062     add_library(algorithms::algo${_component_LOWER} ALIAS algorithms::${_component_LOWER})
0063   endif()
0064 endforeach()