summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2020-12-22 17:04:26 +1100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-01-04 07:07:06 +0000
commit0de85741a3707c0be2fd1853157a1f23f315e788 (patch)
tree12f1b2f4a53507df8433adc0d689b583294aced1
parentd356876a7375936f04abdf0ed57f75e3f177b102 (diff)
CMake: Prefer canonical CMAKE_ANDROID_NDK var when writing deploy file
CMAKE_ANDROID_NDK is an official variable provided by CMake. The ANDROID_NDK variable will be set by the NDK toolchain file, but we don't need to rely on that (the user could theoretically not be using the NDK's toolchain file). Using the CMake-provided variable means we don't have to explain the source of the variable in documentation for the qt6_android_generate_deployment_settings() command. We should prefer to use things provided by CMake already where it makes sense and this seems to be one such case. Task-number: QTBUG-89651 Task-number: QTBUG-88839 Change-Id: Ieda54de8f5c65c36da6bb55c87a8b8fdd1d5cd7b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 1b4d70676c3fed70a826b3a3cda3cd6c8077addf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/corelib/Qt6AndroidMacros.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake
index 0ecde09d7c..df04619605 100644
--- a/src/corelib/Qt6AndroidMacros.cmake
+++ b/src/corelib/Qt6AndroidMacros.cmake
@@ -83,7 +83,7 @@ function(qt6_android_generate_deployment_settings target)
" \"sdkBuildToolsRevision\": \"${QT_ANDROID_SDK_BUILD_TOOLS_REVISION}\",\n")
# Android NDK
- file(TO_CMAKE_PATH "${ANDROID_NDK}" android_ndk_root_native)
+ file(TO_CMAKE_PATH "${CMAKE_ANDROID_NDK}" android_ndk_root_native)
string(APPEND file_contents
" \"ndk\": \"${android_ndk_root_native}\",\n")