From 71baf2b188d74d9fe51f67783e567b6b9f1e3ce2 Mon Sep 17 00:00:00 2001
From: Leonardo Florez-Valencia <florez-l@javeriana.edu.co>
Date: Sun, 26 Jun 2016 23:46:08 -0500
Subject: [PATCH] ...

---
 cmake/cpPlugins_Qt4Tools.cmake | 46 ++++++++++------------------------
 1 file changed, 13 insertions(+), 33 deletions(-)

diff --git a/cmake/cpPlugins_Qt4Tools.cmake b/cmake/cpPlugins_Qt4Tools.cmake
index 80a2ef7..88a2528 100644
--- a/cmake/cpPlugins_Qt4Tools.cmake
+++ b/cmake/cpPlugins_Qt4Tools.cmake
@@ -1,22 +1,3 @@
-## ==========================
-## == Function to find Qt4 ==
-## ==========================
-
-FUNCTION(cpPlugins_FindQt4)
-FIND_PACKAGE(Qt4 REQUIRED)
-INCLUDE(${QT_USE_FILE})
-SET(
-  _required_vtk_modules
-  vtkGUISupportQt
-  vtkGUISupportQtOpenGL
-  )
-FOREACH(_m ${_required_vtk_modules})
-  IF(NOT ${_m}_LOADED)
-    MESSAGE(FATAL_ERROR "${_m} module is required but not available.")
-    BREAK()
-  ENDIF(NOT ${_m}_LOADED)
-ENDFOREACH(_m)
-ENDFUNCTION()
 
 ## ==================================================
 ## == Find Qt4 and check if it was well configured ==
@@ -24,20 +5,19 @@ ENDFUNCTION()
 
 SET(QT4_FOUND "0")
 IF(USE_QT4)
-  cpPlugins_FindQt4()
-#  FIND_PACKAGE(Qt4 REQUIRED)
-#  INCLUDE(${QT_USE_FILE})
-#  SET(
-#    _required_vtk_modules
-#    vtkGUISupportQt
-#    vtkGUISupportQtOpenGL
-#    )
-#  FOREACH(_m ${_required_vtk_modules})
-#    IF(NOT ${_m}_LOADED)
-#      MESSAGE(FATAL_ERROR "${_m} module is required but not available.")
-#      BREAK()
-#    ENDIF(NOT ${_m}_LOADED)
-#  ENDFOREACH(_m)
+  FIND_PACKAGE(Qt4 REQUIRED)
+  INCLUDE(${QT_USE_FILE})
+  SET(
+    _required_vtk_modules
+    vtkGUISupportQt
+    vtkGUISupportQtOpenGL
+    )
+  FOREACH(_m ${_required_vtk_modules})
+    IF(NOT ${_m}_LOADED)
+      MESSAGE(FATAL_ERROR "${_m} module is required but not available.")
+      BREAK()
+    ENDIF(NOT ${_m}_LOADED)
+  ENDFOREACH(_m)
   SET(QT4_FOUND "1")
 ENDIF(USE_QT4)
 
-- 
2.49.0