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()