SET ( CMAKE_SYSTEM_NAME Linux )
SET ( CMAKE_SYSTEM_PROCESSOR armv7 )

SET ( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
SET ( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
SET ( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )

set(ANDROID_ABI armeabi-v7a)
set(ANDROID_STL c++_static)
set(ANDROID_ARM_NEON ON)
set(ANDROID_PLATFORM android-21)
if(EXISTS $ENV{ANDROID_HOME}/build/cmake/android.toolchain.cmake)
    include($ENV{ANDROID_HOME}/build/cmake/android.toolchain.cmake)
elseif(EXISTS $ENV{ANDROID_HOME}/ndk-bundle/build/cmake/android.toolchain.cmake)
    include($ENV{ANDROID_HOME}/ndk-bundle/build/cmake/android.toolchain.cmake)
else()
    message(FATAL_ERROR "Filed to find ANDROID_HOME")
endif()
