summaryrefslogtreecommitdiffstats
path: root/cmake/QtCMakeVersionHelpers.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtCMakeVersionHelpers.cmake')
-rw-r--r--cmake/QtCMakeVersionHelpers.cmake21
1 files changed, 6 insertions, 15 deletions
diff --git a/cmake/QtCMakeVersionHelpers.cmake b/cmake/QtCMakeVersionHelpers.cmake
index bcbd69057b..322e58eed1 100644
--- a/cmake/QtCMakeVersionHelpers.cmake
+++ b/cmake/QtCMakeVersionHelpers.cmake
@@ -1,5 +1,5 @@
# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+# 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)
@@ -14,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()
@@ -30,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}")
@@ -198,19 +202,6 @@ function(qt_internal_warn_about_buggy_cmake_versions)
# Fixed in 3.21.2.
list(APPEND unsuitable_versions "3.21.1")
- # 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()
-
foreach(unsuitable_version ${unsuitable_versions})
if(CMAKE_VERSION VERSION_EQUAL unsuitable_version)
message(WARNING