Skip to content

Commit 554e6d8

Browse files
committed
changes to the build scripts as provided on the forum (not tested)
1 parent 1a8de2f commit 554e6d8

File tree

6 files changed

+150
-18
lines changed

6 files changed

+150
-18
lines changed

build/PythonQt.prf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# profile for non-mevis users to link to PythonQt
1+
# profile for non-mevis users to link to PythonQt
22

33
include ( python.prf )
4-
5-
INCLUDEPATH += $$PWD/../src
6-
7-
# check if debug or release
8-
CONFIG(debug, debug|release) {
9-
DEBUG_EXT = _d
10-
} else {
11-
DEBUG_EXT =
12-
}
13-
14-
win32::LIBS += $$PWD/../PythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
15-
unix::LIBS += -L$$PWD/../lib -lPythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}
4+
5+
INCLUDEPATH += $$PWD/../src
6+
7+
# check if debug or release
8+
CONFIG(debug, debug|release) {
9+
DEBUG_EXT = _d
10+
} else {
11+
DEBUG_EXT =
12+
}
13+
14+
win32::LIBS += $$DESTDIR/../lib/PythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
15+
unix::LIBS += -L$$DESTDIR/../lib -lPythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}

build/PythonQt_QtAll.prf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ CONFIG(debug, debug|release) {
99
DEBUG_EXT =
1010
}
1111

12-
win32::LIBS += $$PWD/../liPythonQt_QtAll-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
13-
unix::LIBS += -L$$PWD/../lib -lPythonQt_QtAll-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}
12+
win32::LIBS += $$DESTDIR/../lib/PythonQt_QtAll-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
13+
unix::LIBS += -L$$DESTDIR/../lib -lPythonQt_QtAll-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}

build/common.prf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ PYTHONQT_GENERATED_PATH = $$PWD/../generated_cpp
5151
}
5252

5353
VERSION = 3.2.0
54+
55+
win32: CONFIG += skip_target_version_ext

extensions/PythonQt_QtAll/PythonQt_QtAll.cpp

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,42 @@
3434

3535
#include "PythonQt.h"
3636

37+
#ifdef PYTHONQT_WITH_GUI
3738
void PythonQt_init_QtGui(PyObject*);
39+
#endif
40+
#ifdef PYTHONQT_WITH_SVG
3841
void PythonQt_init_QtSvg(PyObject*);
42+
#endif
43+
#ifdef PYTHONQT_WITH_SQL
3944
void PythonQt_init_QtSql(PyObject*);
45+
#endif
46+
#ifdef PYTHONQT_WITH_NETWORK
4047
void PythonQt_init_QtNetwork(PyObject*);
48+
#endif
49+
#ifdef PYTHONQT_WITH_CORE
4150
void PythonQt_init_QtCore(PyObject*);
51+
#endif
52+
#ifdef PYTHONQT_WITH_OPENGL
4253
void PythonQt_init_QtOpenGL(PyObject*);
54+
#endif
55+
#ifdef PYTHONQT_WITH_XML
4356
void PythonQt_init_QtXml(PyObject*);
57+
#endif
58+
#ifdef PYTHONQT_WITH_XMLPATTERNS
4459
void PythonQt_init_QtXmlPatterns(PyObject*);
60+
#endif
61+
#ifdef PYTHONQT_WITH_MULTIMEDIA
4562
void PythonQt_init_QtMultimedia(PyObject*);
63+
#endif
64+
#ifdef PYTHONQT_WITH_QML
4665
void PythonQt_init_QtQml(PyObject*);
66+
#endif
67+
#ifdef PYTHONQT_WITH_QUICK
4768
void PythonQt_init_QtQuick(PyObject*);
69+
#endif
70+
#ifdef PYTHONQT_WITH_UITOOLS
4871
void PythonQt_init_QtUiTools(PyObject*);
72+
#endif
4973

5074
#ifdef PYTHONQT_WITH_WEBKIT
5175
void PythonQt_init_QtWebKit(PyObject*);
@@ -54,21 +78,45 @@ void PythonQt_init_QtWebKit(PyObject*);
5478
namespace PythonQt_QtAll
5579
{
5680
PYTHONQT_QTALL_EXPORT void init() {
81+
#ifdef PYTHONQT_WITH_CORE
5782
PythonQt_init_QtCore(0);
83+
#endif
84+
#ifdef PYTHONQT_WITH_NETWORK
5885
PythonQt_init_QtNetwork(0);
86+
#endif
87+
#ifdef PYTHONQT_WITH_GUI
5988
PythonQt_init_QtGui(0);
89+
#endif
90+
#ifdef PYTHONQT_WITH_XML
6091
PythonQt_init_QtXml(0);
92+
#endif
93+
#ifdef PYTHONQT_WITH_SVG
6194
PythonQt_init_QtSvg(0);
95+
#endif
96+
#ifdef PYTHONQT_WITH_SQL
6297
PythonQt_init_QtSql(0);
98+
#endif
6399
#ifdef PYTHONQT_WITH_WEBKIT
64100
PythonQt_init_QtWebKit(0);
65101
#endif
102+
#ifdef PYTHONQT_WITH_OPENGL
66103
PythonQt_init_QtOpenGL(0);
104+
#endif
105+
#ifdef PYTHONQT_WITH_XMLPATTERNS
67106
PythonQt_init_QtXmlPatterns(0);
107+
#endif
108+
#ifdef PYTHONQT_WITH_MULTIMEDIA
68109
PythonQt_init_QtMultimedia(0);
110+
#endif
111+
#ifdef PYTHONQT_WITH_QML
69112
PythonQt_init_QtQml(0);
113+
#endif
114+
#ifdef PYTHONQT_WITH_QUICK
70115
PythonQt_init_QtQuick(0);
116+
#endif
117+
#ifdef PYTHONQT_WITH_UITOOLS
71118
PythonQt_init_QtUiTools(0);
119+
#endif
72120
};
73121
};
74122

extensions/PythonQt_QtAll/PythonQt_QtAll.pro

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
1-
# If Qt has support for webkit, add it:
2-
qtHaveModule(webkit):CONFIG += PythonQtWebKit
1+
# get external pythonqtall config or enable all by default
2+
3+
isEmpty( PYTHONQTALL_CONFIG ) {
4+
message("using default PythonQt_QtAll Configuration")
5+
CONFIG += PythonQtCore
6+
CONFIG += PythonQtGui
7+
CONFIG += PythonQtSvg
8+
CONFIG += PythonQtSql
9+
CONFIG += PythonQtNetwork
10+
CONFIG += PythonQtOpengl
11+
CONFIG += PythonQtXml
12+
CONFIG += PythonQtXmlpatterns
13+
CONFIG += PythonQtMultimedia
14+
CONFIG += PythonQtQml
15+
CONFIG += PythonQtQuick
16+
CONFIG += PythonQtUiTools
17+
18+
qtHaveModule(webkit):CONFIG += PythonQtWebKit
19+
} else {
20+
message("using given PythonQt_QtAll Configuration: ")
21+
message(" $${PYTHONQTALL_CONFIG}")
22+
CONFIG += $${PYTHONQTALL_CONFIG}
23+
}
324

425
TARGET = PythonQt_QtAll-Qt5-PythonXY
526
TEMPLATE = lib
@@ -24,18 +45,70 @@ QT += gui svg sql network xml xmlpatterns opengl
2445
QT += widgets printsupport multimedia multimediawidgets
2546
QT += quick qml quickwidgets uitools
2647

48+
unix: target.path = /lib
49+
win32: target.path = /
50+
51+
INSTALLS += target
52+
53+
PythonQtCore {
54+
DEFINES += PYTHONQT_WITH_CORE
2755
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_core/com_trolltech_qt_core.pri)
56+
}
57+
58+
PythonQtGui {
59+
DEFINES += PYTHONQT_WITH_GUI
2860
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_gui/com_trolltech_qt_gui.pri)
61+
}
62+
63+
PythonQtSvg {
64+
DEFINES += PYTHONQT_WITH_SVG
2965
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_svg/com_trolltech_qt_svg.pri)
66+
}
67+
68+
PythonQtSql {
69+
DEFINES += PYTHONQT_WITH_SQL
3070
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_sql/com_trolltech_qt_sql.pri)
71+
}
72+
73+
PythonQtNetwork {
74+
DEFINES += PYTHONQT_WITH_NETWORK
3175
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_network/com_trolltech_qt_network.pri)
32-
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_opengl/com_trolltech_qt_opengl.pri)
76+
}
77+
78+
PythonQtOpengl {
79+
DEFINES += PYTHONQT_WITH_OPENGL
80+
PythonQtCore: include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_opengl/com_trolltech_qt_opengl.pri)
81+
}
82+
83+
PythonQtXml {
84+
DEFINES += PYTHONQT_WITH_XML
3385
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_xml/com_trolltech_qt_xml.pri)
86+
}
87+
88+
PythonQtXmlpatterns {
89+
DEFINES += PYTHONQT_WITH_XMLPATTERNS
3490
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_xmlpatterns/com_trolltech_qt_xmlpatterns.pri)
91+
}
92+
93+
PythonQtMultimedia {
94+
DEFINES += PYTHONQT_WITH_MULTIMEDIA
3595
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia.pri)
96+
}
97+
98+
PythonQtQml {
99+
DEFINES += PYTHONQT_WITH_QML
36100
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_qml/com_trolltech_qt_qml.pri)
101+
}
102+
103+
PythonQtQuick {
104+
DEFINES += PYTHONQT_WITH_QUICK
37105
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_quick/com_trolltech_qt_quick.pri)
106+
}
107+
108+
PythonQtUiTools {
109+
DEFINES += PYTHONQT_WITH_UITOOLS
38110
include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_uitools/com_trolltech_qt_uitools.pri)
111+
}
39112

40113
PythonQtWebKit {
41114
QT += webkit webkitwidgets

src/src.pro

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,12 @@ include ( src.pri )
4141

4242
include($${PYTHONQT_GENERATED_PATH}/com_trolltech_qt_core_builtin/com_trolltech_qt_core_builtin.pri)
4343
include($${PYTHONQT_GENERATED_PATH}/com_trolltech_qt_gui_builtin/com_trolltech_qt_gui_builtin.pri)
44+
45+
46+
unix: target.path = /lib
47+
win32: target.path = /
48+
49+
headers.files = $${HEADERS} $$PWD/PythonQtPythonInclude.h
50+
headers.path = /include
51+
52+
INSTALLS += target headers

0 commit comments

Comments
 (0)