Commit 8d1e8db2 authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot
Browse files

Merge topic 'android_fixes'

31cbc698

 Some compiler fixes for Android
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !409
parents af50eda8 31cbc698
......@@ -198,7 +198,22 @@ endif()
# inherit settings in recursive loads
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
if( _CMAKE_IN_TRY_COMPILE )
include( "${CMAKE_CURRENT_SOURCE_DIR}/../android.toolchain.config.cmake" OPTIONAL )
# walk up to try to find the config file
set (go_up "/")
set (go_up_length 0)
set (found FALSE)
while (NOT found AND go_up_length LESS 30)
if (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${go_up}android.toolchain.config.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/${go_up}android.toolchain.config.cmake")
set (found TRUE)
endif()
if (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${go_up}CMakeFiles/android.toolchain.config.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/${go_up}CMakeFiles/android.toolchain.config.cmake")
set (found TRUE)
endif()
set (go_up "${go_up}../")
string(LENGTH ${go_up} go_up_length)
endwhile()
endif()
# this one is important
......@@ -216,7 +231,7 @@ set( CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "" )
set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )
# NDK search paths
set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10e -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
if( NOT DEFINED ANDROID_NDK_SEARCH_PATHS )
if( CMAKE_HOST_WIN32 )
file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
......
......@@ -32,6 +32,8 @@
#include <vtksys/ios/sstream>
#include "vtk_glew.h"
vtkStandardNewMacro(vtkEGLRenderWindow);
vtkEGLRenderWindow::vtkEGLRenderWindow()
......
......@@ -439,6 +439,7 @@ void vtkOpenGLRenderWindow::OpenGLInitContext()
// calls when the result should not change
GLfloat lineWidthRange[2];
this->MaximumHardwareLineWidth = 1.0;
#if defined(GL_SMOOTH_LINE_WIDTH_RANGE) && defined(GL_ALIASED_LINE_WIDTH_RANGE)
if (this->LineSmoothing)
{
glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE,lineWidthRange);
......@@ -455,6 +456,7 @@ void vtkOpenGLRenderWindow::OpenGLInitContext()
this->MaximumHardwareLineWidth = lineWidthRange[1];
}
}
#endif
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment