diff --git a/CMakeLists.txt b/CMakeLists.txt index 86c28c0..6e0bfff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,21 @@ if (BUILD_TESTING) add_subdirectory(tests) endif() +set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6ImageFormats") + +include(CMakePackageConfigHelpers) +configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/KF6ImageFormatsConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/KF6ImageFormatsConfig.cmake" + INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_DIR}" +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/KF6ImageFormatsConfig.cmake" + DESTINATION "${CMAKECONFIG_INSTALL_DIR}" + COMPONENT Devel +) + include(ECMFeatureSummary) ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/KF6ImageFormatsConfig.cmake.in b/KF6ImageFormatsConfig.cmake.in new file mode 100644 index 0000000..d8eb10c --- /dev/null +++ b/KF6ImageFormatsConfig.cmake.in @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2025 Xaver Hugl +# SPDX-License-Identifier: BSD-2-Clause + +@PACKAGE_INIT@ +# empty, because this is plugins for Qt instead of a library to link against