]>
Commit | Line | Data |
---|---|---|
aaa1c3c4 | 1 | TEMPLATE = app |
1f2e0df8 | 2 | TARGET = |
6bf4253a | 3 | VERSION = 0.6.0 |
6ccff2cb | 4 | INCLUDEPATH += src src/json src/qt |
3f197952 | 5 | DEFINES += QT_GUI BOOST_THREAD_USE_LIB |
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 | ||
07e28823 | 65 | # use: qmake "USE_SSL=1" |
8f1631b7 | 66 | contains(USE_SSL, 1) { |
07e28823 WL |
67 | message(Building with SSL support for RPC) |
68 | DEFINES += USE_SSL | |
69 | } | |
70 | ||
2bc4fd60 LD |
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 | |
75 | } | |
76 | ||
5f2e76b8 MC |
77 | contains(BITCOIN_NEED_QT_PLUGINS, 1) { |
78 | DEFINES += BITCOIN_NEED_QT_PLUGINS | |
2e5a781c | 79 | QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets |
5f2e76b8 MC |
80 | } |
81 | ||
533c82ce WL |
82 | !windows { |
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! | |
87 | } | |
ea8440d7 | 88 | |
5363cb05 | 89 | # disable quite some warnings because bitcoin core "sins" a lot |
d0415902 | 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 |
1d7e321c | 91 | |
aaa1c3c4 | 92 | # Input |
6ccff2cb | 93 | DEPENDPATH += src/qt src src json/include |
ba4081c1 WL |
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 \ | |
3479849d | 99 | src/qt/addressbookpage.h \ |
2bc4fd60 | 100 | src/qt/messagepage.h \ |
ba4081c1 WL |
101 | src/qt/aboutdialog.h \ |
102 | src/qt/editaddressdialog.h \ | |
103 | src/qt/bitcoinaddressvalidator.h \ | |
104 | src/base58.h \ | |
105 | src/bignum.h \ | |
eb5fff9e | 106 | src/checkpoints.h \ |
67a42f92 | 107 | src/compat.h \ |
ba4081c1 WL |
108 | src/util.h \ |
109 | src/uint256.h \ | |
110 | src/serialize.h \ | |
ba4081c1 WL |
111 | src/strlcpy.h \ |
112 | src/main.h \ | |
113 | src/net.h \ | |
114 | src/key.h \ | |
115 | src/db.h \ | |
116 | src/script.h \ | |
117 | src/noui.h \ | |
118 | src/init.h \ | |
119 | src/headers.h \ | |
120 | src/irc.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 \ | |
ba4081c1 WL |
130 | src/qt/clientmodel.h \ |
131 | src/qt/guiutil.h \ | |
132 | src/qt/transactionrecord.h \ | |
133 | src/qt/guiconstants.h \ | |
134 | src/qt/optionsmodel.h \ | |
135 | src/qt/monitoreddatamapper.h \ | |
47c6215c | 136 | src/qtui.h \ |
ba4081c1 | 137 | src/qt/transactiondesc.h \ |
f193c57a | 138 | src/qt/transactiondescdialog.h \ |
e8ef3da7 WL |
139 | src/qt/bitcoinamountfield.h \ |
140 | src/wallet.h \ | |
ceb6d4e1 WL |
141 | src/keystore.h \ |
142 | src/qt/transactionfilterproxy.h \ | |
ef079e18 | 143 | src/qt/transactionview.h \ |
8fe2308b | 144 | src/qt/walletmodel.h \ |
64c8b699 | 145 | src/bitcoinrpc.h \ |
fbaee7a8 | 146 | src/qt/overviewpage.h \ |
0b814f9e | 147 | src/qt/csvmodelwriter.h \ |
a5e6d723 WL |
148 | src/crypter.h \ |
149 | src/qt/sendcoinsentry.h \ | |
e285ffcd | 150 | src/qt/qvalidatedlineedit.h \ |
ee014e5b | 151 | src/qt/bitcoinunits.h \ |
b7bcaf94 | 152 | src/qt/qvaluecombobox.h \ |
c5aa1b13 | 153 | src/qt/askpassphrasedialog.h \ |
cf9195c8 | 154 | src/protocol.h \ |
7d145a0f MC |
155 | src/qt/notificator.h \ |
156 | src/qt/qtipcserver.h | |
c5aa1b13 | 157 | |
ba4081c1 WL |
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 \ | |
3479849d | 163 | src/qt/addressbookpage.cpp \ |
2bc4fd60 | 164 | src/qt/messagepage.cpp \ |
ba4081c1 WL |
165 | src/qt/aboutdialog.cpp \ |
166 | src/qt/editaddressdialog.cpp \ | |
167 | src/qt/bitcoinaddressvalidator.cpp \ | |
ba4081c1 | 168 | src/util.cpp \ |
67a42f92 | 169 | src/netbase.cpp \ |
93db3fce | 170 | src/key.cpp \ |
ba4081c1 WL |
171 | src/script.cpp \ |
172 | src/main.cpp \ | |
173 | src/init.cpp \ | |
ba4081c1 WL |
174 | src/net.cpp \ |
175 | src/irc.cpp \ | |
eb5fff9e | 176 | src/checkpoints.cpp \ |
ba4081c1 WL |
177 | src/db.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 \ | |
182 | src/qt/guiutil.cpp \ | |
183 | src/qt/transactionrecord.cpp \ | |
184 | src/qt/optionsmodel.cpp \ | |
185 | src/qt/monitoreddatamapper.cpp \ | |
186 | src/qt/transactiondesc.cpp \ | |
6315130e | 187 | src/qt/transactiondescdialog.cpp \ |
f193c57a | 188 | src/qt/bitcoinstrings.cpp \ |
e8ef3da7 WL |
189 | src/qt/bitcoinamountfield.cpp \ |
190 | src/wallet.cpp \ | |
ceb6d4e1 WL |
191 | src/keystore.cpp \ |
192 | src/qt/transactionfilterproxy.cpp \ | |
ef079e18 | 193 | src/qt/transactionview.cpp \ |
8fe2308b | 194 | src/qt/walletmodel.cpp \ |
64c8b699 | 195 | src/bitcoinrpc.cpp \ |
95d888a6 | 196 | src/rpcdump.cpp \ |
fbaee7a8 | 197 | src/qt/overviewpage.cpp \ |
0b814f9e | 198 | src/qt/csvmodelwriter.cpp \ |
a5e6d723 WL |
199 | src/crypter.cpp \ |
200 | src/qt/sendcoinsentry.cpp \ | |
e285ffcd | 201 | src/qt/qvalidatedlineedit.cpp \ |
ee014e5b | 202 | src/qt/bitcoinunits.cpp \ |
b7bcaf94 | 203 | src/qt/qvaluecombobox.cpp \ |
c5aa1b13 | 204 | src/qt/askpassphrasedialog.cpp \ |
cf9195c8 | 205 | src/protocol.cpp \ |
7d145a0f MC |
206 | src/qt/notificator.cpp \ |
207 | src/qt/qtipcserver.cpp | |
13740b7e WL |
208 | |
209 | RESOURCES += \ | |
ba4081c1 | 210 | src/qt/bitcoin.qrc |
df577886 WL |
211 | |
212 | FORMS += \ | |
ba4081c1 | 213 | src/qt/forms/sendcoinsdialog.ui \ |
3479849d | 214 | src/qt/forms/addressbookpage.ui \ |
2bc4fd60 | 215 | src/qt/forms/messagepage.ui \ |
ba4081c1 WL |
216 | src/qt/forms/aboutdialog.ui \ |
217 | src/qt/forms/editaddressdialog.ui \ | |
64c8b699 | 218 | src/qt/forms/transactiondescdialog.ui \ |
a5e6d723 | 219 | src/qt/forms/overviewpage.ui \ |
b7bcaf94 WL |
220 | src/qt/forms/sendcoinsentry.ui \ |
221 | src/qt/forms/askpassphrasedialog.ui | |
ab2fe68f | 222 | |
22123c85 | 223 | contains(USE_QRCODE, 1) { |
224 | HEADERS += src/qt/qrcodedialog.h | |
225 | SOURCES += src/qt/qrcodedialog.cpp | |
226 | FORMS += src/qt/forms/qrcodedialog.ui | |
227 | } | |
228 | ||
24548467 MC |
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 | |
234 | QT += testlib | |
235 | TARGET = bitcoin-qt_test | |
236 | DEFINES += BITCOIN_QT_TEST | |
237 | } | |
238 | ||
ab2fe68f | 239 | CODECFORTR = UTF-8 |
59020408 | 240 | |
317c7335 | 241 | # for lrelease/lupdate |
5c92622a WL |
242 | # also add new translations to src/qt/bitcoin.qrc under translations/ |
243 | TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts) | |
2c1fd3c3 | 244 | |
59020408 WL |
245 | isEmpty(QMAKE_LRELEASE) { |
246 | win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe | |
247 | else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease | |
248 | } | |
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 | |
07e28823 | 257 | PRE_TARGETDEPS += compiler_TSQM_make_all |
59020408 | 258 | |
f33a43ef | 259 | # "Other files" to show in Qt Creator |
2c1fd3c3 | 260 | OTHER_FILES += \ |
f33a43ef | 261 | doc/*.rst doc/*.txt doc/README README.md |
2c1fd3c3 | 262 | |
99cec89c WL |
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 | |
267 | } | |
268 | ||
0e569e4a MC |
269 | isEmpty(BOOST_THREAD_LIB_SUFFIX) { |
270 | BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX | |
271 | } | |
272 | ||
99cec89c WL |
273 | isEmpty(BDB_LIB_PATH) { |
274 | macx:BDB_LIB_PATH = /opt/local/lib/db48 | |
275 | } | |
276 | ||
b50ac8f7 GA |
277 | isEmpty(BDB_LIB_SUFFIX) { |
278 | macx:BDB_LIB_SUFFIX = -4.8 | |
279 | } | |
280 | ||
99cec89c WL |
281 | isEmpty(BDB_INCLUDE_PATH) { |
282 | macx:BDB_INCLUDE_PATH = /opt/local/include/db48 | |
283 | } | |
284 | ||
285 | isEmpty(BOOST_LIB_PATH) { | |
286 | macx:BOOST_LIB_PATH = /opt/local/lib | |
287 | } | |
288 | ||
289 | isEmpty(BOOST_INCLUDE_PATH) { | |
290 | macx:BOOST_INCLUDE_PATH = /opt/local/include | |
291 | } | |
292 | ||
f18a119a | 293 | windows:LIBS += -lws2_32 -lshlwapi |
6853e627 | 294 | windows:DEFINES += WIN32 |
9b490f71 WL |
295 | windows:RC_FILE = src/qt/res/bitcoin-qt.rc |
296 | ||
f18a119a MC |
297 | !windows:!mac { |
298 | DEFINES += LINUX | |
299 | } | |
300 | ||
527137e3 | 301 | macx:HEADERS += src/qt/macdockiconhandler.h |
302 | macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm | |
303 | macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit | |
c4de9184 | 304 | macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 |
2c1fd3c3 | 305 | macx:ICON = src/qt/res/icons/bitcoin.icns |
b50ac8f7 | 306 | macx:TARGET = "Bitcoin-Qt" |
99cec89c WL |
307 | |
308 | # Set libraries and includes at end, to use platform-defined defaults if not overridden | |
0b5d6f1e MC |
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,) | |
07e28823 | 311 | LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX |
3f9144d4 MC |
312 | # -lgdi32 has to happen after -lcrypto (see #681) |
313 | windows:LIBS += -lgdi32 | |
0e569e4a | 314 | LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX |
07e28823 | 315 | |
a5f07cbe GA |
316 | contains(RELEASE, 1) { |
317 | !windows:!macx { | |
318 | # Linux: turn dynamic linking back on for c/c++ runtime libraries | |
319 | LIBS += -Wl,-Bdynamic | |
320 | } | |
321 | } | |
322 | ||
07e28823 | 323 | system($$QMAKE_LRELEASE -silent $$_PRO_FILE_) |