summaryrefslogtreecommitdiff
path: root/graphics/paraview/1201.diff
blob: 04b5345de6f538cb8015ab52eb2a27925e5b186f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Upstream patch to fix building of PythonQt plugin.
# From http://gitlab.kitware.com/paraview/paraview/merge_requests/1201/diffs
#
diff --git a/Plugins/PythonQtPlugin/CMakeLists.txt b/Plugins/PythonQtPlugin/CMakeLists.txt
index d87853b..d249961 100644
--- a/Plugins/PythonQtPlugin/CMakeLists.txt
+++ b/Plugins/PythonQtPlugin/CMakeLists.txt
@@ -7,6 +7,8 @@ else()
   include(${PARAVIEW_USE_FILE})
 endif()
 
+include(ParaViewQt)
+pv_find_package_qt(qt_targets REQUIRED QT4_COMPONENTS QtGui QT5_COMPONENTS Widgets)
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
 find_package(PythonQt REQUIRED)
@@ -23,17 +25,7 @@ set(PythonQtPlugin_MOC_SRCS
   pqPythonEventFilter.h
   )
 
-if (PARAVIEW_QT_VERSION VERSION_GREATER "4")
-  qt5_wrap_cpp(MOC_SRCS
-    ${PythonQtPlugin_MOC_SRCS}
-    ${decorator_file}
-    )
-else ()
-  qt4_wrap_cpp(MOC_SRCS
-    ${PythonQtPlugin_MOC_SRCS}
-    ${decorator_file}
-    )
-endif ()
+pv_qt_wrap_cpp(MOC_SRCS ${PythonQtPlugin_MOC_SRCS} ${decorator_file})
 
 set(srcs
   pqPythonQtPlugin.cxx