From 6a31e30cbfd0b68bdd39d65a21e65531d27164c4 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 21 Nov 2024 22:50:44 +0100 Subject: [PATCH] CMake: repair KDE Frameworks 6 dependencies Be a little more chatty and look for the correct KDE Frameworks for consumers of Calamares (e.g. calamares-extensions). --- CalamaresConfig.cmake.in | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/CalamaresConfig.cmake.in b/CalamaresConfig.cmake.in index 67350352b..5145666b8 100644 --- a/CalamaresConfig.cmake.in +++ b/CalamaresConfig.cmake.in @@ -49,8 +49,12 @@ endmacro() set(Calamares_WITH_QT6 @WITH_QT6@) if(Calamares_WITH_QT6) set(qtname "Qt6") + set(kfname "kf6") + message(STATUS "Calamares was built with Qt6 and KDE Frameworks 6") else() set(qtname "Qt5") + set(kfname "kf5") + message(STATUS "Calamares was built with Qt5 and KDE Frameworks 5 (legacy)") endif() # Qt infrastructure for translations is required @@ -59,14 +63,14 @@ accumulate_deps(qt_required Calamares::calamares ${qtname}::) accumulate_deps(qt_required Calamares::calamaresui ${qtname}::) find_package(${qtname} CONFIG REQUIRED ${qt_required}) -set(kf5_required "") -accumulate_deps(kf5_required Calamares::calamares ${kfname}::) -accumulate_deps(kf5_required Calamares::calamaresui ${kfname}::) -if(kf5_required) +set(kf_required "") +accumulate_deps(kf_required Calamares::calamares ${kfname}::) +accumulate_deps(kf_required Calamares::calamaresui ${kfname}::) +if(kf_required) find_package(ECM ${ECM_VERSION} NO_MODULE) if( ECM_FOUND ) list(INSERT CMAKE_MODULE_PATH 0 ${ECM_MODULE_PATH}) - find_package(${kfname} REQUIRED COMPONENTS ${kf5_required}) + find_package(${kfname} REQUIRED COMPONENTS ${kf_required}) endif() endif()