diff options
| author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-08-22 09:35:46 +0200 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-08-24 15:11:40 +0200 |
| commit | e38c7618be50e16b51cc8afdab52ffb26ed76b0c (patch) | |
| tree | dca14831f99ca6ea07516364857a682896bc47ad /src | |
| parent | 1f35be2f3888b34b4a2f4280c7e0a482bca47640 (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
Pick-to: 6.3 6.4
Change-Id: Ic318c104cf212de4c97c5a89b73536609826fd5b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/Qt6AndroidMacros.cmake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake index bae0d5528ef..7e1579c7a13 100644 --- a/src/corelib/Qt6AndroidMacros.cmake +++ b/src/corelib/Qt6AndroidMacros.cmake @@ -554,8 +554,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 @@ -569,13 +569,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" |
