@@ -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 | macx { |
|
11 | macx { | |
11 | # 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 | |
12 | INCLUDEPATH += /System/Library/Frameworks/Python.framework/Headers |
|
13 | INCLUDEPATH += /System/Library/Frameworks/Python.framework/Headers | |
13 | LIBS += -F/System/Library/Frameworks -framework Python |
|
14 | LIBS += -F/System/Library/Frameworks -framework Python | |
14 | } else:win32 { |
|
15 | } else:win32 { | |
15 | # 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 | |
16 | # 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 | |
17 | # 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). | |
18 | # 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 | |
19 | # the directory where the python libs are located. |
|
20 | # the directory where the python libs are located. | |
20 | # |
|
21 | # | |
21 | # When using the prebuild Python installer, this will be: |
|
22 | # When using the prebuild Python installer, this will be: | |
22 | # set PYTHON_PATH = c:\Python26 |
|
23 | # set PYTHON_PATH = c:\Python26 | |
23 | # set PYTHON_LIB = c:\Python26\libs |
|
24 | # set PYTHON_LIB = c:\Python26\libs | |
24 | # |
|
25 | # | |
25 | # When using the python sources, this will be something like: |
|
26 | # When using the python sources, this will be something like: | |
26 | # set PYTHON_PATH = c:\yourDir\Python-2.6.1\ |
|
27 | # set PYTHON_PATH = c:\yourDir\Python-2.6.1\ | |
27 | # set PYTHON_LIB = c:\yourDir\Python-2.6.1\PCbuild8\Win32 |
|
28 | # set PYTHON_LIB = c:\yourDir\Python-2.6.1\PCbuild8\Win32 | |
28 |
|
29 | |||
29 | # check if debug or release |
|
30 | # check if debug or release | |
30 | CONFIG(debug, debug|release) { |
|
31 | CONFIG(debug, debug|release) { | |
31 | DEBUG_EXT = _d |
|
32 | DEBUG_EXT = _d | |
32 | } else { |
|
33 | } else { | |
33 | DEBUG_EXT = |
|
34 | DEBUG_EXT = | |
34 | } |
|
35 | } | |
35 |
|
36 | |||
36 | win32:INCLUDEPATH += $$PYTHON_PATH/PC $$PYTHON_PATH/include |
|
37 | win32:INCLUDEPATH += $$PYTHON_PATH/PC $$PYTHON_PATH/include | |
37 | win32-msvc*:LIBS += $$PYTHON_LIB/python$${PYTHON_VERSION}$${DEBUG_EXT}.lib |
|
38 | win32-msvc*:LIBS += $$PYTHON_LIB/python$${PYTHON_VERSION}$${DEBUG_EXT}.lib | |
38 | win32-g++:LIBS += $$PYTHON_PATH/libs/libpython$${PYTHON_VERSION}.a |
|
39 | win32-g++:LIBS += $$PYTHON_PATH/libs/libpython$${PYTHON_VERSION}.a | |
39 |
|
40 | |||
40 | } else:unix { |
|
41 | } else:unix { | |
41 | # on linux, python-config is used to autodetect Python. |
|
42 | # on linux, python-config is used to autodetect Python. | |
42 | # make sure that you have installed a matching python-dev package. |
|
43 | # make sure that you have installed a matching python-dev package. | |
43 |
|
44 | |||
44 | unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs) |
|
45 | unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs) | |
45 | unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes) |
|
46 | unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes) | |
46 | } |
|
47 | } | |
47 |
|
48 | |||
48 | INCLUDEPATH += $$[QT_INSTALL_HEADERS]/PythonQt |
|
49 | INCLUDEPATH += $$[QT_INSTALL_HEADERS]/PythonQt | |
49 |
|
50 | |||
50 | # check if debug or release |
|
51 | # check if debug or release | |
51 | CONFIG(debug, debug|release) { |
|
52 | CONFIG(debug, debug|release) { | |
52 | DEBUG_EXT = _d |
|
53 | DEBUG_EXT = _d | |
53 | } else { |
|
54 | } else { | |
54 | DEBUG_EXT = |
|
55 | DEBUG_EXT = | |
55 | } |
|
56 | } | |
56 |
|
57 | |||
57 | #win32-msvc*:LIBS += $$PWD/../lib/PythonQt$${DEBUG_EXT}.lib |
|
58 | #win32-msvc*:LIBS += $$PWD/../lib/PythonQt$${DEBUG_EXT}.lib | |
58 | #win32-g++:LIBS += $$PWD/../lib/libPythonQt$${DEBUG_EXT}.a |
|
59 | #win32-g++:LIBS += $$PWD/../lib/libPythonQt$${DEBUG_EXT}.a | |
59 | #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} | |
60 |
|
61 | |||
61 | ######################################################################################## |
|
62 | ######################################################################################## | |
62 | #################### PYTHON_QT_ALL ################################################### |
|
63 | #################### PYTHON_QT_ALL ################################################### | |
63 | ######################################################################################## |
|
64 | ######################################################################################## | |
64 | contains(CONFIG,BUILDING_QTALL){ |
|
65 | contains(CONFIG,BUILDING_QTALL){ | |
65 | message("BUILDING_QTALL") |
|
66 | message("BUILDING_QTALL") | |
66 | } |
|
67 | } | |
67 | !contains(CONFIG,BUILDING_QTALL){ |
|
68 | !contains(CONFIG,BUILDING_QTALL){ | |
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 | ######################################################################################## | |
72 | #################### PYTHON_QT ###################################################### |
|
73 | #################### PYTHON_QT ###################################################### | |
73 | ######################################################################################## |
|
74 | ######################################################################################## | |
74 |
|
75 | |||
75 | win32::LIBS += -lPythonQt$${DEBUG_EXT} |
|
76 | win32::LIBS += -lPythonQt$${DEBUG_EXT} | |
76 | unix::LIBS += -lPythonQt$${DEBUG_EXT} |
|
77 | unix::LIBS += -lPythonQt$${DEBUG_EXT} |
General Comments 0
You need to be logged in to leave comments.
Login now