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 "RELEASE=1"
23 contains(RELEASE
, 1) {
24 # Mac: compile for maximum compatibility (10.5, 32-bit)
25 macx
:QMAKE_CXXFLAGS
+= -mmacosx
-version
-min
=10.5 -arch i386
-isysroot
/Developer
/SDKs
/MacOSX10
.5
.sdk
33 # use: qmake "USE_QRCODE=1"
34 # libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
35 contains(USE_QRCODE
, 1) {
36 message(Building with QRCode support
)
41 # use: qmake "USE_UPNP=1" ( enabled by default; default)
42 # or: qmake "USE_UPNP=0" (disabled by default)
43 # or: qmake "USE_UPNP=-" (not supported)
44 # miniupnpc (http://miniupnp.free.fr/files/) must be installed for support
45 contains(USE_UPNP
, -) {
46 message(Building without UPNP support
)
48 message(Building with UPNP support
)
52 DEFINES
+= USE_UPNP
=$$USE_UPNP STATICLIB
53 INCLUDEPATH
+= $$MINIUPNPC_INCLUDE_PATH
54 LIBS
+= $$
join(MINIUPNPC_LIB_PATH
,,-L
,) -lminiupnpc
55 win32
:LIBS
+= -liphlpapi
58 # use: qmake "USE_DBUS=1"
59 contains(USE_DBUS
, 1) {
60 message(Building with
DBUS (Freedesktop notifications
) support
)
65 # use: qmake "USE_SSL=1"
66 contains(USE_SSL
, 1) {
67 message(Building with SSL support for RPC
)
71 # use: qmake "FIRST_CLASS_MESSAGING=1"
72 contains(FIRST_CLASS_MESSAGING
, 1) {
73 message(Building with first
-class messaging
)
74 DEFINES
+= FIRST_CLASS_MESSAGING
77 contains(BITCOIN_NEED_QT_PLUGINS
, 1) {
78 DEFINES
+= BITCOIN_NEED_QT_PLUGINS
79 QTPLUGIN
+= qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
83 # for extra security against potential buffer overflows
84 QMAKE_CXXFLAGS
+= -fstack
-protector
85 QMAKE_LFLAGS
+= -fstack
-protector
86 # do not enable this on windows, as it will result in a non-working executable!
89 # disable quite some warnings because bitcoin core "sins" a lot
90 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
93 DEPENDPATH
+= src
/qt src src json
/include
94 HEADERS
+= src
/qt
/bitcoingui
.h \
95 src
/qt
/transactiontablemodel
.h \
96 src
/qt
/addresstablemodel
.h \
97 src
/qt
/optionsdialog
.h \
98 src
/qt
/sendcoinsdialog
.h \
99 src
/qt
/addressbookpage
.h \
100 src
/qt
/messagepage
.h \
101 src
/qt
/aboutdialog
.h \
102 src
/qt
/editaddressdialog
.h \
103 src
/qt
/bitcoinaddressvalidator
.h \
121 src
/json
/json_spirit_writer_template
.h \
122 src
/json
/json_spirit_writer
.h \
123 src
/json
/json_spirit_value
.h \
124 src
/json
/json_spirit_utils
.h \
125 src
/json
/json_spirit_stream_reader
.h \
126 src
/json
/json_spirit_reader_template
.h \
127 src
/json
/json_spirit_reader
.h \
128 src
/json
/json_spirit_error_position
.h \
129 src
/json
/json_spirit
.h \
130 src
/qt
/clientmodel
.h \
132 src
/qt
/transactionrecord
.h \
133 src
/qt
/guiconstants
.h \
134 src
/qt
/optionsmodel
.h \
135 src
/qt
/monitoreddatamapper
.h \
137 src
/qt
/transactiondesc
.h \
138 src
/qt
/transactiondescdialog
.h \
139 src
/qt
/bitcoinamountfield
.h \
142 src
/qt
/transactionfilterproxy
.h \
143 src
/qt
/transactionview
.h \
144 src
/qt
/walletmodel
.h \
146 src
/qt
/overviewpage
.h \
147 src
/qt
/csvmodelwriter
.h \
149 src
/qt
/sendcoinsentry
.h \
150 src
/qt
/qvalidatedlineedit
.h \
151 src
/qt
/bitcoinunits
.h \
152 src
/qt
/qvaluecombobox
.h \
153 src
/qt
/askpassphrasedialog
.h \
155 src
/qt
/notificator
.h \
158 SOURCES
+= src
/qt
/bitcoin
.cpp src
/qt
/bitcoingui
.cpp \
159 src
/qt
/transactiontablemodel
.cpp \
160 src
/qt
/addresstablemodel
.cpp \
161 src
/qt
/optionsdialog
.cpp \
162 src
/qt
/sendcoinsdialog
.cpp \
163 src
/qt
/addressbookpage
.cpp \
164 src
/qt
/messagepage
.cpp \
165 src
/qt
/aboutdialog
.cpp \
166 src
/qt
/editaddressdialog
.cpp \
167 src
/qt
/bitcoinaddressvalidator
.cpp \
176 src
/checkpoints
.cpp \
178 src
/json
/json_spirit_writer
.cpp \
179 src
/json
/json_spirit_value
.cpp \
180 src
/json
/json_spirit_reader
.cpp \
181 src
/qt
/clientmodel
.cpp \
183 src
/qt
/transactionrecord
.cpp \
184 src
/qt
/optionsmodel
.cpp \
185 src
/qt
/monitoreddatamapper
.cpp \
186 src
/qt
/transactiondesc
.cpp \
187 src
/qt
/transactiondescdialog
.cpp \
188 src
/qt
/bitcoinstrings
.cpp \
189 src
/qt
/bitcoinamountfield
.cpp \
192 src
/qt
/transactionfilterproxy
.cpp \
193 src
/qt
/transactionview
.cpp \
194 src
/qt
/walletmodel
.cpp \
197 src
/qt
/overviewpage
.cpp \
198 src
/qt
/csvmodelwriter
.cpp \
200 src
/qt
/sendcoinsentry
.cpp \
201 src
/qt
/qvalidatedlineedit
.cpp \
202 src
/qt
/bitcoinunits
.cpp \
203 src
/qt
/qvaluecombobox
.cpp \
204 src
/qt
/askpassphrasedialog
.cpp \
206 src
/qt
/notificator
.cpp \
207 src
/qt
/qtipcserver
.cpp
213 src
/qt
/forms
/sendcoinsdialog
.ui \
214 src
/qt
/forms
/addressbookpage
.ui \
215 src
/qt
/forms
/messagepage
.ui \
216 src
/qt
/forms
/aboutdialog
.ui \
217 src
/qt
/forms
/editaddressdialog
.ui \
218 src
/qt
/forms
/transactiondescdialog
.ui \
219 src
/qt
/forms
/overviewpage
.ui \
220 src
/qt
/forms
/sendcoinsentry
.ui \
221 src
/qt
/forms
/askpassphrasedialog
.ui
223 contains(USE_QRCODE
, 1) {
224 HEADERS
+= src
/qt
/qrcodedialog
.h
225 SOURCES
+= src
/qt
/qrcodedialog
.cpp
226 FORMS
+= src
/qt
/forms
/qrcodedialog
.ui
229 contains(BITCOIN_QT_TEST
, 1) {
230 SOURCES
+= src
/qt
/test
/test_main
.cpp \
231 src
/qt
/test
/urltests
.cpp
232 HEADERS
+= src
/qt
/test
/urltests
.h
233 DEPENDPATH
+= src
/qt
/test
235 TARGET
= bitcoin
-qt_test
236 DEFINES
+= BITCOIN_QT_TEST
241 # for lrelease/lupdate
242 # also add new translations to src/qt/bitcoin.qrc under translations/
243 TRANSLATIONS
= $$
files(src
/qt
/locale
/bitcoin_
*.ts
)
245 isEmpty(QMAKE_LRELEASE
) {
246 win32
:QMAKE_LRELEASE
= $$
[QT_INSTALL_BINS
]\lrelease
.exe
247 else
:QMAKE_LRELEASE
= $$
[QT_INSTALL_BINS
]/lrelease
249 isEmpty(TS_DIR
):TS_DIR
= src
/qt
/locale
250 # automatically build translations, so they can be included in resource file
251 TSQM
.name
= lrelease $
{QMAKE_FILE_IN
}
252 TSQM
.input
= TRANSLATIONS
253 TSQM
.output
= $$TS_DIR
/$
{QMAKE_FILE_BASE
}.qm
254 TSQM
.commands
= $$QMAKE_LRELEASE $
{QMAKE_FILE_IN
}
255 TSQM
.CONFIG
= no_link
256 QMAKE_EXTRA_COMPILERS
+= TSQM
257 PRE_TARGETDEPS
+= compiler_TSQM_make_all
259 # "Other files" to show in Qt Creator
261 doc
/*.rst doc/*.txt doc/README README.md
263 # platform specific defaults, if not overridden on command line
264 isEmpty(BOOST_LIB_SUFFIX) {
265 macx:BOOST_LIB_SUFFIX = -mt
266 windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
269 isEmpty(BOOST_THREAD_LIB_SUFFIX) {
270 BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
273 isEmpty(BDB_LIB_PATH) {
274 macx:BDB_LIB_PATH = /opt/local/lib/db48
277 isEmpty(BDB_LIB_SUFFIX) {
278 macx:BDB_LIB_SUFFIX = -4.8
281 isEmpty(BDB_INCLUDE_PATH) {
282 macx:BDB_INCLUDE_PATH = /opt/local/include/db48
285 isEmpty(BOOST_LIB_PATH) {
286 macx:BOOST_LIB_PATH = /opt/local/lib
289 isEmpty(BOOST_INCLUDE_PATH) {
290 macx:BOOST_INCLUDE_PATH = /opt/local/include
293 windows:LIBS += -lws2_32 -lshlwapi
294 windows:DEFINES += WIN32
295 windows:RC_FILE = src/qt/res/bitcoin-qt.rc
301 macx:HEADERS += src/qt/macdockiconhandler.h
302 macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm
303 macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
304 macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
305 macx:ICON = src/qt/res/icons/bitcoin.icns
306 macx:TARGET = "Bitcoin-Qt"
308 # Set libraries and includes at end, to use platform-defined defaults if not overridden
309 INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
310 LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
311 LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
312 # -lgdi32 has to happen after -lcrypto (see #681)
313 windows:LIBS += -lgdi32
314 LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
316 contains(RELEASE, 1) {
318 # Linux: turn dynamic linking back on for c/c++ runtime libraries
319 LIBS += -Wl,-Bdynamic
323 system($$QMAKE_LRELEASE -silent $$_PRO_FILE_)