##// 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 }
@@ -1,4 +1,5
1 syntax: glob
1 syntax: glob
2 *.o
2 *.o
3 moc_*
3 moc_*
4 *.pro.user
4 *.pro.user
5 *~
@@ -1,60 +1,64
1 # --------- PythonQt profile -------------------
1 # --------- PythonQt profile -------------------
2 # Last changed by $Author: florian $
2 # Last changed by $Author: florian $
3 # $Id: PythonQt.pro 35381 2006-03-16 13:05:52Z florian $
3 # $Id: PythonQt.pro 35381 2006-03-16 13:05:52Z florian $
4 # $Source$
4 # $Source$
5 # --------------------------------------------------
5 # --------------------------------------------------
6
6
7 TARGET = PythonQt
7 TARGET = PythonQt
8 TEMPLATE = lib
8 TEMPLATE = lib
9
9
10
10
11 DESTDIR = ../lib
11 DESTDIR = ../lib
12
12
13 CONFIG += qt
13 CONFIG += qt
14 CONFIG -= flat
14 CONFIG -= flat
15
15
16
16
17 # allow to choose static linking through the environment variable PYTHONQT_STATIC
17 # allow to choose static linking through the environment variable PYTHONQT_STATIC
18 PYTHONQT_STATIC = $$(PYTHONQT_STATIC)
18 PYTHONQT_STATIC = $$(PYTHONQT_STATIC)
19 isEmpty(PYTHONQT_STATIC) {
19 isEmpty(PYTHONQT_STATIC) {
20 CONFIG += dll
20 CONFIG += dll
21 } else {
21 } else {
22 CONFIG += static
22 CONFIG += static
23 }
23 }
24
24
25 contains(QT_MAJOR_VERSION, 5) {
25 contains(QT_MAJOR_VERSION, 5) {
26 QT += widgets
26 QT += widgets
27 }
27 }
28
28
29 mac {
29 mac {
30 OTHER_FILES += ../scripts/osx-fix-dylib.sh
30 OTHER_FILES += ../scripts/osx-fix-dylib.sh
31 }
31 }
32
32
33 CONFIG += BUILDING_PYTHONQT
33 CONFIG += BUILDING_PYTHONQT
34 include ( ../build/pythonqt.prf )
34 include ( ../build/pythonqt.prf )
35
35
36 include ( src.pri )
36 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) {
44 target.path = $(QTDIR)/lib
48 target.path = $(QTDIR)/lib
45 }
49 }
46
50
47 header.path = $$[QT_INSTALL_HEADERS]/PythonQt
51 header.path = $$[QT_INSTALL_HEADERS]/PythonQt
48 header.files = *.h
52 header.files = *.h
49 isEmpty(header.path) {
53 isEmpty(header.path) {
50 header.path = $(QTDIR)/include/PythonQt
54 header.path = $(QTDIR)/include/PythonQt
51 header.files = *.h
55 header.files = *.h
52 }
56 }
53 guiheader.path = $$[QT_INSTALL_HEADERS]/PythonQt/gui
57 guiheader.path = $$[QT_INSTALL_HEADERS]/PythonQt/gui
54 guiheader.files = gui/*.h
58 guiheader.files = gui/*.h
55 isEmpty(guiheader.path) {
59 isEmpty(guiheader.path) {
56 guiheader.path = $(QTDIR)/include/PythonQt/gui
60 guiheader.path = $(QTDIR)/include/PythonQt/gui
57 guiheader.files = gui/*.h
61 guiheader.files = gui/*.h
58 }
62 }
59 INSTALLS += header target guiheader pythoncfg
63 INSTALLS += header target guiheader pythoncfg
60
64
General Comments 0
You need to be logged in to leave comments. Login now