Browse Source

Optionally include additional QT plugins when required to build.

pull/1/head
Matt Corallo 11 years ago committed by Gavin Andresen
parent
commit
5f2e76b8c7
  1. 5
      bitcoin-qt.pro
  2. 10
      src/init.cpp

5
bitcoin-qt.pro

@ -47,6 +47,11 @@ contains(USE_SSL, 1) { @@ -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

10
src/init.cpp

@ -12,6 +12,16 @@ @@ -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;

Loading…
Cancel
Save