4 INCLUDEPATH += src src/json src/qt
5 DEFINES += QT_GUI BOOST_THREAD_USE_LIB
6 CONFIG += no_include_pwd
8 # for boost 1.37, add -mt to the boost libraries
9 # use: qmake BOOST_LIB_SUFFIX=-mt
10 # for boost thread win32 with _win32 sufix
11 # use: BOOST_THREAD_LIB_SUFFIX=_win32-...
12 # or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8
14 # Dependency library locations can be customized with BOOST_INCLUDE_PATH,
15 # BOOST_LIB_PATH, BDB_INCLUDE_PATH, BDB_LIB_PATH
16 # OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
22 # use: qmake "USE_UPNP=1" ( enabled by default; default)
23 # or: qmake "USE_UPNP=0" (disabled by default)
24 # or: qmake "USE_UPNP=-" (not supported)
25 # miniupnpc (http://miniupnp.free.fr/files/) must be installed for support
26 contains(USE_UPNP, -) {
27 message(Building without UPNP support)
29 message(Building with UPNP support)
33 DEFINES += USE_UPNP=$$USE_UPNP STATICLIB
34 INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
35 LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
36 win32:LIBS += -liphlpapi
39 # use: qmake "USE_DBUS=1"
40 contains(USE_DBUS, 1) {
41 message(Building with DBUS (Freedesktop notifications) support)
46 # use: qmake "USE_SSL=1"
47 contains(USE_SSL, 1) {
48 message(Building with SSL support for RPC)
52 contains(BITCOIN_NEED_QT_PLUGINS, 1) {
53 DEFINES += BITCOIN_NEED_QT_PLUGINS
54 QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs
57 # for extra security against potential buffer overflows
58 QMAKE_CXXFLAGS += -fstack-protector
59 QMAKE_LFLAGS += -fstack-protector
61 # disable quite some warnings because bitcoin core "sins" a lot
62 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
65 DEPENDPATH += src/qt src src json/include
66 HEADERS += src/qt/bitcoingui.h \
67 src/qt/transactiontablemodel.h \
68 src/qt/addresstablemodel.h \
69 src/qt/optionsdialog.h \
70 src/qt/sendcoinsdialog.h \
71 src/qt/addressbookpage.h \
72 src/qt/aboutdialog.h \
73 src/qt/editaddressdialog.h \
74 src/qt/bitcoinaddressvalidator.h \
90 src/json/json_spirit_writer_template.h \
91 src/json/json_spirit_writer.h \
92 src/json/json_spirit_value.h \
93 src/json/json_spirit_utils.h \
94 src/json/json_spirit_stream_reader.h \
95 src/json/json_spirit_reader_template.h \
96 src/json/json_spirit_reader.h \
97 src/json/json_spirit_error_position.h \
98 src/json/json_spirit.h \
99 src/qt/clientmodel.h \
101 src/qt/transactionrecord.h \
102 src/qt/guiconstants.h \
103 src/qt/optionsmodel.h \
104 src/qt/monitoreddatamapper.h \
106 src/qt/transactiondesc.h \
107 src/qt/transactiondescdialog.h \
108 src/qt/bitcoinamountfield.h \
111 src/qt/transactionfilterproxy.h \
112 src/qt/transactionview.h \
113 src/qt/walletmodel.h \
115 src/qt/overviewpage.h \
116 src/qt/csvmodelwriter.h \
118 src/qt/sendcoinsentry.h \
119 src/qt/qvalidatedlineedit.h \
120 src/qt/bitcoinunits.h \
121 src/qt/qvaluecombobox.h \
122 src/qt/askpassphrasedialog.h \
126 SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
127 src/qt/transactiontablemodel.cpp \
128 src/qt/addresstablemodel.cpp \
129 src/qt/optionsdialog.cpp \
130 src/qt/sendcoinsdialog.cpp \
131 src/qt/addressbookpage.cpp \
132 src/qt/aboutdialog.cpp \
133 src/qt/editaddressdialog.cpp \
134 src/qt/bitcoinaddressvalidator.cpp \
142 src/json/json_spirit_writer.cpp \
143 src/json/json_spirit_value.cpp \
144 src/json/json_spirit_reader.cpp \
145 src/qt/clientmodel.cpp \
147 src/qt/transactionrecord.cpp \
148 src/qt/optionsmodel.cpp \
149 src/qt/monitoreddatamapper.cpp \
150 src/qt/transactiondesc.cpp \
151 src/qt/transactiondescdialog.cpp \
152 src/qt/bitcoinstrings.cpp \
153 src/qt/bitcoinamountfield.cpp \
156 src/qt/transactionfilterproxy.cpp \
157 src/qt/transactionview.cpp \
158 src/qt/walletmodel.cpp \
160 src/qt/overviewpage.cpp \
161 src/qt/csvmodelwriter.cpp \
163 src/qt/sendcoinsentry.cpp \
164 src/qt/qvalidatedlineedit.cpp \
165 src/qt/bitcoinunits.cpp \
166 src/qt/qvaluecombobox.cpp \
167 src/qt/askpassphrasedialog.cpp \
169 src/qt/notificator.cpp
175 src/qt/forms/sendcoinsdialog.ui \
176 src/qt/forms/addressbookpage.ui \
177 src/qt/forms/aboutdialog.ui \
178 src/qt/forms/editaddressdialog.ui \
179 src/qt/forms/transactiondescdialog.ui \
180 src/qt/forms/overviewpage.ui \
181 src/qt/forms/sendcoinsentry.ui \
182 src/qt/forms/askpassphrasedialog.ui
186 # for lrelease/lupdate
187 # also add new translations to src/qt/bitcoin.qrc under translations/
188 TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts)
190 isEmpty(QMAKE_LRELEASE) {
191 win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
192 else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
194 isEmpty(TS_DIR):TS_DIR = src/qt/locale
195 # automatically build translations, so they can be included in resource file
196 TSQM.name = lrelease ${QMAKE_FILE_IN}
197 TSQM.input = TRANSLATIONS
198 TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
199 TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
200 TSQM.CONFIG = no_link
201 QMAKE_EXTRA_COMPILERS += TSQM
202 PRE_TARGETDEPS += compiler_TSQM_make_all
204 # "Other files" to show in Qt Creator
206 doc/*.rst doc/*.txt doc/README README.md
208 # platform specific defaults, if not overridden on command line
209 isEmpty(BOOST_LIB_SUFFIX) {
210 macx:BOOST_LIB_SUFFIX = -mt
211 windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
214 isEmpty(BOOST_THREAD_LIB_SUFFIX) {
215 BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
218 isEmpty(BDB_LIB_PATH) {
219 macx:BDB_LIB_PATH = /opt/local/lib/db48
222 isEmpty(BDB_LIB_SUFFIX) {
223 macx:BDB_LIB_SUFFIX = -4.8
226 isEmpty(BDB_INCLUDE_PATH) {
227 macx:BDB_INCLUDE_PATH = /opt/local/include/db48
230 isEmpty(BOOST_LIB_PATH) {
231 macx:BOOST_LIB_PATH = /opt/local/lib
234 isEmpty(BOOST_INCLUDE_PATH) {
235 macx:BOOST_INCLUDE_PATH = /opt/local/include
238 windows:LIBS += -lws2_32 -lgdi32
239 windows:DEFINES += WIN32
240 windows:RC_FILE = src/qt/res/bitcoin-qt.rc
242 macx:HEADERS += src/qt/macdockiconhandler.h
243 macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm
244 macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
245 macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 BOOST_FILESYSTEM_VERSION=3
246 macx:ICON = src/qt/res/icons/bitcoin.icns
247 macx:TARGET = "Bitcoin-Qt"
249 # Set libraries and includes at end, to use platform-defined defaults if not overridden
250 INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH
251 LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,)
252 LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
253 LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
255 system($$QMAKE_LRELEASE -silent $$_PRO_FILE_)