diff options
Diffstat (limited to 'gr-qtgui/python/qtgui/CMakeLists.txt')
-rw-r--r-- | gr-qtgui/python/qtgui/CMakeLists.txt | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gr-qtgui/python/qtgui/CMakeLists.txt b/gr-qtgui/python/qtgui/CMakeLists.txt index 1c20033db2..5df3a7d91b 100644 --- a/gr-qtgui/python/qtgui/CMakeLists.txt +++ b/gr-qtgui/python/qtgui/CMakeLists.txt @@ -20,12 +20,20 @@ ######################################################################## include(GrPython) +if (DESIRED_QT_VERSION MATCHES 4) + set(PY_QT_IMPORT "from PyQt4 import Qt, QtCore, QtGui as QtWidgets") +else() + set(PY_QT_IMPORT "from PyQt5 import Qt, QtCore, QtWidgets") +endif() + +configure_file(range.py.cmakein "${CMAKE_CURRENT_BINARY_DIR}/range.py" @ONLY) +configure_file(util.py.cmakein "${CMAKE_CURRENT_BINARY_DIR}/util.py" @ONLY) + GR_PYTHON_INSTALL( FILES __init__.py - range.py - util.py + "${CMAKE_CURRENT_BINARY_DIR}/range.py" + "${CMAKE_CURRENT_BINARY_DIR}/util.py" DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui - COMPONENT "qtgui_python" ) ######################################################################## |