summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-11-27 15:14:02 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-01-12 23:04:49 +0000
commitee59f65df6a9276c70808f888e9995dfc23794b5 (patch)
treeb9250fe51f83da75e5c8a80e402f713cea7b2217 /cmake
parentb06525ddbbe018f3b2dbd51a5c22c68c86b38d4e (diff)
Use target-specific android-build directory
This fix allows using multiple executable targets in a single CMakeLists.txt when building for android. Previously artifacts for both targes were collected in a common android-build directory, that led to artifacts overlaping and broke the deployment process. Users need to set the QT_USE_TARGET_ANDROID_BUILD_DIR to TRUE to enable the new android-build directories naming. This change need QtC adjustments that will take a new directory naming into account. Task-number: QTBUG-117443 Pick-to: 6.5 Change-Id: I47568798e2a2e8550ddab1990a33611967183761 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 5f0575256a4af14c1f2f9a846e40cd9490c12b56) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5d9c9fe8f729e3782b11a48534d065050913bf82)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPlatformAndroid.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/QtPlatformAndroid.cmake b/cmake/QtPlatformAndroid.cmake
index b396b76881..264f76e8e3 100644
--- a/cmake/QtPlatformAndroid.cmake
+++ b/cmake/QtPlatformAndroid.cmake
@@ -195,8 +195,11 @@ function(qt_internal_android_test_arguments target timeout out_test_runner out_t
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"