Fix building Plasmoid after Plasma 6 beta release

This commit is contained in:
Martchus 2023-11-30 19:55:32 +01:00
parent eaf8d6d164
commit dbd1e723d4
2 changed files with 6 additions and 2 deletions

View File

@ -12,10 +12,12 @@ set(META_QT5_VERSION 5.8)
set(META_SRCDIR_REFS "${CMAKE_CURRENT_SOURCE_DIR}\n${CMAKE_CURRENT_SOURCE_DIR}/../syncthingconnector")
# 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(Plasma REQUIRED)
find_package(${QT_PACKAGE_PREFIX}Qml REQUIRED)
find_package(${KF_PACKAGE_PREFIX}Config REQUIRED)
else ()
find_package(${KF_PACKAGE_PREFIX}Plasma REQUIRED)
endif ()
# define list of QML files; there is a distinct directory for each major Plasma version

View File

@ -40,8 +40,10 @@ list(APPEND ADDITIONAL_QT_MODULES Network Qml)
if (KF_MAJOR_VERSION GREATER_EQUAL 6)
set(Config_MODULE_TARGETS ${KF_PACKAGE_PREFIX}::ConfigCore)
list(APPEND ADDITIONAL_KF_MODULES Config)
use_package(TARGET_NAME Plasma::Plasma PACKAGE_NAME Plasma PACKAGE_ARGS REQUIRED)
else ()
list(APPEND ADDITIONAL_KF_MODULES Plasma)
endif ()
list(APPEND ADDITIONAL_KF_MODULES Plasma)
include(BasicConfig)
include(QtGuiConfig)