vtk9.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. diff --git a/cmake/OpenCVDetectVTK.cmake b/cmake/OpenCVDetectVTK.cmake
  2. index 312fd41fe4..aeda80d47c 100644
  3. --- a/cmake/OpenCVDetectVTK.cmake
  4. +++ b/cmake/OpenCVDetectVTK.cmake
  5. @@ -1,8 +1,5 @@
  6. if(NOT VTK_FOUND)
  7. - find_package(VTK QUIET NAMES vtk VTK)
  8. - if(VTK_FOUND)
  9. - if(NOT (VTK_VERSION VERSION_LESS "9.0.0") AND (VTK_VERSION VERSION_LESS "10.0.0")) # VTK 9.x
  10. - find_package(VTK 9 QUIET NAMES vtk COMPONENTS
  11. + find_package(VTK 9 QUIET NAMES vtk COMPONENTS
  12. FiltersExtraction
  13. FiltersSources
  14. FiltersTexture
  15. @@ -14,21 +11,6 @@ if(NOT VTK_FOUND)
  16. RenderingLOD
  17. RenderingOpenGL2
  18. NO_MODULE)
  19. - elseif(VTK_VERSION VERSION_GREATER "5") # VTK 6.x components
  20. - find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
  21. - IF(VTK_FOUND)
  22. - IF(VTK_RENDERING_BACKEND) #in vtk 7, the rendering backend is exported as a var.
  23. - find_package(VTK QUIET COMPONENTS vtkRendering${VTK_RENDERING_BACKEND} vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport vtkIOGeometry NO_MODULE)
  24. - ELSE(VTK_RENDERING_BACKEND)
  25. - find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
  26. - ENDIF(VTK_RENDERING_BACKEND)
  27. - ENDIF(VTK_FOUND)
  28. - elseif(VTK_VERSION VERSION_EQUAL "5") # VTK 5.x components
  29. - find_package(VTK QUIET COMPONENTS vtkCommon NO_MODULE)
  30. - else()
  31. - set(VTK_FOUND FALSE)
  32. - endif()
  33. - endif()
  34. endif()
  35. if(NOT VTK_FOUND)