From 9145985ff4ac7089d5082f49a0cc9dab14769b55 Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Thu, 23 Jan 2014 14:41:21 +0400 Subject: [PATCH] added guard to prevent linking VTK with Qt5 --- cmake/OpenCVDetectVTK.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/OpenCVDetectVTK.cmake b/cmake/OpenCVDetectVTK.cmake index ef9aa8043c..78d1a73b69 100644 --- a/cmake/OpenCVDetectVTK.cmake +++ b/cmake/OpenCVDetectVTK.cmake @@ -2,6 +2,11 @@ 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.") + return() +endif() + find_package(VTK 6.0 QUIET COMPONENTS vtkRenderingCore vtkInteractionWidgets vtkInteractionStyle vtkIOLegacy vtkIOPLY vtkRenderingFreeType vtkRenderingLOD vtkFiltersTexture vtkIOExport NO_MODULE) if(NOT DEFINED VTK_FOUND OR NOT VTK_FOUND)