2011-05-07 22:13:39 +02:00
|
|
|
TEMPLATE = app
|
2011-05-14 10:31:46 +02:00
|
|
|
TARGET =
|
2011-11-21 19:38:09 +01:00
|
|
|
VERSION = 0.5.1
|
2011-09-27 20:16:07 +02:00
|
|
|
INCLUDEPATH += src src/json src/qt
|
2011-10-07 16:17:23 +02:00
|
|
|
DEFINES += QT_GUI BOOST_THREAD_USE_LIB
|
2011-07-03 20:53:56 +02:00
|
|
|
CONFIG += no_include_pwd
|
2011-06-14 08:13:29 +02:00
|
|
|
|
2011-09-24 11:43:58 +02:00
|
|
|
# for boost 1.37, add -mt to the boost libraries
|
|
|
|
# use: qmake BOOST_LIB_SUFFIX=-mt
|
2011-10-06 23:02:21 +02:00
|
|
|
# for boost thread win32 with _win32 sufix
|
|
|
|
# use: BOOST_THREAD_LIB_SUFFIX=_win32-...
|
2011-09-29 19:53:44 +02:00
|
|
|
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8
|
2011-09-24 11:43:58 +02:00
|
|
|
|
|
|
|
# Dependency library locations can be customized with BOOST_INCLUDE_PATH,
|
|
|
|
# BOOST_LIB_PATH, BDB_INCLUDE_PATH, BDB_LIB_PATH
|
|
|
|
# OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
|
2011-05-29 21:31:29 +02:00
|
|
|
|
2011-09-26 19:14:34 +02:00
|
|
|
OBJECTS_DIR = build
|
|
|
|
MOC_DIR = build
|
|
|
|
UI_DIR = build
|
|
|
|
|
2011-11-07 15:50:03 +01:00
|
|
|
# use: qmake "RELEASE=1"
|
|
|
|
contains(RELEASE, 1) {
|
|
|
|
# Mac: compile for maximum compatibility (10.5, 32-bit)
|
|
|
|
macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
|
|
|
|
|
|
|
|
!windows:!macx {
|
|
|
|
# Linux: static link
|
|
|
|
LIBS += -Wl,-Bstatic
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-09-29 21:02:12 +02:00
|
|
|
# use: qmake "USE_UPNP=1" ( enabled by default; default)
|
|
|
|
# or: qmake "USE_UPNP=0" (disabled by default)
|
|
|
|
# or: qmake "USE_UPNP=-" (not supported)
|
|
|
|
# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support
|
|
|
|
contains(USE_UPNP, -) {
|
|
|
|
message(Building without UPNP support)
|
|
|
|
} else {
|
2011-09-02 18:33:09 +02:00
|
|
|
message(Building with UPNP support)
|
2011-09-29 21:02:12 +02:00
|
|
|
count(USE_UPNP, 0) {
|
|
|
|
USE_UPNP=1
|
|
|
|
}
|
2011-10-17 06:09:22 +02:00
|
|
|
DEFINES += USE_UPNP=$$USE_UPNP STATICLIB
|
|
|
|
INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
|
|
|
|
LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
|
|
|
|
win32:LIBS += -liphlpapi
|
2011-09-02 18:33:09 +02:00
|
|
|
}
|
|
|
|
|
2011-09-19 12:40:23 +02:00
|
|
|
# use: qmake "USE_DBUS=1"
|
2011-09-29 19:53:44 +02:00
|
|
|
contains(USE_DBUS, 1) {
|
2011-09-03 20:52:54 +02:00
|
|
|
message(Building with DBUS (Freedesktop notifications) support)
|
2011-09-24 11:56:33 +02:00
|
|
|
DEFINES += USE_DBUS
|
2011-09-03 20:52:54 +02:00
|
|
|
QT += dbus
|
|
|
|
}
|
|
|
|
|
2011-09-29 19:53:44 +02:00
|
|
|
# use: qmake "USE_SSL=1"
|
2011-09-30 17:36:39 +02:00
|
|
|
contains(USE_SSL, 1) {
|
2011-09-29 19:53:44 +02:00
|
|
|
message(Building with SSL support for RPC)
|
|
|
|
DEFINES += USE_SSL
|
|
|
|
}
|
|
|
|
|
2011-10-07 16:46:56 +02:00
|
|
|
contains(BITCOIN_NEED_QT_PLUGINS, 1) {
|
|
|
|
DEFINES += BITCOIN_NEED_QT_PLUGINS
|
|
|
|
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs
|
|
|
|
}
|
|
|
|
|
2011-10-29 11:44:37 +02:00
|
|
|
!windows {
|
|
|
|
# for extra security against potential buffer overflows
|
|
|
|
QMAKE_CXXFLAGS += -fstack-protector
|
|
|
|
QMAKE_LFLAGS += -fstack-protector
|
|
|
|
# do not enable this on windows, as it will result in a non-working executable!
|
|
|
|
}
|
2011-07-09 11:54:25 +02:00
|
|
|
|
2011-06-14 08:13:29 +02:00
|
|
|
# disable quite some warnings because bitcoin core "sins" a lot
|
2011-10-10 21:14:15 +02:00
|
|
|
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wno-strict-aliasing -Wno-invalid-offsetof -Wno-unused-variable -Wno-unused-parameter -Wno-sign-compare -Wno-char-subscripts -Wno-unused-value -Wno-sequence-point -Wno-parentheses -Wno-unknown-pragmas -Wno-switch
|
2011-05-29 21:31:29 +02:00
|
|
|
|
2011-05-07 22:13:39 +02:00
|
|
|
# Input
|
2011-09-27 20:16:07 +02:00
|
|
|
DEPENDPATH += src/qt src src json/include
|
2011-06-11 22:11:58 +02:00
|
|
|
HEADERS += src/qt/bitcoingui.h \
|
|
|
|
src/qt/transactiontablemodel.h \
|
|
|
|
src/qt/addresstablemodel.h \
|
|
|
|
src/qt/optionsdialog.h \
|
|
|
|
src/qt/sendcoinsdialog.h \
|
2011-07-07 17:33:15 +02:00
|
|
|
src/qt/addressbookpage.h \
|
2011-06-11 22:11:58 +02:00
|
|
|
src/qt/aboutdialog.h \
|
|
|
|
src/qt/editaddressdialog.h \
|
|
|
|
src/qt/bitcoinaddressvalidator.h \
|
|
|
|
src/base58.h \
|
|
|
|
src/bignum.h \
|
2011-09-08 22:50:58 +02:00
|
|
|
src/checkpoints.h \
|
2011-06-11 22:11:58 +02:00
|
|
|
src/util.h \
|
|
|
|
src/uint256.h \
|
|
|
|
src/serialize.h \
|
|
|
|
src/strlcpy.h \
|
|
|
|
src/main.h \
|
|
|
|
src/net.h \
|
|
|
|
src/key.h \
|
|
|
|
src/db.h \
|
|
|
|
src/script.h \
|
|
|
|
src/noui.h \
|
|
|
|
src/init.h \
|
|
|
|
src/headers.h \
|
|
|
|
src/irc.h \
|
|
|
|
src/json/json_spirit_writer_template.h \
|
|
|
|
src/json/json_spirit_writer.h \
|
|
|
|
src/json/json_spirit_value.h \
|
|
|
|
src/json/json_spirit_utils.h \
|
|
|
|
src/json/json_spirit_stream_reader.h \
|
|
|
|
src/json/json_spirit_reader_template.h \
|
|
|
|
src/json/json_spirit_reader.h \
|
|
|
|
src/json/json_spirit_error_position.h \
|
|
|
|
src/json/json_spirit.h \
|
|
|
|
src/qt/clientmodel.h \
|
|
|
|
src/qt/guiutil.h \
|
|
|
|
src/qt/transactionrecord.h \
|
|
|
|
src/qt/guiconstants.h \
|
|
|
|
src/qt/optionsmodel.h \
|
|
|
|
src/qt/monitoreddatamapper.h \
|
2011-06-22 20:11:12 +02:00
|
|
|
src/qtui.h \
|
2011-06-11 22:11:58 +02:00
|
|
|
src/qt/transactiondesc.h \
|
2011-06-20 21:31:42 +02:00
|
|
|
src/qt/transactiondescdialog.h \
|
2011-06-26 19:23:24 +02:00
|
|
|
src/qt/bitcoinamountfield.h \
|
|
|
|
src/wallet.h \
|
2011-06-28 21:41:56 +02:00
|
|
|
src/keystore.h \
|
|
|
|
src/qt/transactionfilterproxy.h \
|
2011-06-30 18:05:29 +02:00
|
|
|
src/qt/transactionview.h \
|
2011-07-03 20:53:56 +02:00
|
|
|
src/qt/walletmodel.h \
|
2011-07-05 22:09:39 +02:00
|
|
|
src/bitcoinrpc.h \
|
2011-07-07 14:27:16 +02:00
|
|
|
src/qt/overviewpage.h \
|
2011-07-09 15:26:57 +02:00
|
|
|
src/qt/csvmodelwriter.h \
|
2011-07-16 19:01:05 +02:00
|
|
|
src/crypter.h \
|
|
|
|
src/qt/sendcoinsentry.h \
|
2011-07-25 21:35:45 +02:00
|
|
|
src/qt/qvalidatedlineedit.h \
|
2011-07-29 14:36:35 +02:00
|
|
|
src/qt/bitcoinunits.h \
|
2011-08-24 22:07:26 +02:00
|
|
|
src/qt/qvaluecombobox.h \
|
2011-09-02 18:02:22 +02:00
|
|
|
src/qt/askpassphrasedialog.h \
|
2011-09-03 20:52:54 +02:00
|
|
|
src/protocol.h \
|
|
|
|
src/qt/notificator.h
|
2011-09-02 18:02:22 +02:00
|
|
|
|
2011-06-11 22:11:58 +02:00
|
|
|
SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
|
|
|
|
src/qt/transactiontablemodel.cpp \
|
|
|
|
src/qt/addresstablemodel.cpp \
|
|
|
|
src/qt/optionsdialog.cpp \
|
|
|
|
src/qt/sendcoinsdialog.cpp \
|
2011-07-07 17:33:15 +02:00
|
|
|
src/qt/addressbookpage.cpp \
|
2011-06-11 22:11:58 +02:00
|
|
|
src/qt/aboutdialog.cpp \
|
|
|
|
src/qt/editaddressdialog.cpp \
|
|
|
|
src/qt/bitcoinaddressvalidator.cpp \
|
|
|
|
src/util.cpp \
|
|
|
|
src/script.cpp \
|
|
|
|
src/main.cpp \
|
|
|
|
src/init.cpp \
|
|
|
|
src/net.cpp \
|
|
|
|
src/irc.cpp \
|
2011-09-08 22:50:58 +02:00
|
|
|
src/checkpoints.cpp \
|
2011-06-11 22:11:58 +02:00
|
|
|
src/db.cpp \
|
|
|
|
src/json/json_spirit_writer.cpp \
|
|
|
|
src/json/json_spirit_value.cpp \
|
|
|
|
src/json/json_spirit_reader.cpp \
|
|
|
|
src/qt/clientmodel.cpp \
|
|
|
|
src/qt/guiutil.cpp \
|
|
|
|
src/qt/transactionrecord.cpp \
|
|
|
|
src/qt/optionsmodel.cpp \
|
|
|
|
src/qt/monitoreddatamapper.cpp \
|
|
|
|
src/qt/transactiondesc.cpp \
|
2011-06-13 19:24:53 +02:00
|
|
|
src/qt/transactiondescdialog.cpp \
|
2011-06-20 21:31:42 +02:00
|
|
|
src/qt/bitcoinstrings.cpp \
|
2011-06-26 19:23:24 +02:00
|
|
|
src/qt/bitcoinamountfield.cpp \
|
|
|
|
src/wallet.cpp \
|
2011-06-28 21:41:56 +02:00
|
|
|
src/keystore.cpp \
|
|
|
|
src/qt/transactionfilterproxy.cpp \
|
2011-06-30 18:05:29 +02:00
|
|
|
src/qt/transactionview.cpp \
|
2011-07-03 20:53:56 +02:00
|
|
|
src/qt/walletmodel.cpp \
|
2011-07-05 22:09:39 +02:00
|
|
|
src/bitcoinrpc.cpp \
|
2011-07-07 14:27:16 +02:00
|
|
|
src/qt/overviewpage.cpp \
|
2011-07-09 15:26:57 +02:00
|
|
|
src/qt/csvmodelwriter.cpp \
|
2011-07-16 19:01:05 +02:00
|
|
|
src/crypter.cpp \
|
|
|
|
src/qt/sendcoinsentry.cpp \
|
2011-07-25 21:35:45 +02:00
|
|
|
src/qt/qvalidatedlineedit.cpp \
|
2011-07-29 14:36:35 +02:00
|
|
|
src/qt/bitcoinunits.cpp \
|
2011-08-24 22:07:26 +02:00
|
|
|
src/qt/qvaluecombobox.cpp \
|
2011-09-02 18:02:22 +02:00
|
|
|
src/qt/askpassphrasedialog.cpp \
|
2011-09-03 20:52:54 +02:00
|
|
|
src/protocol.cpp \
|
|
|
|
src/qt/notificator.cpp
|
2011-05-09 20:44:46 +02:00
|
|
|
|
|
|
|
RESOURCES += \
|
2011-06-11 22:11:58 +02:00
|
|
|
src/qt/bitcoin.qrc
|
2011-05-12 14:44:52 +02:00
|
|
|
|
|
|
|
FORMS += \
|
2011-06-11 22:11:58 +02:00
|
|
|
src/qt/forms/sendcoinsdialog.ui \
|
2011-07-07 17:33:15 +02:00
|
|
|
src/qt/forms/addressbookpage.ui \
|
2011-06-11 22:11:58 +02:00
|
|
|
src/qt/forms/aboutdialog.ui \
|
|
|
|
src/qt/forms/editaddressdialog.ui \
|
2011-07-05 22:09:39 +02:00
|
|
|
src/qt/forms/transactiondescdialog.ui \
|
2011-07-16 19:01:05 +02:00
|
|
|
src/qt/forms/overviewpage.ui \
|
2011-08-24 22:07:26 +02:00
|
|
|
src/qt/forms/sendcoinsentry.ui \
|
|
|
|
src/qt/forms/askpassphrasedialog.ui
|
2011-06-12 14:32:36 +02:00
|
|
|
|
|
|
|
CODECFORTR = UTF-8
|
2011-09-27 20:47:51 +02:00
|
|
|
|
2011-08-16 17:30:58 +02:00
|
|
|
# for lrelease/lupdate
|
2011-10-23 13:37:39 +02:00
|
|
|
# also add new translations to src/qt/bitcoin.qrc under translations/
|
|
|
|
TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts)
|
2011-09-11 17:42:20 +02:00
|
|
|
|
2011-09-27 20:47:51 +02:00
|
|
|
isEmpty(QMAKE_LRELEASE) {
|
|
|
|
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
|
|
|
|
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
|
|
|
}
|
|
|
|
isEmpty(TS_DIR):TS_DIR = src/qt/locale
|
|
|
|
# automatically build translations, so they can be included in resource file
|
|
|
|
TSQM.name = lrelease ${QMAKE_FILE_IN}
|
|
|
|
TSQM.input = TRANSLATIONS
|
|
|
|
TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
|
|
|
|
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
|
|
|
|
TSQM.CONFIG = no_link
|
|
|
|
QMAKE_EXTRA_COMPILERS += TSQM
|
2011-09-29 19:53:44 +02:00
|
|
|
PRE_TARGETDEPS += compiler_TSQM_make_all
|
2011-09-27 20:47:51 +02:00
|
|
|
|
2011-09-28 22:01:47 +02:00
|
|
|
# "Other files" to show in Qt Creator
|
2011-09-11 17:42:20 +02:00
|
|
|
OTHER_FILES += \
|
2011-09-28 22:01:47 +02:00
|
|
|
doc/*.rst doc/*.txt doc/README README.md
|
2011-09-11 17:42:20 +02:00
|
|
|
|
2011-09-24 11:43:58 +02:00
|
|
|
# platform specific defaults, if not overridden on command line
|
|
|
|
isEmpty(BOOST_LIB_SUFFIX) {
|
|
|
|
macx:BOOST_LIB_SUFFIX = -mt
|
|
|
|
windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
|
|
|
|
}
|
|
|
|
|
2011-10-06 23:02:21 +02:00
|
|
|
isEmpty(BOOST_THREAD_LIB_SUFFIX) {
|
|
|
|
BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
|
|
|
|
}
|
|
|
|
|
2011-09-24 11:43:58 +02:00
|
|
|
isEmpty(BDB_LIB_PATH) {
|
|
|
|
macx:BDB_LIB_PATH = /opt/local/lib/db48
|
|
|
|
}
|
|
|
|
|
2011-10-10 17:13:32 +02:00
|
|
|
isEmpty(BDB_LIB_SUFFIX) {
|
|
|
|
macx:BDB_LIB_SUFFIX = -4.8
|
|
|
|
}
|
|
|
|
|
2011-09-24 11:43:58 +02:00
|
|
|
isEmpty(BDB_INCLUDE_PATH) {
|
|
|
|
macx:BDB_INCLUDE_PATH = /opt/local/include/db48
|
|
|
|
}
|
|
|
|
|
|
|
|
isEmpty(BOOST_LIB_PATH) {
|
|
|
|
macx:BOOST_LIB_PATH = /opt/local/lib
|
|
|
|
}
|
|
|
|
|
|
|
|
isEmpty(BOOST_INCLUDE_PATH) {
|
|
|
|
macx:BOOST_INCLUDE_PATH = /opt/local/include
|
|
|
|
}
|
|
|
|
|
|
|
|
windows:LIBS += -lws2_32 -lgdi32
|
2011-10-07 17:02:21 +02:00
|
|
|
windows:DEFINES += WIN32
|
2011-09-19 12:40:23 +02:00
|
|
|
windows:RC_FILE = src/qt/res/bitcoin-qt.rc
|
|
|
|
|
2011-10-07 13:21:45 +02:00
|
|
|
macx:HEADERS += src/qt/macdockiconhandler.h
|
|
|
|
macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm
|
|
|
|
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
2011-11-15 20:28:51 +01:00
|
|
|
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
|
2011-09-11 17:42:20 +02:00
|
|
|
macx:ICON = src/qt/res/icons/bitcoin.icns
|
2011-10-10 17:13:32 +02:00
|
|
|
macx:TARGET = "Bitcoin-Qt"
|
2011-09-24 11:43:58 +02:00
|
|
|
|
|
|
|
# Set libraries and includes at end, to use platform-defined defaults if not overridden
|
|
|
|
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH
|
|
|
|
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,)
|
2011-09-29 19:53:44 +02:00
|
|
|
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
|
2011-10-06 23:02:21 +02:00
|
|
|
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
|
2011-09-29 19:53:44 +02:00
|
|
|
|
2011-11-07 15:50:03 +01:00
|
|
|
contains(RELEASE, 1) {
|
|
|
|
!windows:!macx {
|
|
|
|
# Linux: turn dynamic linking back on for c/c++ runtime libraries
|
|
|
|
LIBS += -Wl,-Bdynamic
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-09-29 19:53:44 +02:00
|
|
|
system($$QMAKE_LRELEASE -silent $$_PRO_FILE_)
|