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.
This commit is contained in:
parent
29b51379de
commit
6299693f8a
|
@ -88,8 +88,16 @@ else()
|
||||||
set(CMAKE_ANDROID_NDK "${_ANDROID_SYSROOT_NDK}")
|
set(CMAKE_ANDROID_NDK "${_ANDROID_SYSROOT_NDK}")
|
||||||
elseif(IS_DIRECTORY "${_ANDROID_SYSROOT_STANDALONE_TOOLCHAIN}")
|
elseif(IS_DIRECTORY "${_ANDROID_SYSROOT_STANDALONE_TOOLCHAIN}")
|
||||||
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN "${_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}")
|
elseif(IS_DIRECTORY "$ENV{ANDROID_NDK_ROOT}")
|
||||||
file(TO_CMAKE_PATH "$ENV{ANDROID_NDK_ROOT}" CMAKE_ANDROID_NDK)
|
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()
|
endif()
|
||||||
# TODO: Search harder for the NDK or standalone toolchain.
|
# TODO: Search harder for the NDK or standalone toolchain.
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue