Skip to content

Commit 213c6df

Browse files
authored
Merge pull request #5 from OSVR/setCmakeSysroot
Set CMAKE_SYSROOT on CMake 3.0.0 and later
2 parents 44e5409 + 8011401 commit 213c6df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android.toolchain.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,9 @@ endforeach()
11611161
remove_definitions( -DANDROID )
11621162
add_definitions( -DANDROID )
11631163

1164-
if( ANDROID_SYSROOT MATCHES "[ ;\"]" )
1164+
if( CMAKE_VERSION VERSION_GREATER "3.0.0" )
1165+
set( CMAKE_SYSROOT ${ANDROID_SYSROOT} )
1166+
elseif( ANDROID_SYSROOT MATCHES "[ ;\"]" )
11651167
if( CMAKE_HOST_WIN32 )
11661168
# try to convert path to 8.3 form
11671169
file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "@echo %~s1" )

0 commit comments

Comments
 (0)