Skip to content

Commit e4db838

Browse files
committed
allow to set PYTHON_VERSION as env variable
fixed wrong library name
1 parent d1c660d commit e4db838

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

build/PythonQt.prf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ CONFIG(debug, debug|release) {
1111
DEBUG_EXT =
1212
}
1313

14-
win32::LIBS += $$PWD/../liPythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
14+
win32::LIBS += $$PWD/../PythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
1515
unix::LIBS += -L$$PWD/../lib -lPythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}

build/python.prf

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# profile to include and link Python
22

3+
34
# Change this variable to your python version (2.6, 2.7, 3.3, ...)
4-
win32:PYTHON_VERSION=27
5-
unix:PYTHON_VERSION=2.7
5+
PYTHON_VERSION=$$(PYTHON_VERSION)
6+
isEmpty( PYTHON_VERSION ) {
7+
win32:PYTHON_VERSION=27
8+
unix:PYTHON_VERSION=2.7
9+
}
10+
611

712
macx {
813
# for macx you need to have the Python development kit installed as framework
@@ -35,7 +40,7 @@ macx {
3540
} else:unix {
3641
# on linux, python-config is used to autodetect Python.
3742
# make sure that you have installed a matching python-dev package.
38-
39-
unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs)
43+
44+
unix:LIBS += $$system(python$${PYTHON_VERSION}-config --ldflags)
4045
unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes)
4146
}

0 commit comments

Comments
 (0)