From 7a41b928d415b69635abeff13a3a6d205386652f Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Mon, 28 Sep 2020 20:19:05 +0300 Subject: 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 --- cmake/QtPlatformAndroid.cmake | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'cmake') 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.") -- cgit v1.2.3