summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-01-13 17:21:56 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-01-21 20:13:18 +0000
commit5463f2558682f8c52e0777e445de0792d58b889a (patch)
tree2ac263f240ab8927591857d0b7cc85dd9ed011b0
parent198a985c094232dce0a7a956004dd2ae1fec68f5 (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(). Change-Id: If97556a9dd00646e83957959d0f9f16916625160 Reviewed-by: Cristian Adam <cristian.adam@qt.io> (cherry picked from commit d95a1a8bd4734df3c2b6b55e5eb7a86108b682d3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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.