summaryrefslogtreecommitdiffstats
path: root/cmake/QtPlatformAndroid.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtPlatformAndroid.cmake')
-rw-r--r--cmake/QtPlatformAndroid.cmake36
1 files changed, 31 insertions, 5 deletions
diff --git a/cmake/QtPlatformAndroid.cmake b/cmake/QtPlatformAndroid.cmake
index 6e07477332..e4253b75d7 100644
--- a/cmake/QtPlatformAndroid.cmake
+++ b/cmake/QtPlatformAndroid.cmake
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#
# Self contained Platform Settings for Android
#
@@ -33,7 +36,7 @@ function(qt_get_android_sdk_jar_for_api api out_jar_location)
endfunction()
# Minimum recommend android SDK api version
-set(QT_ANDROID_API_VERSION "android-31")
+set(QT_ANDROID_API_VERSION "android-33")
function(qt_internal_sort_android_platforms out_var)
if(CMAKE_VERSION GREATER_EQUAL 3.18)
@@ -163,8 +166,26 @@ define_property(TARGET
"This variable points to the path of the deployment settings JSON file, which holds properties required by androiddeployqt to package the Android app."
)
+define_property(TARGET
+ PROPERTY
+ QT_ANDROID_SYSTEM_LIBS_PREFIX
+ BRIEF_DOCS
+ "This variable is used to specify a path to Qt libraries on the target device in Android."
+ FULL_DOCS
+ "This variable can be used to provide a custom system library path to use for library loading lookup on Android. This is necessary when using Qt libraries installed outside an app's default native (JNI) library directory."
+)
+
+define_property(TARGET
+ PROPERTY
+ QT_ANDROID_NO_DEPLOY_QT_LIBS
+ BRIEF_DOCS
+ "This variable is used to control whether Qt libraries should be deployed inside the APK on Android."
+ FULL_DOCS
+ "This variable can be used to exclude Qt shared libraries from being packaged inside the APK when deploying on Android. Not supported when deploying as Android Application Bundle."
+)
+
# Returns test execution arguments for Android targets
-function(qt_internal_android_test_arguments target out_test_runner out_test_arguments)
+function(qt_internal_android_test_arguments target timeout out_test_runner out_test_arguments)
set(${out_test_runner} "${QT_HOST_PATH}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_BINDIR}/androidtestrunner" PARENT_SCOPE)
set(deployment_tool "${QT_HOST_PATH}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_BINDIR}/androiddeployqt")
@@ -174,14 +195,19 @@ function(qt_internal_android_test_arguments target out_test_runner out_test_argu
endif()
set(target_binary_dir "$<TARGET_PROPERTY:${target},BINARY_DIR>")
- set(apk_dir "${target_binary_dir}/android-build")
-
+ if(QT_USE_TARGET_ANDROID_BUILD_DIR)
+ set(apk_dir "${target_binary_dir}/android-build-${target}")
+ else()
+ set(apk_dir "${target_binary_dir}/android-build")
+ endif()
set(${out_test_arguments}
"--path" "${apk_dir}"
"--adb" "${ANDROID_SDK_ROOT}/platform-tools/adb"
"--skip-install-root"
- "--make" "${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target ${target}_make_apk"
+ "--make" "\"${CMAKE_COMMAND}\" --build ${CMAKE_BINARY_DIR} --target ${target}_make_apk"
"--apk" "${apk_dir}/${target}.apk"
+ "--ndk-stack" "${ANDROID_NDK_ROOT}/ndk-stack"
+ "--timeout" "${timeout}"
"--verbose"
PARENT_SCOPE
)