Make poppler optional
[pykit.git] / pykit.pro
index 63d9604..1cb9fb6 100644 (file)
--- a/pykit.pro
+++ b/pykit.pro
@@ -1,3 +1,4 @@
+# CONFIG += no_poppler
 TEMPLATE = app
 TARGET = pykit
 DEPENDPATH += .
@@ -12,18 +13,21 @@ QMAKE_CXXFLAGS += $$system(python-config --cflags)
 QMAKE_CFFLAGS += $$system(python-config --cflags)
 LIBS += $$system(python-config --ldflags)
 
-# poppler
-LIBS += -lpoppler-qt4 -lpoppler
-
 # Input
 HEADERS += MainWindow.hh \
            Publisher.hh \
            PythonPublisher.hh \
-           Viewer.hh \
-           PDFWidget.hh
+           Viewer.hh
 SOURCES += main.cc \
            MainWindow.cc \
            Publisher.cc \
            PythonPublisher.cc \
-           Viewer.cc \
-           PDFWidget.cc
+           Viewer.cc
+
+# poppler
+!no_poppler {
+    LIBS += -lpoppler-qt4 -lpoppler
+    HEADERS += PDFWidget.hh
+    SOURCES += PDFWidget.cc
+    DEFINES += POPPLER
+}