##// END OF EJS Templates
Fixed build error.
jeandet -
r5:0ffe7cbccf2e default
parent child
Show More
@@ -1,76 +1,77
1 # profile for non-mevis users to link to PythonQt
1 # profile for non-mevis users to link to PythonQt
2
2
3 # profile to include and link Python
3 # profile to include and link Python
4
4
5 # Change this variable to your python version (2.5, 2.6)
5 # Change this variable to your python version (2.5, 2.6)
6 win32:PYTHON_VERSION=27
6 win32:PYTHON_VERSION=27
7 unix:PYTHON_VERSION=2.7
7 unix:PYTHON_VERSION=2.7
8 PYTHON_PATH=C:/Python27/
8 PYTHON_PATH=C:/Python27/
9 PYTHON_LIB=C:/Python27/libs/
9 PYTHON_LIB=C:/Python27/libs/
10 INCLUDEPATH += $$[QT_INSTALL_HEADERS]/PythonQt
10 INCLUDEPATH += $$[QT_INSTALL_HEADERS]/PythonQt
11 macx {
11 macx {
12 # for macx you need to have the Python development kit installed as framework
12 # for macx you need to have the Python development kit installed as framework
13 INCLUDEPATH += /System/Library/Frameworks/Python.framework/Headers
13 INCLUDEPATH += /System/Library/Frameworks/Python.framework/Headers
14 LIBS += -F/System/Library/Frameworks -framework Python
14 LIBS += -F/System/Library/Frameworks -framework Python
15 } else:win32 {
15 } else:win32 {
16 # for windows install a Python development kit or build Python yourself from the sources
16 # for windows install a Python development kit or build Python yourself from the sources
17 # Make sure that you set the environment variable PYTHON_PATH to point to your
17 # Make sure that you set the environment variable PYTHON_PATH to point to your
18 # python installation (or the python sources/header files when building from source).
18 # python installation (or the python sources/header files when building from source).
19 # Make sure that you set the environment variable PYTHON_LIB to point to
19 # Make sure that you set the environment variable PYTHON_LIB to point to
20 # the directory where the python libs are located.
20 # the directory where the python libs are located.
21 #
21 #
22 # When using the prebuild Python installer, this will be:
22 # When using the prebuild Python installer, this will be:
23 # set PYTHON_PATH = c:\Python26
23 # set PYTHON_PATH = c:\Python26
24 # set PYTHON_LIB = c:\Python26\libs
24 # set PYTHON_LIB = c:\Python26\libs
25 #
25 #
26 # When using the python sources, this will be something like:
26 # When using the python sources, this will be something like:
27 # set PYTHON_PATH = c:\yourDir\Python-2.6.1\
27 # set PYTHON_PATH = c:\yourDir\Python-2.6.1\
28 # set PYTHON_LIB = c:\yourDir\Python-2.6.1\PCbuild8\Win32
28 # set PYTHON_LIB = c:\yourDir\Python-2.6.1\PCbuild8\Win32
29
29
30 # check if debug or release
30 # check if debug or release
31 CONFIG(debug, debug|release) {
31 CONFIG(debug, debug|release) {
32 DEBUG_EXT = _d
32 DEBUG_EXT = _d
33 } else {
33 } else {
34 DEBUG_EXT =
34 DEBUG_EXT =
35 }
35 }
36
36
37 win32:INCLUDEPATH += $$PYTHON_PATH/PC $$PYTHON_PATH/include
37 win32:INCLUDEPATH += $$PYTHON_PATH/PC $$PYTHON_PATH/include
38 win32-msvc*:LIBS += $$PYTHON_LIB/python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
38 win32-msvc*:LIBS += $$PYTHON_LIB/python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
39 win32-g++:LIBS += $$PYTHON_PATH/libs/libpython$${PYTHON_VERSION}.a
39 win32-g++:LIBS += $$PYTHON_PATH/libs/libpython$${PYTHON_VERSION}.a
40
40
41 } else:unix {
41 } else:unix {
42 # on linux, python-config is used to autodetect Python.
42 # on linux, python-config is used to autodetect Python.
43 # make sure that you have installed a matching python-dev package.
43 # make sure that you have installed a matching python-dev package.
44
44
45 unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs)
45 unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs)
46 unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes)
46 unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes)
47 }
47 }
48
48
49 INCLUDEPATH += $$[QT_INSTALL_HEADERS]/PythonQt
49 INCLUDEPATH += $$[QT_INSTALL_HEADERS]/PythonQt
50
50
51 # check if debug or release
51 # check if debug or release
52 CONFIG(debug, debug|release) {
52 CONFIG(debug, debug|release) {
53 DEBUG_EXT = _d
53 DEBUG_EXT = _d
54 } else {
54 } else {
55 DEBUG_EXT =
55 DEBUG_EXT =
56 }
56 }
57
57
58 #win32-msvc*:LIBS += $$PWD/../lib/PythonQt$${DEBUG_EXT}.lib
58 #win32-msvc*:LIBS += $$PWD/../lib/PythonQt$${DEBUG_EXT}.lib
59 #win32-g++:LIBS += $$PWD/../lib/libPythonQt$${DEBUG_EXT}.a
59 #win32-g++:LIBS += $$PWD/../lib/libPythonQt$${DEBUG_EXT}.a
60 #unix:LIBS += -L$$OUT_PWD/../lib -L$$OUT_PWD/../../lib -lPythonQt$${DEBUG_EXT}
60 #unix:LIBS += -L$$OUT_PWD/../lib -L$$OUT_PWD/../../lib -lPythonQt$${DEBUG_EXT}
61
61
62 ########################################################################################
62 ########################################################################################
63 #################### PYTHON_QT_ALL ###################################################
63 #################### PYTHON_QT_ALL ###################################################
64 ########################################################################################
64 ########################################################################################
65 contains(CONFIG,BUILDING_QTALL){
65 contains(CONFIG,BUILDING_QTALL){
66 message("BUILDING_QTALL")
66 message("BUILDING_QTALL")
67 LIBS += -L$$DESTDIR -lPythonQt$${DEBUG_EXT}
67 } else {
68 } else {
68 win32::LIBS += -lPythonQt_QtAll$${DEBUG_EXT}
69 win32::LIBS += -lPythonQt_QtAll$${DEBUG_EXT}
69 unix::LIBS += -lPythonQt_QtAll$${DEBUG_EXT}
70 unix::LIBS += -lPythonQt_QtAll$${DEBUG_EXT}
70 }
71 ########################################################################################
71 ########################################################################################
72 #################### PYTHON_QT ######################################################
72 #################### PYTHON_QT ######################################################
73 ########################################################################################
73 ########################################################################################
74
75 win32::LIBS += -lPythonQt$${DEBUG_EXT}
74 win32::LIBS += -lPythonQt$${DEBUG_EXT}
76 unix::LIBS += -lPythonQt$${DEBUG_EXT}
75 unix::LIBS += -lPythonQt$${DEBUG_EXT}
76 }
77
General Comments 0
You need to be logged in to leave comments. Login now