Warning, /algorithms/cmake/algorithmsCreatePackageConfig.cmake is written in an unsupported language. File is not indexed.
0001 # Create relocatable CMake package config files
0002
0003 include(CMakePackageConfigHelpers)
0004
0005 # use path suggested by
0006 # https://cmake.org/cmake/help/v3.18/manual/cmake-packages.7.html
0007 set(install_package_config_dir "${CMAKE_INSTALL_LIBDIR}/cmake/algorithms")
0008
0009 # version is taken automatically from PROJECT_VERSION; no need to specify
0010 write_basic_package_version_file(
0011 ${PROJECT_BINARY_DIR}/algorithmsConfigVersion.cmake
0012 COMPATIBILITY SameMajorVersion)
0013 configure_package_config_file(
0014 ${CMAKE_CURRENT_LIST_DIR}/algorithmsConfig.cmake.in
0015 ${PROJECT_BINARY_DIR}/algorithmsConfig.cmake
0016 INSTALL_DESTINATION ${install_package_config_dir}
0017 PATH_VARS CMAKE_INSTALL_BINDIR CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR)
0018
0019 # install cmake package configs
0020 install(
0021 FILES
0022 ${PROJECT_BINARY_DIR}/algorithmsConfigVersion.cmake
0023 ${PROJECT_BINARY_DIR}/algorithmsConfig.cmake
0024 DESTINATION ${install_package_config_dir})
0025
0026 # install target configs for all available components
0027 foreach(_component ${_components})
0028 install(
0029 EXPORT algorithms${_component}Targets
0030 NAMESPACE algorithms::
0031 DESTINATION ${install_package_config_dir})
0032 endforeach()