diff --git a/.kde-ci.yml b/.kde-ci.yml index f78410e81..7337e690e 100644 --- a/.kde-ci.yml +++ b/.kde-ci.yml @@ -52,6 +52,7 @@ Dependencies: - 'on': ['Linux/Qt6', 'FreeBSD/Qt6'] 'require': 'frameworks/kpackage': '@latest-kf6' + 'frameworks/kstatusnotifieritem': '@latest-kf6' 'libraries/pulseaudio-qt': '@latest-kf6' 'libraries/plasma-wayland-protocols': '@latest-kf6' - 'on': ['Linux/Qt6'] diff --git a/CMakeLists.txt b/CMakeLists.txt index 844310087..69a4402f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,6 +95,10 @@ set_package_properties(KF5PeopleVCard PROPERTIES TYPE RUNTIME ) +if (QT_MAJOR_VERSION STREQUAL "6" AND NOT WIN32) + find_package(KF6StatusNotifierItem ${KF_MIN_VERSION} REQUIRED) +endif() + #ecm_find_qmlmodule(org.kde.people 1.0) FIXME This results in KPeople code being called which triggers DBus calls which breaks the Windows CI ecm_find_qmlmodule(QtQuick.Particles 2.0) diff --git a/indicator/CMakeLists.txt b/indicator/CMakeLists.txt index b0000af35..99999e027 100644 --- a/indicator/CMakeLists.txt +++ b/indicator/CMakeLists.txt @@ -49,6 +49,10 @@ if (WIN32) target_link_libraries(kdeconnect-indicator windowsapp) endif() +if (QT_MAJOR_VERSION STREQUAL "6" AND NOT WIN32) + target_link_libraries(kdeconnect-indicator KF6::StatusNotifierItem) +endif() + if (APPLE) # Apple frameworks target_link_libraries(kdeconnect-indicator "-framework AppKit")