Update OpenCVDetectVTK.cmake#20764
Conversation
cmake/OpenCVDetectVTK.cmake
Outdated
| find_package(VTK QUIET NAMES vtk VTK) | ||
| if(VTK_FOUND) | ||
| if(VTK_VERSION VERSION_EQUAL "9") # VTK 9.0 | ||
| if(VTK_VERSION VERSION_GREATER "8.2.0") # VTK 9.0 |
There was a problem hiding this comment.
What is about 8.2.1 patch fix? Why is it should be handled as 9.0?
I expecting this condition here:
if(NOT (VTK_VERSION VERSION_LESS "9.0.0")) # VTK 9.x+
There was a problem hiding this comment.
see https://github.com/Kitware/VTK/releases
8.2.0 seems the last ver of 8.x series
There was a problem hiding this comment.
see https://github.com/Kitware/VTK/releases
8.2.0 seems the last ver of 8.x series
I think, @alalek means that there can be bugfix backported to 8.2, which will break VTK_VERSION VERSION_GREATER "8.2.0" condition. It can be fixed like:
if(NOT (VTK_VERSION VERSION_LESS "9.0.0") AND (VTK_VERSION VERSION_LESS "10.0.0")) # VTK 9.x
There was a problem hiding this comment.
i updated if(NOT (VTK_VERSION VERSION_LESS "9.0.0") AND (VTK_VERSION VERSION_LESS "10.0.0")) # VTK 9.x
but maybe if(NOT (VTK_VERSION VERSION_LESS "9.0.0")) # VTK 9.x+ better because maybe version 10.x will not need any additional changes here.
There was a problem hiding this comment.
@sturkmen72, it will, since the line below reads find_package(VTK 9 QUIET NAMES vtk COMPONENTS ....
ff0656c to
f8f6cd6
Compare
solves #20717