From d95a1a8bd4734df3c2b6b55e5eb7a86108b682d3 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 13 Jan 2021 17:21:56 +0100 Subject: 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 --- src/plugins/sqldrivers/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/sqldrivers') 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. -- cgit v1.2.3