Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Commit

Permalink
merge(feat/VTK_7_1): into dev
Browse files Browse the repository at this point in the history
Updated VTK to version 7.1
This version brings a few bug fixes. (see #8)

See merge request !39
  • Loading branch information
Flavien Bridault committed Jun 15, 2017
2 parents c6098de + 39f9c43 commit f34edc9
Show file tree
Hide file tree
Showing 11 changed files with 119 additions and 153 deletions.
7 changes: 4 additions & 3 deletions gdcm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@ set(GDCM_CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DUSE_ITK:BOOL=OFF
)

set(CACHED_URL https://github.com/malaterre/GDCM/archive/v2.6.4.tar.gz)
set(CACHED_URL https://github.com/malaterre/GDCM/archive/v2.6.7.tar.gz)

# Needed for windows to find our zlib but doesn't hurt on other platforms
set(GDCM_PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patch)
set(GDCM_PATCH_CMD "${PATCH_EXECUTABLE}" -p1 -i ${GDCM_PATCH_DIR}/zlib.diff -d <SOURCE_DIR>)
set(GDCM_PATCH_CMD "${PATCH_EXECUTABLE}" -p1 -i ${GDCM_PATCH_DIR}/zlib.diff -d <SOURCE_DIR>
&& "${PATCH_EXECUTABLE}" -p1 -i ${GDCM_PATCH_DIR}/fixVTKOverload.diff -d <SOURCE_DIR>)


ExternalProject_Add(
gdcm
URL ${CACHED_URL}
URL_HASH SHA256=bbf7eeda622cf18499bd162f3b06d0c937a5379f6f3d1445d57b3d4d0070f97e
URL_HASH SHA256=b8d57a3ea3464dac34252ef1cd816d9f4b61911ca9e94a74552d907ec406a579
DOWNLOAD_DIR ${ARCHIVE_DIR}
DEPENDS zlib expat libxml vtk
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
Expand Down
25 changes: 25 additions & 0 deletions gdcm/patch/fixVTKOverload.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- a/Utilities/VTK/vtkImageMapToColors16.cxx 2017-02-17 14:32:21.000000000 +0100
+++ b/Utilities/VTK/vtkImageMapToColors16.cxx 2017-03-16 13:46:45.223443700 +0100
@@ -66,9 +66,9 @@
}

//----------------------------------------------------------------------------
-unsigned long vtkImageMapToColors16::GetMTime()
+vtkMTimeType vtkImageMapToColors16::GetMTime()
{
- unsigned long t1, t2;
+ vtkMTimeType t1, t2;

t1 = this->Superclass::GetMTime();
if (this->LookupTable)
--- a/Utilities/VTK/vtkImageMapToColors16.h 2017-02-17 14:32:21.000000000 +0100
+++ b/Utilities/VTK/vtkImageMapToColors16.h 2017-03-16 13:46:45.231445300 +0100
@@ -85,7 +85,7 @@

// Description:
// We need to check the modified time of the lookup table too.
- virtual unsigned long GetMTime();
+ virtual vtkMTimeType GetMTime();

protected:
vtkImageMapToColors16();
20 changes: 9 additions & 11 deletions vtk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ set(VTK_CMAKE_ARGS
-DVTK_Group_StandAlone:BOOL=OFF #disabled hdf5 module
)

if(NOT ANDROID)
set(CACHED_URL https://github.com/Kitware/VTK/archive/v7.1.0.tar.gz)
set(VTK_HASHSUM 86adabff0bc410566abdac50cf3935ed2bb90628b40b571ceb756c9638e8e4f6)

set(CACHED_URL https://github.com/Kitware/VTK/archive/v7.0.0.tar.gz)
set(VTK_HASHSUM 8edb4a681b948f9c7c318f50d57bc23146095464539bfd00ae09e5158de17b97)
if(NOT ANDROID)

list(APPEND VTK_CMAKE_ARGS
-DVTK_USE_GL2PS:BOOL=ON
Expand Down Expand Up @@ -58,9 +58,7 @@ if(NOT ANDROID)
)
set(EXTRA_DEPENDS qt)
else( )
set(CACHED_URL https://github.com/Kitware/VTK/archive/v7.0.0.tar.gz)
set(VTK_HASHSUM 8edb4a681b948f9c7c318f50d57bc23146095464539bfd00ae09e5158de17b97)


add_definitions(-DANDROID)

list(APPEND VTK_CMAKE_ARGS
Expand Down Expand Up @@ -93,21 +91,21 @@ else( )
-DModule_vtkRenderingFreeType:BOOL=OFF
-DModule_vtkInteractionWidgets=ON
-DCMAKE_CXX_COMPILER_VERSION=${ANDROID_COMPILER_VERSION}

-DModule_vtkFiltersTexture:BOOL=ON
-DModule_vtkFiltersHybrid:BOOL=ON

# Find utilities build on desktop
-DVTKCompileTools_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/vtk-prefix/src/vtk-build-desktop

-DModule_vtkGUISupportQtOpenGL:BOOL=OFF
-DModule_vtkGUISupportQtWebkit:BOOL=OFF
-DModule_vtkGUISupportQtSQL:BOOL=OFF
-DModule_vtkRenderingQt:BOOL=OFF
-DModule_vtkRenderingContextOpenGL2=OFF
-DModule_vtkViewsQt:BOOL=OFF
)

if(ENABLE_QT_ANDROID)
set(EXTRA_DEPENDS qt)
list(APPEND VTK_CMAKE_ARGS
Expand Down Expand Up @@ -147,7 +145,7 @@ if(ANDROID)
list(APPEND VTK_PATCH_CMD
COMMAND "${PATCH_EXECUTABLE}" -p1 -i ${VTK_PATCH_DIR}/android/Core_CMakeLists.diff -d <SOURCE_DIR>
COMMAND "${PATCH_EXECUTABLE}" -p1 -i ${VTK_PATCH_DIR}/android/vtkModuleMacros.diff -d <SOURCE_DIR>
COMMAND "${PATCH_EXECUTABLE}" -p1 -i ${VTK_PATCH_DIR}/android/vtkEGL.diff -d <SOURCE_DIR>
COMMAND "${PATCH_EXECUTABLE}" -p1 -i ${VTK_PATCH_DIR}/android/vtkOpenGLPolyDataMapper.diff -d <SOURCE_DIR>
)
endif()

Expand Down
17 changes: 8 additions & 9 deletions vtk/patch/CMakeLists_glew.diff
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ diff -uNr a/CMakeLists.txt b/CMakeLists.txt
+++ b/CMakeLists.txt 2017-05-30 08:56:37.368664755 +0200
@@ -210,7 +210,7 @@
endif()

# default to not using the system GLEW as ours has fixes in it right now
-set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" FORCE)
+set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" )

set(VTK_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})

--- a/CMake/vtkOpenGL.cmake 2017-06-09 16:36:19.457432000 +0200
+++ b/CMake/vtkOpenGL.cmake 2017-06-09 16:35:25.140000800 +0200
@@ -88,6 +88,6 @@
elseif(VTK_USE_OFFSCREEN_EGL)

--- a/CMake/vtkOpenGL.cmake 2017-06-12 16:46:19.000000000 +0200
+++ b/CMake/vtkOpenGL.cmake 2017-06-12 16:47:25.000000000 +0200
@@ -102,6 +102,6 @@
vtk_module_link_libraries(${target} LINK_PRIVATE ${EGL_LIBRARIES})
else()
endif()
if(VTK_CAN_DO_ONSCREEN)
- vtk_module_link_libraries(${target} LINK_PRIVATE ${OPENGL_LIBRARIES})
+ vtk_module_link_libraries(${target} LINK_PRIVATE ${OPENGL_LIBRARIES} ${GLEW_LIBRARY})
endif()
endfunction()

12 changes: 5 additions & 7 deletions vtk/patch/IO_Import_CMakeLists.diff
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
diff --git a/IO/Import/CMakeLists.txt b/IO/Import/CMakeLists.txt
index fc00885..1591bc0 100644
--- a/IO/Import/CMakeLists.txt
+++ b/IO/Import/CMakeLists.txt
@@ -4,6 +4,10 @@ set(Module_SRCS
vtkVRMLImporter.cxx
--- a/IO/Import/CMakeLists.txt 2016-11-14 16:05:14.000000000 +0100
+++ b/IO/Import/CMakeLists.txt 2017-03-16 14:12:34.188434000 +0100
@@ -10,6 +10,10 @@
vtk3DS.h
)

+install(FILES vtk3DS.h vtkVRML.h
+ DESTINATION ${VTK_INSTALL_INCLUDE_DIR}
+ )
+)
+
set_source_files_properties(
vtkImporter
Expand Down
12 changes: 7 additions & 5 deletions vtk/patch/android/Core_CMakeLists.diff
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
--- a/Common/Core/CMakeLists.txt 2016-04-18 17:54:34.000000000 +0200
+++ b/Common/Core/CMakeLists.txt 2016-04-18 17:54:57.000000000 +0200
@@ -624,4 +624,10 @@
--- a/Common/Core/CMakeLists.txt 2016-11-14 16:05:14.000000000 +0100
+++ b/Common/Core/CMakeLists.txt" 2017-03-17 11:42:05.017722200 +0100
@@ -719,8 +719,10 @@

vtk_module_library(vtkCommonCore ${Module_SRCS})

-vtk_module_link_libraries(vtkCommonCore LINK_PRIVATE ${CMAKE_THREAD_LIBS} LINK_PUBLIC ${VTK_SMP_IMPLEMENTATION_LIBRARIES})
+if(ANDROID)
-
if(ANDROID)
- target_link_libraries(vtkCommonCore LINK_PRIVATE log)
+ find_library(LIBLOG NAMES log REQUIRED PATH "${ANDROID_SYSROOT}/usr/lib")
+ find_library(LIBANDROID NAMES android REQUIRED PATH "${ANDROID_SYSROOT}/usr/lib")
+ vtk_module_link_libraries(vtkCommonCore LINK_PRIVATE ${CMAKE_THREAD_LIBS} LINK_PUBLIC ${VTK_SMP_IMPLEMENTATION_LIBRARIES} ${LIBLOG} ${LIBANDROID})
+else()
+ vtk_module_link_libraries(vtkCommonCore LINK_PRIVATE ${CMAKE_THREAD_LIBS} LINK_PUBLIC ${VTK_SMP_IMPLEMENTATION_LIBRARIES})
+endif()
endif()
24 changes: 0 additions & 24 deletions vtk/patch/android/RenderingOpenGL2_CMakeLists.diff

This file was deleted.

34 changes: 0 additions & 34 deletions vtk/patch/android/vtkEGL.diff

This file was deleted.

6 changes: 3 additions & 3 deletions vtk/patch/android/vtkModuleMacros.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/CMake/vtkModuleMacros.cmake 2016-04-19 10:11:19.000000000 +0200
+++ b/CMake/vtkModuleMacros.cmake 2016-04-19 10:11:47.000000000 +0200
@@ -401,7 +401,7 @@
--- a/CMake/vtkModuleMacros.cmake 2016-11-14 16:05:14.000000000 +0100
+++ b/CMake/vtkModuleMacros.cmake" 2017-03-17 14:02:09.602538200 +0100
@@ -413,7 +413,7 @@
# VTK_CUSTOM_LIBRARY_SUFFIX will override the suffix.
function(vtk_target_name _name)
get_property(_type TARGET ${_name} PROPERTY TYPE)
Expand Down
12 changes: 12 additions & 0 deletions vtk/patch/android/vtkOpenGLPolyDataMapper.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -uNr a/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx b/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx
--- a/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx 2017-04-07 15:20:26.000000000 +0200
+++ b/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx 2017-04-07 15:21:25.000000000 +0200
@@ -1581,7 +1581,7 @@
#if GL_ES_VERSION_3_0 != 1
bool multisampling = glIsEnabled(GL_MULTISAMPLE) == GL_TRUE;
#else
- bool multisample = false;
+ bool multisampling = false;
#endif

if (!multisampling)
Loading

0 comments on commit f34edc9

Please sign in to comment.