diff -Naur a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt 2024-11-04 17:38:47.000000000 +0600 +++ b/CMakeLists.txt 2024-11-08 16:45:56.538578162 +0600 @@ -64,6 +64,10 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII) endif() +if (NOT TARGET Qt6::QWebpPlugin) + message(SEND_ERROR "Qt6::QWebpPlugin from QtImageFormats is missing. QWebpPlugin is needed for system tray icons when recording.") +endif() + find_package( KF6 ${KF_MIN_VERSION} REQUIRED CoreAddons diff -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt 2024-11-04 17:38:47.000000000 +0600 +++ b/src/CMakeLists.txt 2024-11-08 16:48:41.468400352 +0600 @@ -75,8 +75,13 @@ target_link_libraries(spectacle PRIVATE Qt6::GuiPrivate) # Gui/private/qtx11extras_p.h endif() +if (Qt6_VERSION VERSION_GREATER_EQUAL "6.8.0") + set(private_code_option "PRIVATE_CODE") +endif() qt6_generate_wayland_protocol_client_sources(spectacle FILES - ${PLASMA_WAYLAND_PROTOCOLS_DIR}/zkde-screencast-unstable-v1.xml) + ${PLASMA_WAYLAND_PROTOCOLS_DIR}/zkde-screencast-unstable-v1.xml + ${private_code_option} +) if(PURPOSE_FOUND)