Add patch to fix compilation error if no QVTK is found
authorJochen Sprickerhof <git@jochen.sprickerhof.de>
Thu, 15 Oct 2015 15:51:56 +0000 (17:51 +0200)
committerJochen Sprickerhof <git@jochen.sprickerhof.de>
Thu, 15 Oct 2015 15:51:56 +0000 (17:51 +0200)
debian/patches/0011-Only-set-QVTK_FOUND-if-it-s-actually-found.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0011-Only-set-QVTK_FOUND-if-it-s-actually-found.patch b/debian/patches/0011-Only-set-QVTK_FOUND-if-it-s-actually-found.patch
new file mode 100644 (file)
index 0000000..a46acce
--- /dev/null
@@ -0,0 +1,31 @@
+From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
+Date: Thu, 15 Oct 2015 17:44:48 +0200
+Subject: Only set QVTK_FOUND if it's actually found
+
+list(FIND ..) set's the variable to -1 if the string is not found, so
+QVTK_FOUND was set regardless if it was installed or not. This uses the
+shorter MATCHES syntax to test for the modules.
+---
+ cmake/Modules/FindQVTK.cmake | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/cmake/Modules/FindQVTK.cmake b/cmake/Modules/FindQVTK.cmake
+index 1e9d683..9f48adf 100644
+--- a/cmake/Modules/FindQVTK.cmake
++++ b/cmake/Modules/FindQVTK.cmake
+@@ -21,12 +21,10 @@ if (${VTK_MAJOR_VERSION} VERSION_LESS "6.0")
+     set (VTK_USE_QVTK ON)
+   endif(NOT QVTK_FOUND)
+ else (${VTK_MAJOR_VERSION} VERSION_LESS "6.0")
+-  list (FIND VTK_MODULES_ENABLED vtkGUISupportQt GUI_SUPPORT_QT_FOUND)
+-  list (FIND VTK_MODULES_ENABLED vtkRenderingQt RENDERING_QT_FOUND)
+-  if (GUI_SUPPORT_QT_FOUND AND RENDERING_QT_FOUND)
++  if (";${VTK_MODULES_ENABLED};" MATCHES ";vtkCommonCore;" AND ";${VTK_MODULES_ENABLED};" MATCHES ";vtkRenderingQt;")
+     set (VTK_USE_QVTK ON)
+     set (QVTK_LIBRARY vtkRenderingQt vtkGUISupportQt)
+-  else (GUI_SUPPORT_QT_FOUND AND RENDERING_QT_FOUND)
++  else ()
+     unset(QVTK_FOUND)
+-  endif (GUI_SUPPORT_QT_FOUND AND RENDERING_QT_FOUND)
++  endif ()
+ endif (${VTK_MAJOR_VERSION} VERSION_LESS "6.0")
index ccc1c73a9ef07040790e21bada81818ec120c9b3..123c5f60b6bcbe557f49836007b16ee4af036b9d 100644 (file)
@@ -8,3 +8,4 @@
 0008-Fixes-manual_registration-and-segmentation-demo-for-.patch
 0009-Fix-THIS_METHOD_IS_ONLY_FOR_1x1_EXPRESSIONS.patch
 0010-Fix-THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS.patch
+0011-Only-set-QVTK_FOUND-if-it-s-actually-found.patch