Allowed spaces in Android NDK path
This commit is contained in:
parent
801079e2ba
commit
0b6fed32e3
@ -53,7 +53,7 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
|
|||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
|
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
|
||||||
FOREACH(item ${DIRINC})
|
FOREACH(item ${DIRINC})
|
||||||
LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}${item}")
|
LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}\"${item}\"")
|
||||||
ENDFOREACH(item)
|
ENDFOREACH(item)
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
||||||
|
@ -98,6 +98,7 @@
|
|||||||
# - modified July 2011 Andrey Kamaev andrey.kamaev@itseez.com
|
# - modified July 2011 Andrey Kamaev andrey.kamaev@itseez.com
|
||||||
# [~] fixed options caching
|
# [~] fixed options caching
|
||||||
# [~] search for all supported NDK versions
|
# [~] search for all supported NDK versions
|
||||||
|
# [~] allowed spaces in NDK path
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
# this one is important
|
# this one is important
|
||||||
@ -319,6 +320,13 @@ 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 (ANDROID_NDK_SYSROOT MATCHES "[ ]")
|
||||||
|
# workaround for ugly cmake bug - compiler identification replaces all spaces in compiler flags with ; symbol
|
||||||
|
# as result identification fails if ANDROID_NDK_SYSROOT contain spaces
|
||||||
|
include(CMakeForceCompiler)
|
||||||
|
CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" GNU)
|
||||||
|
CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" GNU)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( ARMEABI_V7A )
|
if( ARMEABI_V7A )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user