qxlsx, split packages for Qt versions (#13873)

This commit is contained in:
Schrijvers Luc
2026-03-28 11:09:45 +01:00
committed by GitHub
parent 75cc608264
commit ddf05a8169
3 changed files with 109 additions and 35 deletions

View File

@@ -0,0 +1,24 @@
From e54848f84b0cd798765819901302ae14c861f83c Mon Sep 17 00:00:00 2001
From: Luc Schrijvers <begasus@gmail.com>
Date: Fri, 3 Oct 2025 14:20:51 +0200
Subject: Fix build for Qt6 >= 6.10
diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt
index 5e16bdd..e724057 100644
--- a/QXlsx/CMakeLists.txt
+++ b/QXlsx/CMakeLists.txt
@@ -19,6 +19,10 @@ endif()
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui REQUIRED)
set(EXPORT_NAME QXlsxQt${QT_VERSION_MAJOR})
+if(Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0")
+ find_package(Qt6 REQUIRED COMPONENTS GuiPrivate)
+endif()
+
if (QT_VERSION_MAJOR EQUAL 6)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "")
else()
--
2.52.0