]>
Commit | Line | Data |
---|---|---|
aaa1c3c4 | 1 | TEMPLATE = app |
1f2e0df8 | 2 | TARGET = |
94eaab77 | 3 | VERSION = 0.5.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 | ||
5d3083c3 LD |
33 | # use: qmake "USE_UPNP=1" ( enabled by default; default) |
34 | # or: qmake "USE_UPNP=0" (disabled by default) | |
35 | # or: qmake "USE_UPNP=-" (not supported) | |
36 | # miniupnpc (http://miniupnp.free.fr/files/) must be installed for support | |
37 | contains(USE_UPNP, -) { | |
38 | message(Building without UPNP support) | |
39 | } else { | |
0aca8577 | 40 | message(Building with UPNP support) |
5d3083c3 LD |
41 | count(USE_UPNP, 0) { |
42 | USE_UPNP=1 | |
43 | } | |
aaf71d84 MC |
44 | DEFINES += USE_UPNP=$$USE_UPNP STATICLIB |
45 | INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH | |
46 | LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc | |
47 | win32:LIBS += -liphlpapi | |
0aca8577 WL |
48 | } |
49 | ||
9b490f71 | 50 | # use: qmake "USE_DBUS=1" |
07e28823 | 51 | contains(USE_DBUS, 1) { |
cf9195c8 | 52 | message(Building with DBUS (Freedesktop notifications) support) |
010c4fc0 | 53 | DEFINES += USE_DBUS |
cf9195c8 WL |
54 | QT += dbus |
55 | } | |
56 | ||
07e28823 | 57 | # use: qmake "USE_SSL=1" |
8f1631b7 | 58 | contains(USE_SSL, 1) { |
07e28823 WL |
59 | message(Building with SSL support for RPC) |
60 | DEFINES += USE_SSL | |
61 | } | |
62 | ||
5f2e76b8 MC |
63 | contains(BITCOIN_NEED_QT_PLUGINS, 1) { |
64 | DEFINES += BITCOIN_NEED_QT_PLUGINS | |
65 | QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs | |
66 | } | |
67 | ||
533c82ce WL |
68 | !windows { |
69 | # for extra security against potential buffer overflows | |
70 | QMAKE_CXXFLAGS += -fstack-protector | |
71 | QMAKE_LFLAGS += -fstack-protector | |
72 | # do not enable this on windows, as it will result in a non-working executable! | |
73 | } | |
ea8440d7 | 74 | |
5363cb05 | 75 | # disable quite some warnings because bitcoin core "sins" a lot |
d0415902 | 76 | 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 | 77 | |
aaa1c3c4 | 78 | # Input |
6ccff2cb | 79 | DEPENDPATH += src/qt src src json/include |
ba4081c1 WL |
80 | HEADERS += src/qt/bitcoingui.h \ |
81 | src/qt/transactiontablemodel.h \ | |
82 | src/qt/addresstablemodel.h \ | |
83 | src/qt/optionsdialog.h \ | |
84 | src/qt/sendcoinsdialog.h \ | |
3479849d | 85 | src/qt/addressbookpage.h \ |
ba4081c1 WL |
86 | src/qt/aboutdialog.h \ |
87 | src/qt/editaddressdialog.h \ | |
88 | src/qt/bitcoinaddressvalidator.h \ | |
89 | src/base58.h \ | |
90 | src/bignum.h \ | |
91 | src/util.h \ | |
92 | src/uint256.h \ | |
93 | src/serialize.h \ | |
ba4081c1 WL |
94 | src/strlcpy.h \ |
95 | src/main.h \ | |
96 | src/net.h \ | |
97 | src/key.h \ | |
98 | src/db.h \ | |
99 | src/script.h \ | |
100 | src/noui.h \ | |
101 | src/init.h \ | |
102 | src/headers.h \ | |
103 | src/irc.h \ | |
104 | src/json/json_spirit_writer_template.h \ | |
105 | src/json/json_spirit_writer.h \ | |
106 | src/json/json_spirit_value.h \ | |
107 | src/json/json_spirit_utils.h \ | |
108 | src/json/json_spirit_stream_reader.h \ | |
109 | src/json/json_spirit_reader_template.h \ | |
110 | src/json/json_spirit_reader.h \ | |
111 | src/json/json_spirit_error_position.h \ | |
112 | src/json/json_spirit.h \ | |
ba4081c1 WL |
113 | src/qt/clientmodel.h \ |
114 | src/qt/guiutil.h \ | |
115 | src/qt/transactionrecord.h \ | |
116 | src/qt/guiconstants.h \ | |
117 | src/qt/optionsmodel.h \ | |
118 | src/qt/monitoreddatamapper.h \ | |
47c6215c | 119 | src/qtui.h \ |
ba4081c1 | 120 | src/qt/transactiondesc.h \ |
f193c57a | 121 | src/qt/transactiondescdialog.h \ |
e8ef3da7 WL |
122 | src/qt/bitcoinamountfield.h \ |
123 | src/wallet.h \ | |
ceb6d4e1 WL |
124 | src/keystore.h \ |
125 | src/qt/transactionfilterproxy.h \ | |
ef079e18 | 126 | src/qt/transactionview.h \ |
8fe2308b | 127 | src/qt/walletmodel.h \ |
64c8b699 | 128 | src/bitcoinrpc.h \ |
fbaee7a8 | 129 | src/qt/overviewpage.h \ |
0b814f9e | 130 | src/qt/csvmodelwriter.h \ |
a5e6d723 WL |
131 | src/crypter.h \ |
132 | src/qt/sendcoinsentry.h \ | |
e285ffcd | 133 | src/qt/qvalidatedlineedit.h \ |
ee014e5b | 134 | src/qt/bitcoinunits.h \ |
b7bcaf94 | 135 | src/qt/qvaluecombobox.h \ |
c5aa1b13 | 136 | src/qt/askpassphrasedialog.h \ |
cf9195c8 WL |
137 | src/protocol.h \ |
138 | src/qt/notificator.h | |
c5aa1b13 | 139 | |
ba4081c1 WL |
140 | SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \ |
141 | src/qt/transactiontablemodel.cpp \ | |
142 | src/qt/addresstablemodel.cpp \ | |
143 | src/qt/optionsdialog.cpp \ | |
144 | src/qt/sendcoinsdialog.cpp \ | |
3479849d | 145 | src/qt/addressbookpage.cpp \ |
ba4081c1 WL |
146 | src/qt/aboutdialog.cpp \ |
147 | src/qt/editaddressdialog.cpp \ | |
148 | src/qt/bitcoinaddressvalidator.cpp \ | |
ba4081c1 WL |
149 | src/util.cpp \ |
150 | src/script.cpp \ | |
151 | src/main.cpp \ | |
152 | src/init.cpp \ | |
ba4081c1 WL |
153 | src/net.cpp \ |
154 | src/irc.cpp \ | |
155 | src/db.cpp \ | |
156 | src/json/json_spirit_writer.cpp \ | |
157 | src/json/json_spirit_value.cpp \ | |
158 | src/json/json_spirit_reader.cpp \ | |
159 | src/qt/clientmodel.cpp \ | |
160 | src/qt/guiutil.cpp \ | |
161 | src/qt/transactionrecord.cpp \ | |
162 | src/qt/optionsmodel.cpp \ | |
163 | src/qt/monitoreddatamapper.cpp \ | |
164 | src/qt/transactiondesc.cpp \ | |
6315130e | 165 | src/qt/transactiondescdialog.cpp \ |
f193c57a | 166 | src/qt/bitcoinstrings.cpp \ |
e8ef3da7 WL |
167 | src/qt/bitcoinamountfield.cpp \ |
168 | src/wallet.cpp \ | |
ceb6d4e1 WL |
169 | src/keystore.cpp \ |
170 | src/qt/transactionfilterproxy.cpp \ | |
ef079e18 | 171 | src/qt/transactionview.cpp \ |
8fe2308b | 172 | src/qt/walletmodel.cpp \ |
64c8b699 | 173 | src/bitcoinrpc.cpp \ |
fbaee7a8 | 174 | src/qt/overviewpage.cpp \ |
0b814f9e | 175 | src/qt/csvmodelwriter.cpp \ |
a5e6d723 WL |
176 | src/crypter.cpp \ |
177 | src/qt/sendcoinsentry.cpp \ | |
e285ffcd | 178 | src/qt/qvalidatedlineedit.cpp \ |
ee014e5b | 179 | src/qt/bitcoinunits.cpp \ |
b7bcaf94 | 180 | src/qt/qvaluecombobox.cpp \ |
c5aa1b13 | 181 | src/qt/askpassphrasedialog.cpp \ |
cf9195c8 WL |
182 | src/protocol.cpp \ |
183 | src/qt/notificator.cpp | |
13740b7e WL |
184 | |
185 | RESOURCES += \ | |
ba4081c1 | 186 | src/qt/bitcoin.qrc |
df577886 WL |
187 | |
188 | FORMS += \ | |
ba4081c1 | 189 | src/qt/forms/sendcoinsdialog.ui \ |
3479849d | 190 | src/qt/forms/addressbookpage.ui \ |
ba4081c1 WL |
191 | src/qt/forms/aboutdialog.ui \ |
192 | src/qt/forms/editaddressdialog.ui \ | |
64c8b699 | 193 | src/qt/forms/transactiondescdialog.ui \ |
a5e6d723 | 194 | src/qt/forms/overviewpage.ui \ |
b7bcaf94 WL |
195 | src/qt/forms/sendcoinsentry.ui \ |
196 | src/qt/forms/askpassphrasedialog.ui | |
ab2fe68f WL |
197 | |
198 | CODECFORTR = UTF-8 | |
59020408 | 199 | |
317c7335 | 200 | # for lrelease/lupdate |
5c92622a WL |
201 | # also add new translations to src/qt/bitcoin.qrc under translations/ |
202 | TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts) | |
2c1fd3c3 | 203 | |
59020408 WL |
204 | isEmpty(QMAKE_LRELEASE) { |
205 | win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe | |
206 | else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease | |
207 | } | |
208 | isEmpty(TS_DIR):TS_DIR = src/qt/locale | |
209 | # automatically build translations, so they can be included in resource file | |
210 | TSQM.name = lrelease ${QMAKE_FILE_IN} | |
211 | TSQM.input = TRANSLATIONS | |
212 | TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm | |
213 | TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} | |
214 | TSQM.CONFIG = no_link | |
215 | QMAKE_EXTRA_COMPILERS += TSQM | |
07e28823 | 216 | PRE_TARGETDEPS += compiler_TSQM_make_all |
59020408 | 217 | |
f33a43ef | 218 | # "Other files" to show in Qt Creator |
2c1fd3c3 | 219 | OTHER_FILES += \ |
f33a43ef | 220 | doc/*.rst doc/*.txt doc/README README.md |
2c1fd3c3 | 221 | |
99cec89c WL |
222 | # platform specific defaults, if not overridden on command line |
223 | isEmpty(BOOST_LIB_SUFFIX) { | |
224 | macx:BOOST_LIB_SUFFIX = -mt | |
225 | windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43 | |
226 | } | |
227 | ||
0e569e4a MC |
228 | isEmpty(BOOST_THREAD_LIB_SUFFIX) { |
229 | BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX | |
230 | } | |
231 | ||
99cec89c WL |
232 | isEmpty(BDB_LIB_PATH) { |
233 | macx:BDB_LIB_PATH = /opt/local/lib/db48 | |
234 | } | |
235 | ||
b50ac8f7 GA |
236 | isEmpty(BDB_LIB_SUFFIX) { |
237 | macx:BDB_LIB_SUFFIX = -4.8 | |
238 | } | |
239 | ||
99cec89c WL |
240 | isEmpty(BDB_INCLUDE_PATH) { |
241 | macx:BDB_INCLUDE_PATH = /opt/local/include/db48 | |
242 | } | |
243 | ||
244 | isEmpty(BOOST_LIB_PATH) { | |
245 | macx:BOOST_LIB_PATH = /opt/local/lib | |
246 | } | |
247 | ||
248 | isEmpty(BOOST_INCLUDE_PATH) { | |
249 | macx:BOOST_INCLUDE_PATH = /opt/local/include | |
250 | } | |
251 | ||
252 | windows:LIBS += -lws2_32 -lgdi32 | |
6853e627 | 253 | windows:DEFINES += WIN32 |
9b490f71 WL |
254 | windows:RC_FILE = src/qt/res/bitcoin-qt.rc |
255 | ||
527137e3 | 256 | macx:HEADERS += src/qt/macdockiconhandler.h |
257 | macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm | |
258 | macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit | |
6853e627 | 259 | macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 BOOST_FILESYSTEM_VERSION=3 |
2c1fd3c3 | 260 | macx:ICON = src/qt/res/icons/bitcoin.icns |
b50ac8f7 | 261 | macx:TARGET = "Bitcoin-Qt" |
99cec89c WL |
262 | |
263 | # Set libraries and includes at end, to use platform-defined defaults if not overridden | |
264 | INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH | |
265 | LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) | |
07e28823 | 266 | LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX |
0e569e4a | 267 | LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX |
07e28823 | 268 | |
a5f07cbe GA |
269 | contains(RELEASE, 1) { |
270 | !windows:!macx { | |
271 | # Linux: turn dynamic linking back on for c/c++ runtime libraries | |
272 | LIBS += -Wl,-Bdynamic | |
273 | } | |
274 | } | |
275 | ||
07e28823 | 276 | system($$QMAKE_LRELEASE -silent $$_PRO_FILE_) |