Fix Android build with the most resent android.toolchain.cmake

This commit is contained in:
Andrey Kamaev 2014-12-23 11:08:07 +03:00
parent c105b72945
commit 7ec6d8a336

View File

@ -19,6 +19,22 @@ if(ANDROID)
set(OPENCV_STATIC_LIBTYPE_CONFIGMAKE ${OPENCV_LIBTYPE_CONFIGMAKE})
endif()
if (NOT COMMAND ANDROID_GET_ABI_RAWNAME)
macro( ANDROID_GET_ABI_RAWNAME TOOLCHAIN_FLAG VAR )
if( " ${TOOLCHAIN_FLAG}" STREQUAL " ARMEABI" )
set( ${VAR} "armeabi" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " ARMEABI_V7A" )
set( ${VAR} "armeabi-v7a" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " X86" )
set( ${VAR} "x86" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " MIPS" )
set( ${VAR} "mips" )
else()
set( ${VAR} "unknown" )
endif()
endmacro()
endif()
# setup lists of camera libs
foreach(abi ARMEABI ARMEABI_V7A X86 MIPS)
ANDROID_GET_ABI_RAWNAME(${abi} ndkabi)