diff options
Diffstat (limited to 'plugins/pythonextensions/pyside2.pri')
-rw-r--r-- | plugins/pythonextensions/pyside2.pri | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/plugins/pythonextensions/pyside2.pri b/plugins/pythonextensions/pyside2.pri new file mode 100644 index 0000000..3e6cc23 --- /dev/null +++ b/plugins/pythonextensions/pyside2.pri @@ -0,0 +1,42 @@ +# Discover PySide2 configuration + +PYSIDE_CONFIG = ../../tools/pyside2_config.py + +PYSIDE2 = $$system($$PYTHON $$PYSIDE_CONFIG --pyside2) +isEmpty(PYSIDE2): error(Unable to locate the PySide2 package location) + +PYTHON_INCLUDE = $$system($$PYTHON $$PYSIDE_CONFIG --python-include) +isEmpty(PYTHON_INCLUDE): error(Unable to locate the Python include headers directory) + +PYTHON_LFLAGS = $$system($$PYTHON $$PYSIDE_CONFIG --python-link) +isEmpty(PYTHON_LFLAGS): error(Unable to locate the Python library for linking) + +PYSIDE2_INCLUDE = $$system($$PYTHON $$PYSIDE_CONFIG --pyside2-include) +isEmpty(PYSIDE2_INCLUDE): error(Unable to locate the PySide2 include headers directory) + +PYSIDE2_LFLAGS = $$system($$PYTHON $$PYSIDE_CONFIG --pyside2-link) +isEmpty(PYSIDE2_LFLAGS): error(Unable to locate the PySide2 libraries for linking) + +PYSIDE2_SHARED_LIBRARIES = $$system($$PYTHON $$PYSIDE_CONFIG --pyside2-shared-libraries) +isEmpty(PYSIDE2_SHARED_LIBRARIES): error(Unable to locate the used PySide2 shared libraries) + +INCLUDEPATH += "$$PYTHON_INCLUDE" $$PYSIDE2_INCLUDE +LIBS += $$PYTHON_LFLAGS $$PYSIDE2_LFLAGS +!build_pass:message(INCLUDEPATH is $$INCLUDEPATH) +!build_pass:message(LIBS are $$LIBS) + +!build_pass:message(Using $$PYSIDE2) + +!win32 { + QMAKE_RPATHDIR += $$PYSIDE2 +} + +# Needed to fix Python dynamic linking problems +# see pyutil.cpp +LIBS += -ldl + +# Suppress non-relevant warnings from +# Shiboken generated code +QMAKE_CXXFLAGS += \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter |