File 0002-Fix-cmake-for-qt6.patch of Package fcitx5-qt
From 6ac4fdd8e90ff9c25a5219e15e83740fa38c9c71 Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com>
Date: Wed, 1 Oct 2025 21:05:48 -0700
Subject: [PATCH 2/3] Fix cmake for qt6
For Qt6, prior Qt 6.10 the private is implicity, 6.10 seems to be
explicit and has split cmake target.
---
qt6/CMakeLists.txt | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/qt6/CMakeLists.txt b/qt6/CMakeLists.txt
index c24f3d7..79e68ad 100644
--- a/qt6/CMakeLists.txt
+++ b/qt6/CMakeLists.txt
@@ -1,11 +1,20 @@
-set(QT6_REQUIRED_COMPONENTS Core Gui GuiPrivate DBus Widgets)
+set(QT6_REQUIRED_COMPONENTS Core Gui DBus Widgets)
if (ENABLE_QT6_WAYLAND_WORKAROUND)
- list(APPEND QT6_REQUIRED_COMPONENTS WaylandClient WaylandClientPrivate WaylandGlobalPrivate)
+ list(APPEND QT6_REQUIRED_COMPONENTS WaylandClient WaylandGlobalPrivate)
endif()
find_package(Qt6 ${REQUIRED_QT6_VERSION} CONFIG REQUIRED COMPONENTS ${QT6_REQUIRED_COMPONENTS})
+if (NOT TARGET Qt6::GuiPrivate)
+ find_package(Qt6GuiPrivate CONFIG REQUIRED)
+endif()
+
+if (ENABLE_QT6_WAYLAND_WORKAROUND AND NOT TARGET Qt6::WaylandClientPrivate)
+ find_package(Qt6WaylandClientPrivate CONFIG REQUIRED)
+endif()
+
+
add_subdirectory(dbusaddons)
add_subdirectory(platforminputcontext)
--
2.51.0