Now checking for android command in SDK subdirectory.

This commit is contained in:
Armin Novak 2014-06-23 13:27:39 +02:00
parent 71992acd56
commit c5f3171584
1 changed files with 2 additions and 4 deletions

View File

@ -42,10 +42,8 @@ if(ANDROID_BUILD_JAVA)
endif()
endif(ANDROID_BUILD_JAVA)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
find_program(ANDROID_COMMAND android)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
if(ANDROID_COMMAND STREQUAL "ANDROID_COMMAND-NOTFOUND")
set(ANDROID_COMMAND "${ANDROID_SDK}/tools/android")
if(NOT EXISTS ${ANDROID_COMMAND})
message(FATAL_ERROR "android not found but required to build android java")
endif()