Search for GuiPrivate package with Qt 6.10

Qt 6.10 extracts the private modules into a separate CMake package, so search
for it

See https://bugreports.qt.io/browse/QTBUG-87776

Backport:
https://github.com/lxqt/libqtxdg/commit/b01a024921acdfd5b0e97d5fda2933c726826e99
This commit is contained in:
rsadowski
2025-12-10 06:36:07 +00:00
parent 260b3bcfc2
commit 12ebcbbdf1
@@ -0,0 +1,17 @@
https://github.com/QtExcel/QXlsx/commit/90d762625750c6b2c73f6cd96b633e9158aed72e
Index: QXlsx/CMakeLists.txt
--- QXlsx/CMakeLists.txt.orig
+++ QXlsx/CMakeLists.txt
@@ -17,6 +17,11 @@ if(NOT DEFINED QT_VERSION_MAJOR)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui REQUIRED)
endif()
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui REQUIRED)
+
+if(Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0")
+ find_package(Qt6 REQUIRED COMPONENTS GuiPrivate)
+endif()
+
set(EXPORT_NAME QXlsxQt${QT_VERSION_MAJOR})
if (QT_VERSION_MAJOR EQUAL 6)