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.`.
This commit is contained in:
Martchus 2023-11-13 23:29:38 +01:00
parent 59ec061580
commit 0215f227c3
1 changed files with 5 additions and 1 deletions

View File

@ -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