mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
Make locating the Android NDK configurable (#3754)
Prefer an environment variable and fall back to the previous path if not set.
This commit is contained in:
parent
27149bb785
commit
929f2d9b9b
@ -6,8 +6,14 @@ set(ANDROID_TOOLCHAIN clang CACHE STRING "")
|
||||
set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
|
||||
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "")
|
||||
|
||||
if(NOT EXISTS "$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/build/cmake/android.toolchain.cmake")
|
||||
message(FATAL_ERROR "Could not find android ndk. Searched at $ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b")
|
||||
if(DEFINED ENV{ANDROID_NDK_HOME})
|
||||
set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME})
|
||||
else()
|
||||
set(ANDROID_NDK_HOME "$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/")
|
||||
endif()
|
||||
|
||||
include("$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/build/cmake/android.toolchain.cmake")
|
||||
if(NOT EXISTS "${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake")
|
||||
message(FATAL_ERROR "Could not find android ndk. Searched at ${ANDROID_NDK_HOME}")
|
||||
endif()
|
||||
|
||||
include("${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake")
|
||||
|
Loading…
x
Reference in New Issue
Block a user