summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2022-03-25 10:45:16 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2022-03-25 16:19:20 +0100
commitd6919b073aaae617f1ff37d18da14e315f202005 (patch)
tree8a32dcd19bebd068b5df15df8ddbdcbfae87bad0 /src
parent62a26df2ffad245ac36707e2fd018041fd61f8f0 (diff)
Pass ANDROID_SDK_ROOT and ANDROID_NDK_ROOT variables to external projects
The path to an Android toolchain is set to the one is used on CI by default. To rewrite it user need to set ANDROID_SDK_ROOT and ANDROID_NDK_ROOT variables. But these variables are not propagated to the per-ABI external project, so they cannot locate the Android toolchain file correctly. Fixes: QTBUG-102041 Pick-to: 6.3.0 6.3 Change-Id: Ic30a3298518af93718f5422402edd5e0715ea135 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt6AndroidMacros.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake
index f56532625c..3a377491ee 100644
--- a/src/corelib/Qt6AndroidMacros.cmake
+++ b/src/corelib/Qt6AndroidMacros.cmake
@@ -929,6 +929,14 @@ function(_qt_internal_configure_android_multiabi_target target)
"-DQT_ADDITIONAL_HOST_PACKAGES_PREFIX_PATH=${escaped_host_packages_prefix_path}")
endif()
+ if(NOT ANDROID_SDK_ROOT STREQUAL "")
+ list(APPEND extra_cmake_args "-DANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}")
+ endif()
+
+ if(NOT ANDROID_NDK_ROOT STREQUAL "")
+ list(APPEND extra_cmake_args "-DANDROID_NDK_ROOT=${ANDROID_NDK_ROOT}")
+ endif()
+
set(missing_qt_abi_toolchains "")
# Create external projects for each android ABI except the main one.
list(REMOVE_ITEM android_abis "${CMAKE_ANDROID_ARCH_ABI}")