aports/testing/qgis/40-qt6.10.patch
2025-12-03 18:02:35 +01:00

36 lines
1.3 KiB
Diff

From fcf60029534c880abb88390460c85c4131e7d4d6 Mon Sep 17 00:00:00 2001
From: t0b3 <thomas.bettler@gmail.com>
Date: Wed, 26 Nov 2025 11:51:34 +0100
Subject: [PATCH] fix: support private Qt6Sql headers with Qt 6.10
---
CMakeLists.txt | 2 +-
external/qspatialite/CMakeLists.txt | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a622f343bb2..08e38fd854cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -622,7 +622,7 @@ if(WITH_CORE)
find_package(${QT_VERSION_BASE} COMPONENTS Core Gui Widgets Network Xml Svg Concurrent Test Sql Positioning REQUIRED)
if (BUILD_WITH_QT6)
- find_package(${QT_VERSION_BASE} COMPONENTS Core5Compat REQUIRED)
+ find_package(${QT_VERSION_BASE} COMPONENTS Core5Compat SqlPrivate REQUIRED)
endif()
if (NOT IOS)
diff --git a/external/qspatialite/CMakeLists.txt b/external/qspatialite/CMakeLists.txt
index 489a41f6cc33..bdd11db4a6d7 100644
--- a/external/qspatialite/CMakeLists.txt
+++ b/external/qspatialite/CMakeLists.txt
@@ -5,6 +5,7 @@ add_definitions(${QT_DEFINITIONS})
add_definitions(-DQT_PLUGIN)
add_definitions(-DQT_SHARED)
+find_package(${QT_VERSION_BASE}Sql CONFIG)
include_directories(SYSTEM ${${QT_VERSION_BASE}Sql_PRIVATE_INCLUDE_DIRS})
set(QSQLSPATIALITE_SRC qsql_spatialite.cpp smain.cpp qsql_spatialite.h smain.h)