summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-01-13 17:21:56 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-01-21 16:18:40 +0000
commitd95a1a8bd4734df3c2b6b55e5eb7a86108b682d3 (patch)
treec505a5e0e5ae5f7466cd2a8da5be0ca557d9de9d /src/plugins/sqldrivers
parent722a7dda56a5ac6d43c686c4fbf7b105b5544d88 (diff)
Fix separately building SQL plugins with CMake 3.16
Also move the cmake_minimum_required call to the top of the file, because the line before already requires some policy settings, which is what cmake_minimum_required() is establishing. For the standard Qt build, we make sure to get appropriate policy settings by calling qt_internal_upgrade_cmake_policies(). Pick-to: 6.0 Change-Id: If97556a9dd00646e83957959d0f9f16916625160 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers')
-rw-r--r--src/plugins/sqldrivers/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/sqldrivers/CMakeLists.txt b/src/plugins/sqldrivers/CMakeLists.txt
index 6c5b49d0e8..e11840d182 100644
--- a/src/plugins/sqldrivers/CMakeLists.txt
+++ b/src/plugins/sqldrivers/CMakeLists.txt
@@ -1,8 +1,8 @@
# Generated from sqldrivers.pro.
# special case begin
+cmake_minimum_required(VERSION 3.16)
if (NOT CMAKE_PROJECT_NAME STREQUAL "QtBase" AND NOT CMAKE_PROJECT_NAME STREQUAL "Qt")
- cmake_minimum_required(VERSION 3.17)
include(.cmake.conf)
project(QSQLiteDriverPlugins
VERSION "${QT_REPO_MODULE_VERSION}"
@@ -19,6 +19,8 @@ if (NOT CMAKE_PROJECT_NAME STREQUAL "QtBase" AND NOT CMAKE_PROJECT_NAME STREQUAL
# needed by qt_internal_add_plugin
add_custom_target(qt_plugins)
+else()
+ qt_internal_upgrade_cmake_policies()
endif()
# Currently handled completely manually.