summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2022-08-22 09:35:46 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-24 17:11:23 +0000
commit4e656d61421a5a36cfda232980e58aaf3a8937ce (patch)
tree0f71d48ee8858c3f1add1d61aab1095f7b28a735
parentac2b8ff45c61d2dc99aec6558de532a9059483e9 (diff)
CMake: Fix Android build for CMake < 3.19
The Android build used cmake_language(DEFER) and guarded with a check for CMake's version being >= 3.18. However, cmake_language(DEFER) was introduced in CMake 3.19. Fix that version check. Fixes: QTBUG-105841 Change-Id: Ic318c104cf212de4c97c5a89b73536609826fd5b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit e38c7618be50e16b51cc8afdab52ffb26ed76b0c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/corelib/Qt6AndroidMacros.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake
index b05afb056a..d8fdcd67de 100644
--- a/src/corelib/Qt6AndroidMacros.cmake
+++ b/src/corelib/Qt6AndroidMacros.cmake
@@ -551,8 +551,8 @@ endfunction()
# The function collects all known non-imported shared libraries that are created in the build tree.
# It uses the CMake DEFER CALL feature if the CMAKE_VERSION is greater
-# than or equal to 3.18.
-# Note: Users that use cmake version less that 3.18 need to call qt_finalize_project
+# than or equal to 3.19.
+# Note: Users that use cmake version less that 3.19 need to call qt_finalize_project
# in the end of a project's top-level CMakeLists.txt.
function(_qt_internal_collect_apk_dependencies_defer)
# User opted-out the functionality
@@ -566,13 +566,14 @@ function(_qt_internal_collect_apk_dependencies_defer)
endif()
set_property(GLOBAL PROPERTY _qt_is_collect_apk_dependencies_defer_called TRUE)
- if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.18")
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.19")
cmake_language(EVAL CODE "cmake_language(DEFER DIRECTORY \"${CMAKE_SOURCE_DIR}\"
CALL _qt_internal_collect_apk_dependencies)")
else()
# User don't want to see the warning
if(NOT QT_NO_WARN_BUILD_TREE_APK_DEPS)
- message(WARNING "CMake version you use is less than 3.18. APK dependencies, that are a"
+ message(WARNING
+ "The CMake version you use is less than 3.19. APK dependencies, that are a"
" part of the project tree, might not be collected correctly."
" Please call qt_finalize_project in the end of a project's top-level"
" CMakeLists.txt file to make sure that all the APK dependencies are"