Optionally include additional QT plugins when required to build.

This commit is contained in:
Matt Corallo 2011-10-07 10:46:56 -04:00 committed by Gavin Andresen
parent 3f197952bd
commit 5f2e76b8c7
2 changed files with 15 additions and 0 deletions

View file

@ -47,6 +47,11 @@ contains(USE_SSL, 1) {
DEFINES += USE_SSL
}
contains(BITCOIN_NEED_QT_PLUGINS, 1) {
DEFINES += BITCOIN_NEED_QT_PLUGINS
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs
}
# for extra security against potential buffer overflows
QMAKE_CXXFLAGS += -fstack-protector
QMAKE_LFLAGS += -fstack-protector

View file

@ -12,6 +12,16 @@
#include <boost/filesystem/fstream.hpp>
#include <boost/interprocess/sync/file_lock.hpp>
#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED)
#define _BITCOIN_QT_PLUGINS_INCLUDED
#define __INSURE__
#include <QtPlugin>
Q_IMPORT_PLUGIN(qcncodecs)
Q_IMPORT_PLUGIN(qjpcodecs)
Q_IMPORT_PLUGIN(qtwcodecs)
Q_IMPORT_PLUGIN(qkrcodecs)
#endif
using namespace std;
using namespace boost;