More build customization options
[pykit.git] / pykit.pro
1 # CONFIG += no_poppler
2 TEMPLATE = app
3 TARGET = pykit
4 DEPENDPATH += .
5 INCLUDEPATH += .
6 QT += webkit network gui core
7
8 isEmpty(PYTHON) {
9     PYTHON = python
10 }
11 isEmpty(PYTHONCONFIG) {
12     PYTHONCONFIG = $${PYTHON}-config
13 }
14
15 isEmpty(LIBBOOSTPYTHON) {
16     LIBBOOSTPYTHON = boost_python
17 }
18
19 # boost_python
20 LIBS += -l$${LIBBOOSTPYTHON}
21
22 # python
23 isEmpty(LIBPYTHON) {
24     QMAKE_CXXFLAGS += $$system($$PYTHONCONFIG --cflags)
25     QMAKE_CXXFLAGS -= -Wstrict-prototypes
26     LIBS += $$system($$PYTHONCONFIG --ldflags)
27 }
28 else {
29     LIBS += -l$$LIBPYTHON
30 }
31
32 mac {
33     # Qt is not available as univeral library and provides
34     # a correct -arch tag automatically
35     QMAKE_CXXFLAGS -= -arch ppc x86_64 i386
36     QMAKE_CFLAGS -= -arch ppc x86_64 i386
37 }
38
39 # Input
40 HEADERS += MainWindow.hh \
41            Publisher.hh \
42            PythonPublisher.hh \
43            Viewer.hh
44 SOURCES += main.cc \
45            MainWindow.cc \
46            Publisher.cc \
47            PythonPublisher.cc \
48            Viewer.cc
49
50 # poppler
51 !no_poppler {
52     LIBS += -lpoppler-qt4 -lpoppler
53     HEADERS += PDFWidget.hh
54     SOURCES += PDFWidget.cc
55     DEFINES += POPPLER
56 }