summaryrefslogtreecommitdiffstats
path: root/cmake/QtAutoDetect.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-04-22 14:55:05 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-04-23 16:50:55 +0200
commitff7f32f26b7e82c3dfde5530232433e616169061 (patch)
treefc1295c20fff1b7b6fd92dd2bcde7bf6b94765eb /cmake/QtAutoDetect.cmake
parent393f45de907d8c6bca9bdb33d08a6309034c89f5 (diff)
Android: Do not auto-detect NDK if ANDROID_NDK_ROOT is set
When ANDROID_NDK_ROOT is explicitly set by the user, there's no point in detecting the NDK. The detection had no effect, because the already set ANDROID_NDK_ROOT variable would not be overwritten by our set call. Fix the condition of the check: There is no CMAKE_ANDROID_NDK_ROOT variable. Pick-to: 6.1 Change-Id: I8f0d4f2a1a67445f67a79c7d2d0932099828b05e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtAutoDetect.cmake')
-rw-r--r--cmake/QtAutoDetect.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake
index fd62fcb406..15d0db42c4 100644
--- a/cmake/QtAutoDetect.cmake
+++ b/cmake/QtAutoDetect.cmake
@@ -105,7 +105,7 @@ endfunction()
function(qt_auto_detect_android)
# Auto-detect NDK root
- if(NOT DEFINED CMAKE_ANDROID_NDK_ROOT AND DEFINED ANDROID_SDK_ROOT)
+ if(NOT DEFINED ANDROID_NDK_ROOT AND DEFINED ANDROID_SDK_ROOT)
set(ndk_root "${ANDROID_SDK_ROOT}/ndk-bundle")
if(IS_DIRECTORY "${ndk_root}")
message(STATUS "Android NDK detected: ${ndk_root}")