From 45b1b279292ebb67524f2137c5019e8ff3c9d0e5 Mon Sep 17 00:00:00 2001 From: David Redondo Date: Wed, 14 Aug 2024 10:35:47 +0200 Subject: [PATCH] Generate wayland code with PRIVATE_CODE --- declarativeplugin/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/declarativeplugin/CMakeLists.txt b/declarativeplugin/CMakeLists.txt index 49092b241..ee3386020 100644 --- a/declarativeplugin/CMakeLists.txt +++ b/declarativeplugin/CMakeLists.txt @@ -15,10 +15,17 @@ ecm_target_qml_sources(kdeconnectdeclarativeplugin VERSION 1.0) if(UNIX AND NOT APPLE) + if (Qt6_VERSION VERSION_GREATER_EQUAL "6.8.0") + set(private_code_option "PRIVATE_CODE") + endif() qt6_generate_wayland_protocol_client_sources(kdeconnectdeclarativeplugin FILES - ${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml) + ${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml + ${private_code_option} + ) qt6_generate_wayland_protocol_client_sources(kdeconnectdeclarativeplugin FILES - ${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml) + ${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml + ${private_code_option} + ) target_sources(kdeconnectdeclarativeplugin PRIVATE ${wayland_SRCS}) target_link_libraries(kdeconnectdeclarativeplugin PRIVATE Wayland::Client Qt::WaylandClient Qt::GuiPrivate)