From 0215f227c3a70d1d2d3a35d692bb7a71df686d57 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 13 Nov 2023 23:29:38 +0100 Subject: [PATCH] Fix configuring against Plasma 6 As of version 6 Plasma does not seem to pull-in its own dependencies automatically. This might be a bug. For now, let's just workaround it by pulling-in the dependencies manually. This fixes the error `The link interface of target "KF6::Plasma" contains: KF6::ConfigCore but the target was not found.`. --- plasmoid/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plasmoid/CMakeLists.txt b/plasmoid/CMakeLists.txt index 10a3ae5..e1eeaa4 100644 --- a/plasmoid/CMakeLists.txt +++ b/plasmoid/CMakeLists.txt @@ -11,8 +11,12 @@ set(META_QT5_VERSION 5.8) # use testfiles directory from syncthingconnector set(META_SRCDIR_REFS "${CMAKE_CURRENT_SOURCE_DIR}\n${CMAKE_CURRENT_SOURCE_DIR}/../syncthingconnector") -# find Plasma +# find Plasma and its dependencies (which are not pulled-in automatically as of Plasma 6) find_package(${KF_PACKAGE_PREFIX}Plasma REQUIRED) +if (KF_MAJOR_VERSION GREATER_EQUAL 6) + find_package(${QT_PACKAGE_PREFIX}Qml REQUIRED) + find_package(${KF_PACKAGE_PREFIX}Config REQUIRED) +endif () # define list of QML files; there is a distinct directory for each major Plasma version set(PLASMOID_FILE_NAMES