Skip to content

Commit

Permalink
Set CMAKE_SYSROOT on CMake 3.0.0 and later, from taka-no-me#70
Browse files Browse the repository at this point in the history
  • Loading branch information
DuFF14 authored and JDFind committed Aug 27, 2017
1 parent 0692e26 commit 1fd5ef6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion android.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down

0 comments on commit 1fd5ef6

Please sign in to comment.