summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android-Determine.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-06 18:55:48 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-12 14:40:53 (GMT)
commit6299693f8aa5f5a61cec82215b73a2040a8d8603 (patch)
treeff675d2ae863e45ad93fcd6b0a6535c4b6bd81af /Modules/Platform/Android-Determine.cmake
parent29b51379de352980dd453243bea7ed37ed300c62 (diff)
downloadCMake-6299693f8aa5f5a61cec82215b73a2040a8d8603.zip
CMake-6299693f8aa5f5a61cec82215b73a2040a8d8603.tar.gz
CMake-6299693f8aa5f5a61cec82215b73a2040a8d8603.tar.bz2
Android: Search for NDK and standalone toolchain in more places
Commonly used Android toolchain files that pre-date CMake upstream support use a few environment and CMake variables as search locations. Use them too to aid transition.
Diffstat (limited to 'Modules/Platform/Android-Determine.cmake')
-rw-r--r--Modules/Platform/Android-Determine.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake
index 50ab40b..d2d5aaa 100644
--- a/Modules/Platform/Android-Determine.cmake
+++ b/Modules/Platform/Android-Determine.cmake
@@ -88,8 +88,16 @@ else()
set(CMAKE_ANDROID_NDK "${_ANDROID_SYSROOT_NDK}")
elseif(IS_DIRECTORY "${_ANDROID_SYSROOT_STANDALONE_TOOLCHAIN}")
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN "${_ANDROID_SYSROOT_STANDALONE_TOOLCHAIN}")
+ elseif(IS_DIRECTORY "${ANDROID_NDK}")
+ file(TO_CMAKE_PATH "${ANDROID_NDK}" CMAKE_ANDROID_NDK)
+ elseif(IS_DIRECTORY "${ANDROID_STANDALONE_TOOLCHAIN}")
+ file(TO_CMAKE_PATH "${ANDROID_STANDALONE_TOOLCHAIN}" CMAKE_ANDROID_STANDALONE_TOOLCHAIN)
elseif(IS_DIRECTORY "$ENV{ANDROID_NDK_ROOT}")
file(TO_CMAKE_PATH "$ENV{ANDROID_NDK_ROOT}" CMAKE_ANDROID_NDK)
+ elseif(IS_DIRECTORY "$ENV{ANDROID_NDK}")
+ file(TO_CMAKE_PATH "$ENV{ANDROID_NDK}" CMAKE_ANDROID_NDK)
+ elseif(IS_DIRECTORY "$ENV{ANDROID_STANDALONE_TOOLCHAIN}")
+ file(TO_CMAKE_PATH "$ENV{ANDROID_STANDALONE_TOOLCHAIN}" CMAKE_ANDROID_STANDALONE_TOOLCHAIN)
endif()
# TODO: Search harder for the NDK or standalone toolchain.
endif()