diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-09-28 20:19:05 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-09-29 19:28:12 +0300 |
commit | 7a41b928d415b69635abeff13a3a6d205386652f (patch) | |
tree | f15a3c354c00ab52f9c2327d3fda2fe89b30e04a /cmake/QtPlatformAndroid.cmake | |
parent | 2271d998d42313686a81d29e1174478f727167f6 (diff) |
CMake: fix sdkBuildToolsRevision not being set for user apps
Add qt6_android_get_sdk_build_tools_revision() function to get the
Android SDK build tools revision, the logic is moved from
QtPlatformAndroid to Qt6AndroidMacros. The update QtPlatformAndroid
header comments.
Task-number: QTBUG-85982
Change-Id: If3e5b46fa583f929a24794792c9d5a52beb83990
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtPlatformAndroid.cmake')
-rw-r--r-- | cmake/QtPlatformAndroid.cmake | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/cmake/QtPlatformAndroid.cmake b/cmake/QtPlatformAndroid.cmake index 62fc7fe8cf..fbd0c9f8d5 100644 --- a/cmake/QtPlatformAndroid.cmake +++ b/cmake/QtPlatformAndroid.cmake @@ -1,22 +1,15 @@ # # Self contained Platform Settings for Android # -# Note: This file is used both by the internal and public builds. +# Note: This file is used by the internal builds. # # -# Public variables: +# Variables: # QT_ANDROID_JAR # Location of the adroid sdk jar for java code -# QT_ANDROID_APIVERSION +# QT_ANDROID_API_VERSION # Android API version -# QT_ANDROID_SDK_BUILD_TOOLS_VERSION -# Detected Android sdk build tools version -# -# Public functions: -# -# qt_android_generate_deployment_settings() -# Generate the deployment settings json file for a cmake target. # if (NOT DEFINED ANDROID_SDK_ROOT) @@ -72,21 +65,6 @@ include(UseJava) # Find JDK 8.0 find_package(Java 1.8 COMPONENTS Development REQUIRED) -# Locate newest android sdk build tools -if (NOT QT_ANDROID_SDK_BUILD_TOOLS_VERSION) - file(GLOB android_build_tools - LIST_DIRECTORIES true - RELATIVE "${ANDROID_SDK_ROOT}/build-tools" - "${ANDROID_SDK_ROOT}/build-tools/*") - if (NOT android_build_tools) - message(FATAL_ERROR "Could not locate Android SDK build tools under \"${ANDROID_SDK_ROOT}/build-tools\"") - endif() - list(SORT android_build_tools) - list(REVERSE android_build_tools) - list(GET android_build_tools 0 android_build_tools_latest) - set(QT_ANDROID_SDK_BUILD_TOOLS_VERSION ${android_build_tools_latest}) -endif() - # Ensure we are using the shared version of libc++ if(NOT ANDROID_STL STREQUAL c++_shared) message(FATAL_ERROR "The Qt libraries on Android only supports the shared library configuration of stl. Please use -DANDROID_STL=\"c++_shared\" as configuration argument.") |