diff --git a/CMakeExternals/VTK-8.1.0.patch b/CMakeExternals/VTK-8.1.0.patch new file mode 100644 index 0000000000..2082d02688 --- /dev/null +++ b/CMakeExternals/VTK-8.1.0.patch @@ -0,0 +1,80 @@ +diff --git a/Rendering/Core/vtkAssembly.cxx b/Rendering/Core/vtkAssembly.cxx +index 79e4d42b65..b17c74e659 100644 +--- a/Rendering/Core/vtkAssembly.cxx ++++ b/Rendering/Core/vtkAssembly.cxx +@@ -116,6 +116,7 @@ int vtkAssembly::RenderTranslucentPolygonalGeometry(vtkViewport *ren) + vtkProp3D* prop3D = static_cast(path->GetLastNode()->GetViewProp()); + if ( prop3D->GetVisibility() ) + { ++ prop3D->SetPropertyKeys(this->GetPropertyKeys()); + prop3D->SetAllocatedRenderTime(fraction, ren); + prop3D->PokeMatrix(path->GetLastNode()->GetMatrix()); + renderedSomething += prop3D->RenderTranslucentPolygonalGeometry(ren); +@@ -143,6 +144,7 @@ int vtkAssembly::HasTranslucentPolygonalGeometry() + vtkProp3D* prop3D = static_cast(path->GetLastNode()->GetViewProp()); + if ( prop3D->GetVisibility() ) + { ++ prop3D->SetPropertyKeys(this->GetPropertyKeys()); + result = prop3D->HasTranslucentPolygonalGeometry(); + } + } +@@ -175,6 +177,7 @@ int vtkAssembly::RenderVolumetricGeometry(vtkViewport *ren) + vtkProp3D* prop3D = static_cast(path->GetLastNode()->GetViewProp()); + if (prop3D->GetVisibility()) + { ++ prop3D->SetPropertyKeys(this->GetPropertyKeys()); + prop3D->SetAllocatedRenderTime(fraction, ren); + prop3D->PokeMatrix(path->GetLastNode()->GetMatrix()); + renderedSomething += prop3D->RenderVolumetricGeometry(ren); +@@ -210,6 +213,7 @@ int vtkAssembly::RenderOpaqueGeometry(vtkViewport *ren) + vtkProp3D* prop3D = static_cast(path->GetLastNode()->GetViewProp()); + if (prop3D->GetVisibility()) + { ++ prop3D->SetPropertyKeys(this->GetPropertyKeys()); + prop3D->PokeMatrix(path->GetLastNode()->GetMatrix()); + prop3D->SetAllocatedRenderTime(fraction, ren); + renderedSomething += prop3D->RenderOpaqueGeometry(ren); +diff --git a/Rendering/Core/vtkPropAssembly.cxx b/Rendering/Core/vtkPropAssembly.cxx +index 5033c3b66e..405b1a75ab 100644 +--- a/Rendering/Core/vtkPropAssembly.cxx ++++ b/Rendering/Core/vtkPropAssembly.cxx +@@ -97,6 +97,7 @@ int vtkPropAssembly::RenderTranslucentPolygonalGeometry(vtkViewport *ren) + prop = path->GetLastNode()->GetViewProp(); + if ( prop->GetVisibility() ) + { ++ prop->SetPropertyKeys(this->GetPropertyKeys()); + prop->SetAllocatedRenderTime(fraction, ren); + prop->PokeMatrix(path->GetLastNode()->GetMatrix()); + renderedSomething += prop->RenderTranslucentPolygonalGeometry(ren); +@@ -125,6 +126,7 @@ int vtkPropAssembly::HasTranslucentPolygonalGeometry() + prop = path->GetLastNode()->GetViewProp(); + if ( prop->GetVisibility() ) + { ++ prop->SetPropertyKeys(this->GetPropertyKeys()); + result=prop->HasTranslucentPolygonalGeometry(); + } + } +@@ -154,6 +156,7 @@ int vtkPropAssembly::RenderVolumetricGeometry(vtkViewport *ren) + prop = path->GetLastNode()->GetViewProp(); + if ( prop->GetVisibility() ) + { ++ prop->SetPropertyKeys(this->GetPropertyKeys()); + prop->SetAllocatedRenderTime(fraction, ren); + prop->PokeMatrix(path->GetLastNode()->GetMatrix()); + renderedSomething += prop->RenderVolumetricGeometry(ren); +@@ -186,6 +189,7 @@ int vtkPropAssembly::RenderOpaqueGeometry(vtkViewport *ren) + prop = path->GetLastNode()->GetViewProp(); + if ( prop->GetVisibility() ) + { ++ prop->SetPropertyKeys(this->GetPropertyKeys()); + prop->SetAllocatedRenderTime(fraction, ren); + prop->PokeMatrix(path->GetLastNode()->GetMatrix()); + renderedSomething += prop->RenderOpaqueGeometry(ren); +@@ -217,6 +221,7 @@ int vtkPropAssembly::RenderOverlay(vtkViewport *ren) + prop = path->GetLastNode()->GetViewProp(); + if ( prop->GetVisibility() ) + { ++ prop->SetPropertyKeys(this->GetPropertyKeys()); + prop->SetAllocatedRenderTime(fraction, ren); + prop->PokeMatrix(path->GetLastNode()->GetMatrix()); + renderedSomething += prop->RenderOverlay(ren); diff --git a/CMakeExternals/VTK.cmake b/CMakeExternals/VTK.cmake index 543363ccd6..334a1fe24d 100644 --- a/CMakeExternals/VTK.cmake +++ b/CMakeExternals/VTK.cmake @@ -1,98 +1,102 @@ #----------------------------------------------------------------------------- # VTK #----------------------------------------------------------------------------- if(WIN32) option(VTK_USE_SYSTEM_FREETYPE OFF) else(WIN32) option(VTK_USE_SYSTEM_FREETYPE ON) endif(WIN32) # Sanity checks if(DEFINED VTK_DIR AND NOT EXISTS ${VTK_DIR}) message(FATAL_ERROR "VTK_DIR variable is defined but corresponds to non-existing directory") endif() set(proj VTK) set(proj_DEPENDENCIES ) set(VTK_DEPENDS ${proj}) if(MITK_USE_HDF5) list(APPEND proj_DEPENDENCIES HDF5) endif() if(NOT DEFINED VTK_DIR) set(additional_cmake_args ) # Optionally enable memory leak checks for any objects derived from vtkObject. This # will force unit tests to fail if they have any of these memory leaks. option(MITK_VTK_DEBUG_LEAKS OFF) mark_as_advanced(MITK_VTK_DEBUG_LEAKS) list(APPEND additional_cmake_args -DVTK_DEBUG_LEAKS:BOOL=${MITK_VTK_DEBUG_LEAKS} ) if(MITK_USE_Python) set(_vtk_install_python_dir -DVTK_INSTALL_PYTHON_MODULE_DIR:PATH=${ep_prefix}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) list(APPEND additional_cmake_args -DVTK_WRAP_PYTHON:BOOL=ON -DVTK_USE_TK:BOOL=OFF -DVTK_WINDOWS_PYTHON_DEBUGGABLE:BOOL=OFF -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE} -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR} -DPYTHON_INCLUDE_DIR2:PATH=${PYTHON_INCLUDE_DIR2} -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY} -DVTK_PYTHON_VERSION:STRING=3 ${_vtk_install_python_dir} ) else() list(APPEND additional_cmake_args -DVTK_WRAP_PYTHON:BOOL=OFF -DVTK_WINDOWS_PYTHON_DEBUGGABLE:BOOL=OFF ) endif() if(MITK_USE_Qt5) list(APPEND additional_cmake_args -DVTK_Group_Qt:BOOL=ON -DQt5_DIR:PATH=${Qt5_DIR} ) endif() if(CTEST_USE_LAUNCHERS) list(APPEND additional_cmake_args "-DCMAKE_PROJECT_${proj}_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake" ) endif() + + set (VTK_PATCH_OPTION + PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_LIST_DIR}/VTK-8.1.0.patch) ExternalProject_Add(${proj} LIST_SEPARATOR ${sep} URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/VTK-8.1.0.tar.gz URL_MD5 4fa5eadbc8723ba0b8d203f05376d932 + ${VTK_PATCH_OPTION} CMAKE_GENERATOR ${gen} CMAKE_ARGS ${ep_common_args} -DVTK_WRAP_TCL:BOOL=OFF -DVTK_WRAP_PYTHON:BOOL=OFF -DVTK_WRAP_JAVA:BOOL=OFF -DVTK_USE_SYSTEM_FREETYPE:BOOL=${VTK_USE_SYSTEM_FREETYPE} -DVTK_LEGACY_REMOVE:BOOL=ON -DModule_vtkTestingRendering:BOOL=ON ${additional_cmake_args} CMAKE_CACHE_ARGS ${ep_common_cache_args} CMAKE_CACHE_DEFAULT_ARGS ${ep_common_cache_default_args} DEPENDS ${proj_DEPENDENCIES} ) set(VTK_DIR ${ep_prefix}) mitkFunctionInstallExternalCMakeProject(${proj}) else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif()