aboutsummaryrefslogtreecommitdiff
path: root/bitcoin-qt.pro
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-08-30 21:13:50 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-10-20 23:08:56 +0200
commit3ff3a2bd60a905d830de157390facde14aa0ffe3 (patch)
tree970054f91c27d9a09f0858e6c42b2b059e859eca /bitcoin-qt.pro
parent9f56678fceef0a53411bdfcac82ab65f7b896838 (diff)
Makefile integration of LevelDB
Diffstat (limited to 'bitcoin-qt.pro')
-rw-r--r--bitcoin-qt.pro23
1 files changed, 23 insertions, 0 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
index 8aceb0390f..68add91122 100644
--- a/bitcoin-qt.pro
+++ b/bitcoin-qt.pro
@@ -90,6 +90,29 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
}
+contains(USE_LEVELDB, -) {
+ message(Building without LevelDB)
+} else {
+ message(Building with LevelDB)
+ DEFINES += USE_LEVELDB
+ INCLUDEPATH += src/leveldb/include src/leveldb/helpers
+ LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
+ !windows {
+ genleveldb.commands = cd $$PWD/src/leveldb ; $(MAKE) libleveldb.a libmemenv.a
+ } else {
+ # make an educated guess about what the ranlib command is called
+ isEmpty(QMAKE_RANLIB) {
+ QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
+ }
+ genleveldb.commands = cd $$PWD/src/leveldb ; CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$$BOOST_INCLUDE_PATH" LDFLAGS="-L$$BOOST_LIB_PATH" $(MAKE) libleveldb.a libmemenv.a ; $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a ; $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
+ }
+ genleveldb.target = $$PWD/src/leveldb/libleveldb.a
+ genleveldb.depends = FORCE
+ PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
+ QMAKE_EXTRA_TARGETS += genleveldb
+ # Gross ugly hack that depends on qmake internals, unfortunately there's no other way to do it.
+ QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
+}
# regenerate src/build.h
!windows|contains(USE_BUILD_INFO, 1) {