Bump version to 0.6.0.8
[novacoin.git] / bitcoin-qt.pro
1 TEMPLATE = app
2 TARGET =
3 VERSION = 0.6.0.8
4 INCLUDEPATH += src src/json src/qt
5 DEFINES += QT_GUI BOOST_THREAD_USE_LIB
6 CONFIG += no_include_pwd
7
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
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
17
18 OBJECTS_DIR = build
19 MOC_DIR = build
20 UI_DIR = build
21
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
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
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 {
48     message(Building with UPNP support)
49     count(USE_UPNP, 0) {
50         USE_UPNP=1
51     }
52     DEFINES += USE_UPNP=$$USE_UPNP STATICLIB
53     INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
54     LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
55     win32:LIBS += -liphlpapi
56 }
57
58 # use: qmake "USE_DBUS=1"
59 contains(USE_DBUS, 1) {
60     message(Building with DBUS (Freedesktop notifications) support)
61     DEFINES += USE_DBUS
62     QT += dbus
63 }
64
65 # use: qmake "USE_SSL=1"
66 contains(USE_SSL, 1) {
67     message(Building with SSL support for RPC)
68     DEFINES += USE_SSL
69 }
70
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
77 contains(BITCOIN_NEED_QT_PLUGINS, 1) {
78     DEFINES += BITCOIN_NEED_QT_PLUGINS
79     QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
80 }
81
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 }
88
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
91
92 # Input
93 DEPENDPATH += src src/json src/qt
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 \
104     src/addrman.h \
105     src/base58.h \
106     src/bignum.h \
107     src/checkpoints.h \
108     src/compat.h \
109     src/util.h \
110     src/uint256.h \
111     src/serialize.h \
112     src/strlcpy.h \
113     src/main.h \
114     src/net.h \
115     src/key.h \
116     src/db.h \
117     src/script.h \
118     src/noui.h \
119     src/init.h \
120     src/headers.h \
121     src/irc.h \
122     src/mruset.h \
123     src/json/json_spirit_writer_template.h \
124     src/json/json_spirit_writer.h \
125     src/json/json_spirit_value.h \
126     src/json/json_spirit_utils.h \
127     src/json/json_spirit_stream_reader.h \
128     src/json/json_spirit_reader_template.h \
129     src/json/json_spirit_reader.h \
130     src/json/json_spirit_error_position.h \
131     src/json/json_spirit.h \
132     src/qt/clientmodel.h \
133     src/qt/guiutil.h \
134     src/qt/transactionrecord.h \
135     src/qt/guiconstants.h \
136     src/qt/optionsmodel.h \
137     src/qt/monitoreddatamapper.h \
138     src/qtui.h \
139     src/qt/transactiondesc.h \
140     src/qt/transactiondescdialog.h \
141     src/qt/bitcoinamountfield.h \
142     src/wallet.h \
143     src/keystore.h \
144     src/qt/transactionfilterproxy.h \
145     src/qt/transactionview.h \
146     src/qt/walletmodel.h \
147     src/bitcoinrpc.h \
148     src/qt/overviewpage.h \
149     src/qt/csvmodelwriter.h \
150     src/crypter.h \
151     src/qt/sendcoinsentry.h \
152     src/qt/qvalidatedlineedit.h \
153     src/qt/bitcoinunits.h \
154     src/qt/qvaluecombobox.h \
155     src/qt/askpassphrasedialog.h \
156     src/protocol.h \
157     src/qt/notificator.h \
158     src/qt/qtipcserver.h
159
160 SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
161     src/qt/transactiontablemodel.cpp \
162     src/qt/addresstablemodel.cpp \
163     src/qt/optionsdialog.cpp \
164     src/qt/sendcoinsdialog.cpp \
165     src/qt/addressbookpage.cpp \
166     src/qt/messagepage.cpp \
167     src/qt/aboutdialog.cpp \
168     src/qt/editaddressdialog.cpp \
169     src/qt/bitcoinaddressvalidator.cpp \
170     src/util.cpp \
171     src/netbase.cpp \
172     src/key.cpp \
173     src/script.cpp \
174     src/main.cpp \
175     src/init.cpp \
176     src/net.cpp \
177     src/irc.cpp \
178     src/checkpoints.cpp \
179     src/addrman.cpp \
180     src/db.cpp \
181     src/json/json_spirit_writer.cpp \
182     src/json/json_spirit_value.cpp \
183     src/json/json_spirit_reader.cpp \
184     src/qt/clientmodel.cpp \
185     src/qt/guiutil.cpp \
186     src/qt/transactionrecord.cpp \
187     src/qt/optionsmodel.cpp \
188     src/qt/monitoreddatamapper.cpp \
189     src/qt/transactiondesc.cpp \
190     src/qt/transactiondescdialog.cpp \
191     src/qt/bitcoinstrings.cpp \
192     src/qt/bitcoinamountfield.cpp \
193     src/wallet.cpp \
194     src/keystore.cpp \
195     src/qt/transactionfilterproxy.cpp \
196     src/qt/transactionview.cpp \
197     src/qt/walletmodel.cpp \
198     src/bitcoinrpc.cpp \
199     src/rpcdump.cpp \
200     src/qt/overviewpage.cpp \
201     src/qt/csvmodelwriter.cpp \
202     src/crypter.cpp \
203     src/qt/sendcoinsentry.cpp \
204     src/qt/qvalidatedlineedit.cpp \
205     src/qt/bitcoinunits.cpp \
206     src/qt/qvaluecombobox.cpp \
207     src/qt/askpassphrasedialog.cpp \
208     src/protocol.cpp \
209     src/qt/notificator.cpp \
210     src/qt/qtipcserver.cpp
211
212 RESOURCES += \
213     src/qt/bitcoin.qrc
214
215 FORMS += \
216     src/qt/forms/sendcoinsdialog.ui \
217     src/qt/forms/addressbookpage.ui \
218     src/qt/forms/messagepage.ui \
219     src/qt/forms/aboutdialog.ui \
220     src/qt/forms/editaddressdialog.ui \
221     src/qt/forms/transactiondescdialog.ui \
222     src/qt/forms/overviewpage.ui \
223     src/qt/forms/sendcoinsentry.ui \
224     src/qt/forms/askpassphrasedialog.ui
225
226 contains(USE_QRCODE, 1) {
227 HEADERS += src/qt/qrcodedialog.h
228 SOURCES += src/qt/qrcodedialog.cpp
229 FORMS += src/qt/forms/qrcodedialog.ui
230 }
231
232 contains(BITCOIN_QT_TEST, 1) {
233 SOURCES += src/qt/test/test_main.cpp \
234     src/qt/test/uritests.cpp
235 HEADERS += src/qt/test/uritests.h
236 DEPENDPATH += src/qt/test
237 QT += testlib
238 TARGET = bitcoin-qt_test
239 DEFINES += BITCOIN_QT_TEST
240 }
241
242 CODECFORTR = UTF-8
243
244 # for lrelease/lupdate
245 # also add new translations to src/qt/bitcoin.qrc under translations/
246 TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts)
247
248 isEmpty(QMAKE_LRELEASE) {
249     win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
250     else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
251 }
252 isEmpty(TS_DIR):TS_DIR = src/qt/locale
253 # automatically build translations, so they can be included in resource file
254 TSQM.name = lrelease ${QMAKE_FILE_IN}
255 TSQM.input = TRANSLATIONS
256 TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
257 TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
258 TSQM.CONFIG = no_link
259 QMAKE_EXTRA_COMPILERS += TSQM
260 PRE_TARGETDEPS += compiler_TSQM_make_all
261
262 # "Other files" to show in Qt Creator
263 OTHER_FILES += \
264     doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc
265
266 # platform specific defaults, if not overridden on command line
267 isEmpty(BOOST_LIB_SUFFIX) {
268     macx:BOOST_LIB_SUFFIX = -mt
269     windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
270 }
271
272 isEmpty(BOOST_THREAD_LIB_SUFFIX) {
273     BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
274 }
275
276 isEmpty(BDB_LIB_PATH) {
277     macx:BDB_LIB_PATH = /opt/local/lib/db48
278 }
279
280 isEmpty(BDB_LIB_SUFFIX) {
281     macx:BDB_LIB_SUFFIX = -4.8
282 }
283
284 isEmpty(BDB_INCLUDE_PATH) {
285     macx:BDB_INCLUDE_PATH = /opt/local/include/db48
286 }
287
288 isEmpty(BOOST_LIB_PATH) {
289     macx:BOOST_LIB_PATH = /opt/local/lib
290 }
291
292 isEmpty(BOOST_INCLUDE_PATH) {
293     macx:BOOST_INCLUDE_PATH = /opt/local/include
294 }
295
296 windows:LIBS += -lws2_32 -lshlwapi
297 windows:DEFINES += WIN32
298 windows:RC_FILE = src/qt/res/bitcoin-qt.rc
299
300 windows:!contains(MINGW_THREAD_BUGFIX, 0) {
301     # At least qmake's win32-g++-cross profile is missing the -lmingwthrd
302     # thread-safety flag. GCC has -mthreads to enable this, but it doesn't
303     # work with static linking. -lmingwthrd must come BEFORE -lmingw, so
304     # it is prepended to QMAKE_LIBS_QT_ENTRY.
305     # It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes
306     # any problems on some untested qmake profile now or in the future.
307     DEFINES += _MT
308     QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY
309 }
310
311 !windows:!mac {
312     DEFINES += LINUX
313     LIBS += -lrt
314 }
315
316 macx:HEADERS += src/qt/macdockiconhandler.h
317 macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm
318 macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
319 macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
320 macx:ICON = src/qt/res/icons/bitcoin.icns
321 macx:TARGET = "Bitcoin-Qt"
322
323 # Set libraries and includes at end, to use platform-defined defaults if not overridden
324 INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
325 LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
326 LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
327 # -lgdi32 has to happen after -lcrypto (see  #681)
328 windows:LIBS += -lole32 -luuid -lgdi32
329 LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
330
331 contains(RELEASE, 1) {
332     !windows:!macx {
333         # Linux: turn dynamic linking back on for c/c++ runtime libraries
334         LIBS += -Wl,-Bdynamic
335     }
336 }
337
338 system($$QMAKE_LRELEASE -silent $$_PRO_FILE_)