From d14addfd4515e798a1d5cca5eeeb905d3a2385f1 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 13 Nov 2024 13:24:55 +0100 Subject: [PATCH] CMake: Increase minimum required CMake version to 3.22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For both building and using Qt. The Linux distributions that Qt 6.9 aims to support have the following CMake versions in their official package repositories: rhel 8.10 ships 3.26.5 rhel 9.4 ships 3.26.5 opensuse 15.6 ships 3.28.3 ubuntu 24.04 ships 3.28.3 debian 11.6 ships 3.24 debian 12 ships 3.25 yocto 4.0 kirstone ships 3.22 suse enterprise is similar to opensuse Windows and macOS don't ship cmake, developers on those platforms always have to manually download / install cmake from somewhere, thus they can use most newer versions. The lowest common version on Linux is 3.26. The lowest common version on Linux including yocto 4.0 is 3.22. Until we clarify whether we need to support the yocto version or not, the safe assumption is that we need to. Hence the minimum required version will be 3.22. We might revisit this later. The minimum and maximum cmake policy version are left at the existing 3.16 and 3.21 respectively, because changing those would require more work than just bumping the minimum. [ChangeLog][Build Systems] Building and using Qt now requires at least CMake version 3.22. Task-number: QTBUG-131169 Change-Id: I319cc61f4099bd8d3fae04e8c270340ab09ff8a8 Reviewed-by: Kai Köhne Reviewed-by: Alexey Edelev --- .cmake.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.cmake.conf b/.cmake.conf index bc90325bc14..c8a64e4f56f 100644 --- a/.cmake.conf +++ b/.cmake.conf @@ -13,16 +13,16 @@ set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_COPYRIGHT "Copyright (C) The Qt Company Ltd. and other contributors.") # Minimum requirement for building Qt -set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_SHARED "3.16") -set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_STATIC "3.21") -set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_APPLE "3.21") +set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_SHARED "3.22") +set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_STATIC "3.22") +set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_APPLE "3.22") # Minimum requirement for consuming Qt in a user project. # This might be different in the future, e.g. be lower than the requirement for # building Qt. -set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_SHARED "3.16") -set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_STATIC "3.21") -set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_APPLE "3.21") +set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_SHARED "3.22") +set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_STATIC "3.22") +set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_APPLE "3.22") # Policy settings for commands defined by qtbase. # These will also be injected into the top level policy scope of each Qt