mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Andoid build fixed
This commit is contained in:
parent
510ca53687
commit
a70f354c0f
@ -320,13 +320,12 @@ endif()
|
|||||||
if( BUILD_WITH_ANDROID_NDK )
|
if( BUILD_WITH_ANDROID_NDK )
|
||||||
set( CMAKE_CXX_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_CXX_FLAGS}" )
|
set( CMAKE_CXX_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_CXX_FLAGS}" )
|
||||||
set( CMAKE_C_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_C_FLAGS}" )
|
set( CMAKE_C_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_C_FLAGS}" )
|
||||||
if (WIN32 OR ANDROID_NDK_SYSROOT MATCHES "[ ]")
|
|
||||||
# workaround for ugly cmake bug - compiler identification replaces all spaces (and somethimes " !!!) in compiler flags with ; symbol
|
# workaround for ugly cmake bug - compiler identification replaces all spaces (and somethimes " !!!) in compiler flags with ; symbol
|
||||||
# as result identification fails if ANDROID_NDK_SYSROOT contain spaces
|
# as result identification fails if ANDROID_NDK_SYSROOT contain spaces
|
||||||
include(CMakeForceCompiler)
|
include(CMakeForceCompiler)
|
||||||
CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" GNU)
|
CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" GNU)
|
||||||
CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" GNU)
|
CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" GNU)
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( ARMEABI_V7A )
|
if( ARMEABI_V7A )
|
||||||
|
Loading…
Reference in New Issue
Block a user