]>
Commit | Line | Data |
---|---|---|
aaa1c3c4 | 1 | TEMPLATE = app |
1f2e0df8 | 2 | TARGET = |
a5f95d75 | 3 | VERSION = 0.6.99 |
6ccff2cb | 4 | INCLUDEPATH += src src/json src/qt |
23aa78c4 | 5 | DEFINES += QT_GUI BOOST_THREAD_USE_LIB USE_IPV6 |
8fe2308b | 6 | CONFIG += no_include_pwd |
5363cb05 | 7 | |
99cec89c WL |
8 | # for boost 1.37, add -mt to the boost libraries |
9 | # use: qmake BOOST_LIB_SUFFIX=-mt | |
0e569e4a MC |
10 | # for boost thread win32 with _win32 sufix |
11 | # use: BOOST_THREAD_LIB_SUFFIX=_win32-... | |
07e28823 | 12 | # or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8 |
99cec89c WL |
13 | |
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 | |
1d7e321c | 17 | |
36eccc51 MC |
18 | OBJECTS_DIR = build |
19 | MOC_DIR = build | |
20 | UI_DIR = build | |
21 | ||
a5f07cbe GA |
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 | |
26 | ||
27 | !windows:!macx { | |
28 | # Linux: static link | |
29 | LIBS += -Wl,-Bstatic | |
30 | } | |
31 | } | |
32 | ||
b03cb157 MC |
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) | |
37 | DEFINES += USE_QRCODE | |
38 | LIBS += -lqrencode | |
39 | } | |
40 | ||
5d3083c3 LD |
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) | |
47 | } else { | |
0aca8577 | 48 | message(Building with UPNP support) |
5d3083c3 LD |
49 | count(USE_UPNP, 0) { |
50 | USE_UPNP=1 | |
51 | } | |
aaf71d84 MC |
52 | DEFINES += USE_UPNP=$$USE_UPNP STATICLIB |
53 | INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH | |
54 | LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc | |
55 | win32:LIBS += -liphlpapi | |
0aca8577 WL |
56 | } |
57 | ||
9b490f71 | 58 | # use: qmake "USE_DBUS=1" |
07e28823 | 59 | contains(USE_DBUS, 1) { |
cf9195c8 | 60 | message(Building with DBUS (Freedesktop notifications) support) |
010c4fc0 | 61 | DEFINES += USE_DBUS |
cf9195c8 WL |
62 | QT += dbus |
63 | } | |
64 | ||
2bc4fd60 LD |
65 | # use: qmake "FIRST_CLASS_MESSAGING=1" |
66 | contains(FIRST_CLASS_MESSAGING, 1) { | |
67 | message(Building with first-class messaging) | |
68 | DEFINES += FIRST_CLASS_MESSAGING | |
69 | } | |
70 | ||
5f2e76b8 MC |
71 | contains(BITCOIN_NEED_QT_PLUGINS, 1) { |
72 | DEFINES += BITCOIN_NEED_QT_PLUGINS | |
2e5a781c | 73 | QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets |
5f2e76b8 MC |
74 | } |
75 | ||
533c82ce WL |
76 | !windows { |
77 | # for extra security against potential buffer overflows | |
78 | QMAKE_CXXFLAGS += -fstack-protector | |
79 | QMAKE_LFLAGS += -fstack-protector | |
80 | # do not enable this on windows, as it will result in a non-working executable! | |
81 | } | |
ea8440d7 | 82 | |
a20c0d0f PW |
83 | # regenerate src/build.h |
84 | !windows || contains(USE_BUILD_INFO, 1) { | |
5d464a4a | 85 | genbuild.depends = FORCE |
45771671 PW |
86 | genbuild.commands = cd $$PWD; share/genbuild.sh $$OUT_PWD/build/build.h |
87 | genbuild.target = genbuildhook | |
88 | PRE_TARGETDEPS += genbuildhook | |
a20c0d0f PW |
89 | QMAKE_EXTRA_TARGETS += genbuild |
90 | DEFINES += HAVE_BUILD_INFO | |
91 | } | |
92 | ||
f621326c | 93 | QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter |
1d7e321c | 94 | |
aaa1c3c4 | 95 | # Input |
68103043 | 96 | DEPENDPATH += src src/json src/qt |
ba4081c1 WL |
97 | HEADERS += src/qt/bitcoingui.h \ |
98 | src/qt/transactiontablemodel.h \ | |
99 | src/qt/addresstablemodel.h \ | |
100 | src/qt/optionsdialog.h \ | |
101 | src/qt/sendcoinsdialog.h \ | |
3479849d | 102 | src/qt/addressbookpage.h \ |
2bc4fd60 | 103 | src/qt/messagepage.h \ |
ba4081c1 WL |
104 | src/qt/aboutdialog.h \ |
105 | src/qt/editaddressdialog.h \ | |
106 | src/qt/bitcoinaddressvalidator.h \ | |
5fee401f | 107 | src/addrman.h \ |
ba4081c1 WL |
108 | src/base58.h \ |
109 | src/bignum.h \ | |
eb5fff9e | 110 | src/checkpoints.h \ |
67a42f92 | 111 | src/compat.h \ |
7f3ccb59 | 112 | src/sync.h \ |
ba4081c1 WL |
113 | src/util.h \ |
114 | src/uint256.h \ | |
115 | src/serialize.h \ | |
ba4081c1 WL |
116 | src/strlcpy.h \ |
117 | src/main.h \ | |
118 | src/net.h \ | |
119 | src/key.h \ | |
120 | src/db.h \ | |
9eace6b1 | 121 | src/walletdb.h \ |
ba4081c1 | 122 | src/script.h \ |
ba4081c1 | 123 | src/init.h \ |
ba4081c1 | 124 | src/irc.h \ |
c4341fa6 | 125 | src/mruset.h \ |
ba4081c1 WL |
126 | src/json/json_spirit_writer_template.h \ |
127 | src/json/json_spirit_writer.h \ | |
128 | src/json/json_spirit_value.h \ | |
129 | src/json/json_spirit_utils.h \ | |
130 | src/json/json_spirit_stream_reader.h \ | |
131 | src/json/json_spirit_reader_template.h \ | |
132 | src/json/json_spirit_reader.h \ | |
133 | src/json/json_spirit_error_position.h \ | |
134 | src/json/json_spirit.h \ | |
ba4081c1 WL |
135 | src/qt/clientmodel.h \ |
136 | src/qt/guiutil.h \ | |
137 | src/qt/transactionrecord.h \ | |
138 | src/qt/guiconstants.h \ | |
139 | src/qt/optionsmodel.h \ | |
140 | src/qt/monitoreddatamapper.h \ | |
ba4081c1 | 141 | src/qt/transactiondesc.h \ |
f193c57a | 142 | src/qt/transactiondescdialog.h \ |
e8ef3da7 WL |
143 | src/qt/bitcoinamountfield.h \ |
144 | src/wallet.h \ | |
ceb6d4e1 WL |
145 | src/keystore.h \ |
146 | src/qt/transactionfilterproxy.h \ | |
ef079e18 | 147 | src/qt/transactionview.h \ |
8fe2308b | 148 | src/qt/walletmodel.h \ |
64c8b699 | 149 | src/bitcoinrpc.h \ |
fbaee7a8 | 150 | src/qt/overviewpage.h \ |
0b814f9e | 151 | src/qt/csvmodelwriter.h \ |
a5e6d723 WL |
152 | src/crypter.h \ |
153 | src/qt/sendcoinsentry.h \ | |
e285ffcd | 154 | src/qt/qvalidatedlineedit.h \ |
ee014e5b | 155 | src/qt/bitcoinunits.h \ |
b7bcaf94 | 156 | src/qt/qvaluecombobox.h \ |
c5aa1b13 | 157 | src/qt/askpassphrasedialog.h \ |
cf9195c8 | 158 | src/protocol.h \ |
7d145a0f | 159 | src/qt/notificator.h \ |
6cb6d623 | 160 | src/qt/qtipcserver.h \ |
5cccb13d | 161 | src/allocators.h \ |
460c51fd WL |
162 | src/ui_interface.h \ |
163 | src/qt/rpcconsole.h | |
c5aa1b13 | 164 | |
ba4081c1 WL |
165 | SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \ |
166 | src/qt/transactiontablemodel.cpp \ | |
167 | src/qt/addresstablemodel.cpp \ | |
168 | src/qt/optionsdialog.cpp \ | |
169 | src/qt/sendcoinsdialog.cpp \ | |
3479849d | 170 | src/qt/addressbookpage.cpp \ |
2bc4fd60 | 171 | src/qt/messagepage.cpp \ |
ba4081c1 WL |
172 | src/qt/aboutdialog.cpp \ |
173 | src/qt/editaddressdialog.cpp \ | |
174 | src/qt/bitcoinaddressvalidator.cpp \ | |
a20c0d0f | 175 | src/version.cpp \ |
7f3ccb59 | 176 | src/sync.cpp \ |
ba4081c1 | 177 | src/util.cpp \ |
67a42f92 | 178 | src/netbase.cpp \ |
93db3fce | 179 | src/key.cpp \ |
ba4081c1 WL |
180 | src/script.cpp \ |
181 | src/main.cpp \ | |
182 | src/init.cpp \ | |
ba4081c1 WL |
183 | src/net.cpp \ |
184 | src/irc.cpp \ | |
eb5fff9e | 185 | src/checkpoints.cpp \ |
5fee401f | 186 | src/addrman.cpp \ |
ba4081c1 | 187 | src/db.cpp \ |
9eace6b1 | 188 | src/walletdb.cpp \ |
ba4081c1 WL |
189 | src/json/json_spirit_writer.cpp \ |
190 | src/json/json_spirit_value.cpp \ | |
191 | src/json/json_spirit_reader.cpp \ | |
192 | src/qt/clientmodel.cpp \ | |
193 | src/qt/guiutil.cpp \ | |
194 | src/qt/transactionrecord.cpp \ | |
195 | src/qt/optionsmodel.cpp \ | |
196 | src/qt/monitoreddatamapper.cpp \ | |
197 | src/qt/transactiondesc.cpp \ | |
6315130e | 198 | src/qt/transactiondescdialog.cpp \ |
f193c57a | 199 | src/qt/bitcoinstrings.cpp \ |
e8ef3da7 WL |
200 | src/qt/bitcoinamountfield.cpp \ |
201 | src/wallet.cpp \ | |
ceb6d4e1 WL |
202 | src/keystore.cpp \ |
203 | src/qt/transactionfilterproxy.cpp \ | |
ef079e18 | 204 | src/qt/transactionview.cpp \ |
8fe2308b | 205 | src/qt/walletmodel.cpp \ |
64c8b699 | 206 | src/bitcoinrpc.cpp \ |
95d888a6 | 207 | src/rpcdump.cpp \ |
fbaee7a8 | 208 | src/qt/overviewpage.cpp \ |
0b814f9e | 209 | src/qt/csvmodelwriter.cpp \ |
a5e6d723 WL |
210 | src/crypter.cpp \ |
211 | src/qt/sendcoinsentry.cpp \ | |
e285ffcd | 212 | src/qt/qvalidatedlineedit.cpp \ |
ee014e5b | 213 | src/qt/bitcoinunits.cpp \ |
b7bcaf94 | 214 | src/qt/qvaluecombobox.cpp \ |
c5aa1b13 | 215 | src/qt/askpassphrasedialog.cpp \ |
cf9195c8 | 216 | src/protocol.cpp \ |
7d145a0f | 217 | src/qt/notificator.cpp \ |
460c51fd WL |
218 | src/qt/qtipcserver.cpp \ |
219 | src/qt/rpcconsole.cpp | |
13740b7e WL |
220 | |
221 | RESOURCES += \ | |
ba4081c1 | 222 | src/qt/bitcoin.qrc |
df577886 WL |
223 | |
224 | FORMS += \ | |
ba4081c1 | 225 | src/qt/forms/sendcoinsdialog.ui \ |
3479849d | 226 | src/qt/forms/addressbookpage.ui \ |
2bc4fd60 | 227 | src/qt/forms/messagepage.ui \ |
ba4081c1 WL |
228 | src/qt/forms/aboutdialog.ui \ |
229 | src/qt/forms/editaddressdialog.ui \ | |
64c8b699 | 230 | src/qt/forms/transactiondescdialog.ui \ |
a5e6d723 | 231 | src/qt/forms/overviewpage.ui \ |
b7bcaf94 | 232 | src/qt/forms/sendcoinsentry.ui \ |
460c51fd WL |
233 | src/qt/forms/askpassphrasedialog.ui \ |
234 | src/qt/forms/rpcconsole.ui | |
ab2fe68f | 235 | |
22123c85 | 236 | contains(USE_QRCODE, 1) { |
237 | HEADERS += src/qt/qrcodedialog.h | |
238 | SOURCES += src/qt/qrcodedialog.cpp | |
239 | FORMS += src/qt/forms/qrcodedialog.ui | |
240 | } | |
241 | ||
24548467 MC |
242 | contains(BITCOIN_QT_TEST, 1) { |
243 | SOURCES += src/qt/test/test_main.cpp \ | |
fa2544e7 LD |
244 | src/qt/test/uritests.cpp |
245 | HEADERS += src/qt/test/uritests.h | |
24548467 MC |
246 | DEPENDPATH += src/qt/test |
247 | QT += testlib | |
248 | TARGET = bitcoin-qt_test | |
249 | DEFINES += BITCOIN_QT_TEST | |
250 | } | |
251 | ||
ab2fe68f | 252 | CODECFORTR = UTF-8 |
59020408 | 253 | |
317c7335 | 254 | # for lrelease/lupdate |
5c92622a WL |
255 | # also add new translations to src/qt/bitcoin.qrc under translations/ |
256 | TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts) | |
2c1fd3c3 | 257 | |
59020408 | 258 | isEmpty(QMAKE_LRELEASE) { |
100da736 | 259 | win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe |
59020408 WL |
260 | else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease |
261 | } | |
262 | isEmpty(TS_DIR):TS_DIR = src/qt/locale | |
263 | # automatically build translations, so they can be included in resource file | |
264 | TSQM.name = lrelease ${QMAKE_FILE_IN} | |
265 | TSQM.input = TRANSLATIONS | |
266 | TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm | |
267 | TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} | |
268 | TSQM.CONFIG = no_link | |
269 | QMAKE_EXTRA_COMPILERS += TSQM | |
07e28823 | 270 | PRE_TARGETDEPS += compiler_TSQM_make_all |
59020408 | 271 | |
f33a43ef | 272 | # "Other files" to show in Qt Creator |
2c1fd3c3 | 273 | OTHER_FILES += \ |
8a6329a7 | 274 | doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc |
2c1fd3c3 | 275 | |
99cec89c WL |
276 | # platform specific defaults, if not overridden on command line |
277 | isEmpty(BOOST_LIB_SUFFIX) { | |
278 | macx:BOOST_LIB_SUFFIX = -mt | |
279 | windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43 | |
280 | } | |
281 | ||
0e569e4a MC |
282 | isEmpty(BOOST_THREAD_LIB_SUFFIX) { |
283 | BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX | |
284 | } | |
285 | ||
99cec89c WL |
286 | isEmpty(BDB_LIB_PATH) { |
287 | macx:BDB_LIB_PATH = /opt/local/lib/db48 | |
288 | } | |
289 | ||
b50ac8f7 GA |
290 | isEmpty(BDB_LIB_SUFFIX) { |
291 | macx:BDB_LIB_SUFFIX = -4.8 | |
292 | } | |
293 | ||
99cec89c WL |
294 | isEmpty(BDB_INCLUDE_PATH) { |
295 | macx:BDB_INCLUDE_PATH = /opt/local/include/db48 | |
296 | } | |
297 | ||
298 | isEmpty(BOOST_LIB_PATH) { | |
299 | macx:BOOST_LIB_PATH = /opt/local/lib | |
300 | } | |
301 | ||
302 | isEmpty(BOOST_INCLUDE_PATH) { | |
303 | macx:BOOST_INCLUDE_PATH = /opt/local/include | |
304 | } | |
305 | ||
49e1501b LD |
306 | windows:LIBS += -lws2_32 -lshlwapi |
307 | windows:DEFINES += WIN32 | |
9b490f71 WL |
308 | windows:RC_FILE = src/qt/res/bitcoin-qt.rc |
309 | ||
49e1501b LD |
310 | windows:!contains(MINGW_THREAD_BUGFIX, 0) { |
311 | # At least qmake's win32-g++-cross profile is missing the -lmingwthrd | |
312 | # thread-safety flag. GCC has -mthreads to enable this, but it doesn't | |
313 | # work with static linking. -lmingwthrd must come BEFORE -lmingw, so | |
314 | # it is prepended to QMAKE_LIBS_QT_ENTRY. | |
315 | # It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes | |
316 | # any problems on some untested qmake profile now or in the future. | |
317 | DEFINES += _MT | |
318 | QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY | |
319 | } | |
320 | ||
f18a119a MC |
321 | !windows:!mac { |
322 | DEFINES += LINUX | |
30dfc64f | 323 | LIBS += -lrt |
f18a119a MC |
324 | } |
325 | ||
527137e3 | 326 | macx:HEADERS += src/qt/macdockiconhandler.h |
327 | macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm | |
328 | macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit | |
c4de9184 | 329 | macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 |
2c1fd3c3 | 330 | macx:ICON = src/qt/res/icons/bitcoin.icns |
b50ac8f7 | 331 | macx:TARGET = "Bitcoin-Qt" |
99cec89c WL |
332 | |
333 | # Set libraries and includes at end, to use platform-defined defaults if not overridden | |
0b5d6f1e MC |
334 | INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH |
335 | LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,) | |
07e28823 | 336 | LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX |
3f9144d4 | 337 | # -lgdi32 has to happen after -lcrypto (see #681) |
f9417736 | 338 | windows:LIBS += -lole32 -luuid -lgdi32 |
0e569e4a | 339 | LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX |
07e28823 | 340 | |
a5f07cbe GA |
341 | contains(RELEASE, 1) { |
342 | !windows:!macx { | |
343 | # Linux: turn dynamic linking back on for c/c++ runtime libraries | |
344 | LIBS += -Wl,-Bdynamic | |
345 | } | |
346 | } | |
347 | ||
07e28823 | 348 | system($$QMAKE_LRELEASE -silent $$_PRO_FILE_) |