##// END OF EJS Templates
Improved RPM build.
Jeandet Alexis -
r10:e0cdd9b77501 default
parent child
Show More
@@ -0,0 +1,99
1 # profile for non-mevis users to link to PythonQt
2
3 #=========================================================================#
4 # ____ _ _ __ _ #
5 # | _ \ _ _| |_| |__ ___ _ __ ___ ___ _ __ / _(_) __ _ #
6 # | |_) | | | | __| '_ \ / _ \| '_ \ / __/ _ \| '_ \| |_| |/ _` | #
7 # | __/| |_| | |_| | | | (_) | | | | | (_| (_) | | | | _| | (_| | #
8 # |_| \__, |\__|_| |_|\___/|_| |_| \___\___/|_| |_|_| |_|\__, | #
9 # |___/ |___/ #
10 #=========================================================================#
11 #
12
13 # Change this variable to your python version (2.5, 2.6)
14 win32:PYTHON_VERSION=27
15 unix:PYTHON_VERSION=2.7
16 PYTHON_PATH=C:/Python27/
17 PYTHON_LIB=C:/Python27/libs/
18 macx {
19 # for macx you need to have the Python development kit installed as framework
20 INCLUDEPATH += /System/Library/Frameworks/Python.framework/Headers
21 LIBS += -F/System/Library/Frameworks -framework Python
22 } else:win32 {
23 # for windows install a Python development kit or build Python yourself from the sources
24 # Make sure that you set the environment variable PYTHON_PATH to point to your
25 # python installation (or the python sources/header files when building from source).
26 # Make sure that you set the environment variable PYTHON_LIB to point to
27 # the directory where the python libs are located.
28 #
29 # When using the prebuild Python installer, this will be:
30 # set PYTHON_PATH = c:\Python26
31 # set PYTHON_LIB = c:\Python26\libs
32 #
33 # When using the python sources, this will be something like:
34 # set PYTHON_PATH = c:\yourDir\Python-2.6.1\
35 # set PYTHON_LIB = c:\yourDir\Python-2.6.1\PCbuild8\Win32
36
37
38 win32:INCLUDEPATH += $$PYTHON_PATH/PC $$PYTHON_PATH/include
39 win32-msvc*:LIBS += $$PYTHON_LIB/python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
40 win32-g++:LIBS += $$PYTHON_PATH/libs/libpython$${PYTHON_VERSION}.a
41
42 } else:unix {
43 # on linux, python-config is used to autodetect Python.
44 # make sure that you have installed a matching python-dev package.
45
46 unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs)
47 unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes)
48 }
49
50 #===========================================================#
51 # ______ _______ _ _ ___ _ _ ___ _____ #
52 # | _ \ \ / /_ _| | | |/ _ \| \ | | / _ \_ _| #
53 # | |_) \ V / | | | |_| | | | | \| | | | | || | #
54 # | __/ | | | | | _ | |_| | |\ | | |_| || | #
55 # |_| |_| |_| |_| |_|\___/|_| \_| \__\_\|_| #
56 # #
57 #===========================================================#
58
59 contains(CONFIG,BUILDING_PYTHONQT){
60 message("BUILDING PYTHONQT")
61 }
62 !contains(CONFIG,BUILDING_PYTHONQT){
63 INCLUDEPATH += $$[QT_INSTALL_HEADERS]/PythonQt
64 win32::LIBS += -lPythonQt
65 unix::LIBS += -lPythonQt
66 }
67
68 #===============================================================================#
69 # ______ _______ _ _ ___ _ _ ___ _____ _ _ _ #
70 # | _ \ \ / /_ _| | | |/ _ \| \ | | / _ \_ _| / \ | | | | #
71 # | |_) \ V / | | | |_| | | | | \| | | | | || | / _ \ | | | | #
72 # | __/ | | | | | _ | |_| | |\ | | |_| || | / ___ \| |___| |___ #
73 # |_| |_| |_| |_| |_|\___/|_| \_| \__\_\|_| /_/ \_\_____|_____| #
74 # #
75 #===============================================================================#
76
77 contains(CONFIG,BUILDING_QTALL){
78 message("BUILDING_QTALL")
79 win32::LIBS += -L$${DESTDIR}
80 unix::LIBS += -L$${DESTDIR}
81 }
82 !contains(CONFIG,BUILDING_QTALL){
83 !contains(CONFIG,BUILDING_PYTHONQT){
84 win32::LIBS += -lPythonQt_QtAll
85 unix::LIBS += -lPythonQt_QtAll
86 }
87
88 }
89
90
91
92 contains(CONFIG,BUILDING_EXAMPLES){
93 message("BUILDING_EXAMPLES")
94 LIBS += -L$${DESTDIR}
95 LIBS += -lPythonQt_QtAll
96 LIBS += -lPythonQt
97 INCLUDEPATH += $${PWD}/../src \
98 $${PWD}/../extensions/PythonQt_QtAll
99 }
@@ -2,3 +2,4 syntax: glob
2 *.o
2 *.o
3 moc_*
3 moc_*
4 *.pro.user
4 *.pro.user
5 *~
@@ -37,7 +37,11 include ( src.pri )
37
37
38 #Install PythonQt as Qt feature
38 #Install PythonQt as Qt feature
39 pythoncfg.path = $$[QT_INSTALL_PREFIX]/mkspecs/features
39 pythoncfg.path = $$[QT_INSTALL_PREFIX]/mkspecs/features
40 pythoncfg.files = ../build/pythonqt.prf
40
41 pythoncfg.files = ../build/rpm/pythonqt.prf
42 isEmpty(RPMBUILDING){
43 pythoncfg.files = ../build/pythonqt.prf
44 }
41
45
42 target.path = $$[QT_INSTALL_LIBS]
46 target.path = $$[QT_INSTALL_LIBS]
43 isEmpty(target.path) {
47 isEmpty(target.path) {
General Comments 0
You need to be logged in to leave comments. Login now