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
Pick-to: 6.0
Change-Id: Ieda54de8f5c65c36da6bb55c87a8b8fdd1d5cd7b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
bb10
Craig Scott 2020-12-22 17:04:26 +11:00
parent ef968963c0
commit 1b4d70676c
1 changed files with 1 additions and 1 deletions

View File

@ -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")