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
7 - find_package(VTK QUIET NAMES vtk VTK)
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
15 @@ -14,21 +11,6 @@ if(NOT VTK_FOUND)
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)
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)
28 - elseif(VTK_VERSION VERSION_EQUAL "5") # VTK 5.x components
29 - find_package(VTK QUIET COMPONENTS vtkCommon NO_MODULE)
31 - set(VTK_FOUND FALSE)