From: Kevin Albertson Date: Sat, 13 Jan 2024 23:18:15 +0000 (-0500) Subject: create and install package config file X-Git-Tag: archive/raspbian/2.11.3-2+rpi1^2~10^2^2~29^2~14 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bd73cd02bbae9fa9f430ac1841a3ae10d6be0a89;p=utf8proc.git create and install package config file --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 61da950..ff94dc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,17 @@ if (UTF8PROC_INSTALL) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libutf8proc.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") # Install CMake targets file. install(EXPORT utf8proc-targets FILE utf8proc-targets.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/utf8proc" NAMESPACE utf8proc::) + include (CMakePackageConfigHelpers) + configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/utf8proc-config.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/utf8proc-config.cmake" + INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/utf8proc" + NO_SET_AND_CHECK_MACRO + ) + install (FILES + "${CMAKE_CURRENT_BINARY_DIR}/utf8proc-config.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/utf8proc" + ) endif() diff --git a/cmake/utf8proc-config.cmake.in b/cmake/utf8proc-config.cmake.in new file mode 100644 index 0000000..b9149bc --- /dev/null +++ b/cmake/utf8proc-config.cmake.in @@ -0,0 +1,5 @@ +@PACKAGE_INIT@ +include("${CMAKE_CURRENT_LIST_DIR}/utf8proc-targets.cmake") +# `check_required_components` is used to ensure consumer did not erroneously request components. +# No components are currently defined. +check_required_components(utf8proc)