@@ -2,25 +2,52 @@ if(NOT WITH_VTK OR ANDROID OR IOS)
return()
endif()
if(HAVE_QT5)
message(STATUS "VTK is disabled because OpenCV is linked with Q5. Some VTK disributives are compiled with Q4 and therefore can't be linked together Qt5.")
message(STATUS "VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or set $VTK_DIR enviroment variable to VTK install subdirectory with VTKConfig.cmake file (for windows)")
# Different Qt versions can't be linked together
if(HAVE_QT AND ${VTK_VERSION} VERSION_GREATER "6.0.0" AND NOT ${VTK_QT_VERSION} STREQUAL "")
if(HAVE_QT5 AND ${VTK_QT_VERSION} EQUAL "4")
message(STATUS "VTK support is disabled. Incompatible combination: OpenCV + Qt5 and VTK ver.${VTK_VERSION} + Qt4")
return()
endif()
if(NOT HAVE_QT5 AND ${VTK_QT_VERSION} EQUAL "5")
message(STATUS "VTK support is disabled. Incompatible combination: OpenCV + Qt4 and VTK ver.${VTK_VERSION} + Qt5")