.sconsign*
*.moc
/pykit
-/Makefile
+/Makefile.qmake
--- /dev/null
+default: all ;
+
+Makefile.qmake:
+ qmake -o Makefile.qmake pykit.pro
+
+%: Makefile.qmake FORCE
+ @$(MAKE) -f Makefile.qmake $@
+FORCE: ;
+
+clean:
+ @$(MAKE) -f Makefile.qmake clean
+ rm -f pykit Makefile.qmake
+
+Makefile: ;
+
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
+#ifdef POPPLER
+
namespace {
class PDFWebPluginFactory
return plugins;
}
+#endif
+
///////////////////////////////////////////////////////////////////////////
// pykit::Viewer
QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);
page()->setNetworkAccessManager(
new InternalNetworkAccessManager(page()->networkAccessManager(), this, publisher));
+#ifdef POPPLER
page()->setPluginFactory(new PDFWebPluginFactory (page()->networkAccessManager(), this));
+#endif
load(url);
}
+# CONFIG += no_poppler
TEMPLATE = app
TARGET = pykit
DEPENDPATH += .
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
+}