Skip to content

Commit 0fc29d7

Browse files
authored
Improve build system for TRIK (#1)
* Integrate the build system for the project * Adapt to the original PythonQt * Add log info * Improve script * Remove empty line
1 parent c8820f4 commit 0fc29d7

File tree

15 files changed

+19
-35
lines changed

15 files changed

+19
-35
lines changed

build/PythonQt.prf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ CONFIG(debug, debug|release) {
1111
DEBUG_EXT =
1212
}
1313

14-
PYTHONQT_LIB_NAME=PythonQt-Qt$${QT_MAJOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT}
14+
message("TRY READ DESTDIR: $$DESTDIR")
15+
!isEmpty(DESTDIR) {
16+
LIBS += -L$$DESTDIR
17+
QMAKE_RPATHDIR += $$DESTDIR
18+
}
1519

16-
win32-g++: LIBS += $$DESTDIR/../lib/$${PYTHONQT_LIB_NAME}.dll
17-
win32-*msvc*: LIBS += $$DESTDIR/../lib/$${PYTHONQT_LIB_NAME}.lib
18-
unix: LIBS += -L$$DESTDIR/../lib -l$${PYTHONQT_LIB_NAME}
20+
LIBS += -ltrikPythonQt-Qt$${QT_MAJOR_VERSION}$${QT_MINOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT}

build/PythonQt_QtAll.prf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# profile for non-mevis users to link to PythonQt_QtAll
22

3+
include(../build/PythonQt.prf)
34
INCLUDEPATH += $$PWD/../extensions/PythonQt_QtAll
45

56
# check if debug or release
@@ -9,7 +10,4 @@ CONFIG(debug, debug|release) {
910
DEBUG_EXT =
1011
}
1112

12-
13-
win32-g++: LIBS += $$DESTDIR/../lib/PythonQt_QtAll-Qt$${QT_MAJOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT}.dll
14-
win32-msvc*: LIBS += $$DESTDIR/../lib/PythonQt_QtAll-Qt$${QT_MAJOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
15-
unix: LIBS += -L$$DESTDIR/../lib -lPythonQt_QtAll-Qt$${QT_MAJOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT}
13+
LIBS += -ltrikPythonQt_QtAll-Qt$${QT_MAJOR_VERSION}$${QT_MINOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT}

build/common.prf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ CONFIG(debug, debug|release) {
1717
TARGET = $${TARGET}_d
1818
}
1919

20+
isEmpty(DESTDIR) {
21+
isEmpty(GLOBAL_DESTDIR): DESTDIR = $$PWD/../bin
22+
!isEmpty(GLOBAL_DESTDIR): DESTDIR = $$GLOBAL_DESTDIR
23+
}
24+
2025
# Allow override (e.g., qmake PYTHONQT_GENERATED_PATH=/abs/path)
2126
isEmpty(PYTHONQT_GENERATED_PATH) {
2227
PYTHONQT_GENERATED_PATH = $$PWD/../generated_cpp

examples/CPPPyWrapperExample/CPPPyWrapperExample.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ TEMPLATE = app
44

55
mac:CONFIG -= app_bundle
66

7-
DESTDIR = ../../lib
8-
97
include ( ../../build/common.prf )
108
include ( ../../build/PythonQt.prf )
119

examples/PyCPPWrapperExample/PyCPPWrapperExample.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
TARGET = PyCPPWrapperExample
88
TEMPLATE = app
99

10-
DESTDIR = ../../lib
11-
1210
include ( ../../build/common.prf )
1311
include ( ../../build/PythonQt.prf )
1412

examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
TARGET = PyCustomMetaTypeExample
88
TEMPLATE = app
99

10-
DESTDIR = ../../lib
11-
1210
include ( ../../build/common.prf )
1311
include ( ../../build/PythonQt.prf )
1412

examples/PyDecoratorsExample/PyDecoratorsExample.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
TARGET = PyDecoratorsExample
88
TEMPLATE = app
99

10-
DESTDIR = ../../lib
11-
1210
include ( ../../build/common.prf )
1311
include ( ../../build/PythonQt.prf )
1412

examples/PyGettingStarted/PyGettingStarted.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
TARGET = PyGettingStarted
88
TEMPLATE = app
99

10-
DESTDIR = ../../lib
11-
1210
CONFIG += console
1311

1412
include ( ../../build/common.prf )

examples/PyGuiExample/PyGuiExample.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ TEMPLATE = app
99

1010
mac:CONFIG -= app_bundle
1111

12-
DESTDIR = ../../lib
13-
1412
QT += widgets
1513

1614
include ( ../../build/common.prf )

examples/PyLauncher/PyLauncher.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ TEMPLATE = app
99

1010
mac:CONFIG -= app_bundle
1111

12-
DESTDIR = ../../lib
13-
1412
QT += widgets
1513

1614
include ( ../../build/common.prf )

0 commit comments

Comments
 (0)