diff --git a/android.toolchain.cmake b/android.toolchain.cmake index ffa2612..7aacd4f 100644 --- a/android.toolchain.cmake +++ b/android.toolchain.cmake @@ -1166,7 +1166,9 @@ endforeach() remove_definitions( -DANDROID ) add_definitions( -DANDROID ) -if( ANDROID_SYSROOT MATCHES "[ ;\"]" ) +if( CMAKE_VERSION VERSION_GREATER "3.0.0" ) + set( CMAKE_SYSROOT ${ANDROID_SYSROOT} ) +elseif( ANDROID_SYSROOT MATCHES "[ ;\"]" ) if( CMAKE_HOST_WIN32 ) # try to convert path to 8.3 form file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "@echo %~s1" )