summaryrefslogtreecommitdiffstats
path: root/cmake/QtCMakeVersionHelpers.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtCMakeVersionHelpers.cmake')
-rw-r--r--cmake/QtCMakeVersionHelpers.cmake26
1 files changed, 13 insertions, 13 deletions
diff --git a/cmake/QtCMakeVersionHelpers.cmake b/cmake/QtCMakeVersionHelpers.cmake
index c594da99b4..322e58eed1 100644
--- a/cmake/QtCMakeVersionHelpers.cmake
+++ b/cmake/QtCMakeVersionHelpers.cmake
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Returns the minimum supported CMake version required to /build/ Qt as originally advertised by Qt.
function(qt_internal_get_supported_min_cmake_version_for_building_qt out_var)
if(NOT DEFINED BUILD_SHARED_LIBS)
@@ -11,6 +14,8 @@ function(qt_internal_get_supported_min_cmake_version_for_building_qt out_var)
set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT}")
# We're building qtbase so the values come from .cmake.conf.
+ elseif(APPLE)
+ set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_APPLE}")
elseif(BUILD_SHARED_LIBS)
set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_SHARED}")
else()
@@ -27,7 +32,9 @@ function(qt_internal_get_supported_min_cmake_version_for_using_qt out_var)
"It should have been set by this point.")
endif()
- if(BUILD_SHARED_LIBS)
+ if(APPLE)
+ set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_APPLE}")
+ elseif(BUILD_SHARED_LIBS)
set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_SHARED}")
else()
set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_STATIC}")
@@ -189,18 +196,11 @@ function(qt_internal_warn_about_buggy_cmake_versions)
# https://gitlab.kitware.com/cmake/cmake/-/issues/16776
list(APPEND unsuitable_versions "3.21.0")
- # qt_ensure_perl fails to find perl in host PATH via find_program
- # due to Android Platform module setting CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH to OFF
- # Fixed in 3.20.6, 3.21.3. not a problem in CMake versions earlier than 3.20.0
- # https://gitlab.kitware.com/cmake/cmake/-/issues/22634
- # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5357
- # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6528
- if(ANDROID AND CMAKE_HOST_WIN32)
- list(APPEND unsuitable_versions
- "3.20.0" "3.20.1" "3.20.2" "3.20.3" "3.20.4" "3.20.5"
- "3.21.0" "3.21.1" "3.21.2"
- )
- endif()
+ # Changing a C++ source file can trigger rebuilds of a lot of other source files that might
+ # include AUTOGEN'ed headers or sources.
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/22531
+ # Fixed in 3.21.2.
+ list(APPEND unsuitable_versions "3.21.1")
foreach(unsuitable_version ${unsuitable_versions})
if(CMAKE_VERSION VERSION_EQUAL unsuitable_version)