diff --git a/.kde-ci.yml b/.kde-ci.yml index 04dc06df2..3ad1aef4b 100644 --- a/.kde-ci.yml +++ b/.kde-ci.yml @@ -57,6 +57,7 @@ Dependencies: - 'on': ['Linux/Qt6', 'FreeBSD/Qt6'] 'require': 'frameworks/kdbusaddons': '@latest-kf6' + 'frameworks/kstatusnotifieritem': '@latest-kf6' - 'on': ['Linux/Qt6', 'Linux/Qt5'] 'require': diff --git a/CMakeLists.txt b/CMakeLists.txt index ff2a191a4..e345ea33b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,6 +93,10 @@ set_package_properties(KF${QT_MAJOR_VERSION}Kirigami2 PROPERTIES ) find_package(KF${QT_MAJOR_VERSION}KirigamiAddons 0.7.2 REQUIRED) +if(QT_MAJOR_VERSION STREQUAL "6") + find_package(KF6StatusNotifierItem ${KF_MIN_VERSION} REQUIRED) +endif() + if(ANDROID) find_package(OpenSSL) set_package_properties(OpenSSL PROPERTIES diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8b9cde1f9..d4ea84d61 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -155,6 +155,9 @@ if(NOT ANDROID) target_sources(neochat PRIVATE colorschemer.cpp colorschemer.h) if (NOT WIN32 AND NOT APPLE) target_sources(neochat PRIVATE trayicon_sni.cpp trayicon_sni.h) + if(QT_MAJOR_VERSION STREQUAL "6") + target_link_libraries(neochat PRIVATE KF6::StatusNotifierItem) + endif() else() target_sources(neochat PRIVATE trayicon.cpp trayicon.h) endif()