You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bitcoin-qt.pro 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. TEMPLATE = app
  2. TARGET =
  3. VERSION = 0.6.0
  4. INCLUDEPATH += src src/json src/qt
  5. DEFINES += QT_GUI BOOST_THREAD_USE_LIB
  6. CONFIG += no_include_pwd
  7. # for boost 1.37, add -mt to the boost libraries
  8. # use: qmake BOOST_LIB_SUFFIX=-mt
  9. # for boost thread win32 with _win32 sufix
  10. # use: BOOST_THREAD_LIB_SUFFIX=_win32-...
  11. # or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8
  12. # Dependency library locations can be customized with BOOST_INCLUDE_PATH,
  13. # BOOST_LIB_PATH, BDB_INCLUDE_PATH, BDB_LIB_PATH
  14. # OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
  15. OBJECTS_DIR = build
  16. MOC_DIR = build
  17. UI_DIR = build
  18. # use: qmake "USE_QRCODE=1"
  19. # libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
  20. contains(USE_QRCODE, 1) {
  21. message(Building with QRCode support)
  22. DEFINES += USE_QRCODE
  23. LIBS += -lqrencode
  24. }
  25. # use: qmake "RELEASE=1"
  26. contains(RELEASE, 1) {
  27. # Mac: compile for maximum compatibility (10.5, 32-bit)
  28. macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
  29. !windows:!macx {
  30. # Linux: static link
  31. LIBS += -Wl,-Bstatic
  32. }
  33. }
  34. # use: qmake "USE_UPNP=1" ( enabled by default; default)
  35. # or: qmake "USE_UPNP=0" (disabled by default)
  36. # or: qmake "USE_UPNP=-" (not supported)
  37. # miniupnpc (http://miniupnp.free.fr/files/) must be installed for support
  38. contains(USE_UPNP, -) {
  39. message(Building without UPNP support)
  40. } else {
  41. message(Building with UPNP support)
  42. count(USE_UPNP, 0) {
  43. USE_UPNP=1
  44. }
  45. DEFINES += USE_UPNP=$$USE_UPNP STATICLIB
  46. INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
  47. LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
  48. win32:LIBS += -liphlpapi
  49. }
  50. # use: qmake "USE_DBUS=1"
  51. contains(USE_DBUS, 1) {
  52. message(Building with DBUS (Freedesktop notifications) support)
  53. DEFINES += USE_DBUS
  54. QT += dbus
  55. }
  56. # use: qmake "USE_SSL=1"
  57. contains(USE_SSL, 1) {
  58. message(Building with SSL support for RPC)
  59. DEFINES += USE_SSL
  60. }
  61. # use: qmake "FIRST_CLASS_MESSAGING=1"
  62. contains(FIRST_CLASS_MESSAGING, 1) {
  63. message(Building with first-class messaging)
  64. DEFINES += FIRST_CLASS_MESSAGING
  65. }
  66. contains(BITCOIN_NEED_QT_PLUGINS, 1) {
  67. DEFINES += BITCOIN_NEED_QT_PLUGINS
  68. QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs
  69. }
  70. !windows {
  71. # for extra security against potential buffer overflows
  72. QMAKE_CXXFLAGS += -fstack-protector
  73. QMAKE_LFLAGS += -fstack-protector
  74. # do not enable this on windows, as it will result in a non-working executable!
  75. }
  76. # disable quite some warnings because bitcoin core "sins" a lot
  77. 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
  78. # Input
  79. DEPENDPATH += src/qt src src json/include
  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 \
  85. src/qt/addressbookpage.h \
  86. src/qt/messagepage.h \
  87. src/qt/aboutdialog.h \
  88. src/qt/editaddressdialog.h \
  89. src/qt/bitcoinaddressvalidator.h \
  90. src/base58.h \
  91. src/bignum.h \
  92. src/checkpoints.h \
  93. src/compat.h \
  94. src/util.h \
  95. src/uint256.h \
  96. src/serialize.h \
  97. src/strlcpy.h \
  98. src/main.h \
  99. src/net.h \
  100. src/key.h \
  101. src/db.h \
  102. src/script.h \
  103. src/noui.h \
  104. src/init.h \
  105. src/headers.h \
  106. src/irc.h \
  107. src/json/json_spirit_writer_template.h \
  108. src/json/json_spirit_writer.h \
  109. src/json/json_spirit_value.h \
  110. src/json/json_spirit_utils.h \
  111. src/json/json_spirit_stream_reader.h \
  112. src/json/json_spirit_reader_template.h \
  113. src/json/json_spirit_reader.h \
  114. src/json/json_spirit_error_position.h \
  115. src/json/json_spirit.h \
  116. src/qt/clientmodel.h \
  117. src/qt/guiutil.h \
  118. src/qt/transactionrecord.h \
  119. src/qt/guiconstants.h \
  120. src/qt/optionsmodel.h \
  121. src/qt/monitoreddatamapper.h \
  122. src/qtui.h \
  123. src/qt/transactiondesc.h \
  124. src/qt/transactiondescdialog.h \
  125. src/qt/bitcoinamountfield.h \
  126. src/wallet.h \
  127. src/keystore.h \
  128. src/qt/transactionfilterproxy.h \
  129. src/qt/transactionview.h \
  130. src/qt/walletmodel.h \
  131. src/bitcoinrpc.h \
  132. src/qt/overviewpage.h \
  133. src/qt/csvmodelwriter.h \
  134. src/crypter.h \
  135. src/qt/sendcoinsentry.h \
  136. src/qt/qvalidatedlineedit.h \
  137. src/qt/bitcoinunits.h \
  138. src/qt/qvaluecombobox.h \
  139. src/qt/askpassphrasedialog.h \
  140. src/protocol.h \
  141. src/qt/notificator.h \
  142. src/qt/qtipcserver.h
  143. SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
  144. src/qt/transactiontablemodel.cpp \
  145. src/qt/addresstablemodel.cpp \
  146. src/qt/optionsdialog.cpp \
  147. src/qt/sendcoinsdialog.cpp \
  148. src/qt/addressbookpage.cpp \
  149. src/qt/messagepage.cpp \
  150. src/qt/aboutdialog.cpp \
  151. src/qt/editaddressdialog.cpp \
  152. src/qt/bitcoinaddressvalidator.cpp \
  153. src/util.cpp \
  154. src/netbase.cpp \
  155. src/key.cpp \
  156. src/script.cpp \
  157. src/main.cpp \
  158. src/init.cpp \
  159. src/net.cpp \
  160. src/irc.cpp \
  161. src/checkpoints.cpp \
  162. src/db.cpp \
  163. src/json/json_spirit_writer.cpp \
  164. src/json/json_spirit_value.cpp \
  165. src/json/json_spirit_reader.cpp \
  166. src/qt/clientmodel.cpp \
  167. src/qt/guiutil.cpp \
  168. src/qt/transactionrecord.cpp \
  169. src/qt/optionsmodel.cpp \
  170. src/qt/monitoreddatamapper.cpp \
  171. src/qt/transactiondesc.cpp \
  172. src/qt/transactiondescdialog.cpp \
  173. src/qt/bitcoinstrings.cpp \
  174. src/qt/bitcoinamountfield.cpp \
  175. src/wallet.cpp \
  176. src/keystore.cpp \
  177. src/qt/transactionfilterproxy.cpp \
  178. src/qt/transactionview.cpp \
  179. src/qt/walletmodel.cpp \
  180. src/bitcoinrpc.cpp \
  181. src/rpcdump.cpp \
  182. src/qt/overviewpage.cpp \
  183. src/qt/csvmodelwriter.cpp \
  184. src/crypter.cpp \
  185. src/qt/sendcoinsentry.cpp \
  186. src/qt/qvalidatedlineedit.cpp \
  187. src/qt/bitcoinunits.cpp \
  188. src/qt/qvaluecombobox.cpp \
  189. src/qt/askpassphrasedialog.cpp \
  190. src/protocol.cpp \
  191. src/qt/notificator.cpp \
  192. src/qt/qtipcserver.cpp
  193. RESOURCES += \
  194. src/qt/bitcoin.qrc
  195. FORMS += \
  196. src/qt/forms/sendcoinsdialog.ui \
  197. src/qt/forms/addressbookpage.ui \
  198. src/qt/forms/messagepage.ui \
  199. src/qt/forms/aboutdialog.ui \
  200. src/qt/forms/editaddressdialog.ui \
  201. src/qt/forms/transactiondescdialog.ui \
  202. src/qt/forms/overviewpage.ui \
  203. src/qt/forms/sendcoinsentry.ui \
  204. src/qt/forms/askpassphrasedialog.ui
  205. contains(USE_QRCODE, 1) {
  206. HEADERS += src/qt/qrcodedialog.h
  207. SOURCES += src/qt/qrcodedialog.cpp
  208. FORMS += src/qt/forms/qrcodedialog.ui
  209. }
  210. CODECFORTR = UTF-8
  211. # for lrelease/lupdate
  212. # also add new translations to src/qt/bitcoin.qrc under translations/
  213. TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts)
  214. isEmpty(QMAKE_LRELEASE) {
  215. win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
  216. else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
  217. }
  218. isEmpty(TS_DIR):TS_DIR = src/qt/locale
  219. # automatically build translations, so they can be included in resource file
  220. TSQM.name = lrelease ${QMAKE_FILE_IN}
  221. TSQM.input = TRANSLATIONS
  222. TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
  223. TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
  224. TSQM.CONFIG = no_link
  225. QMAKE_EXTRA_COMPILERS += TSQM
  226. PRE_TARGETDEPS += compiler_TSQM_make_all
  227. # "Other files" to show in Qt Creator
  228. OTHER_FILES += \
  229. doc/*.rst doc/*.txt doc/README README.md
  230. # platform specific defaults, if not overridden on command line
  231. isEmpty(BOOST_LIB_SUFFIX) {
  232. macx:BOOST_LIB_SUFFIX = -mt
  233. windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
  234. }
  235. isEmpty(BOOST_THREAD_LIB_SUFFIX) {
  236. BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
  237. }
  238. isEmpty(BDB_LIB_PATH) {
  239. macx:BDB_LIB_PATH = /opt/local/lib/db48
  240. }
  241. isEmpty(BDB_LIB_SUFFIX) {
  242. macx:BDB_LIB_SUFFIX = -4.8
  243. }
  244. isEmpty(BDB_INCLUDE_PATH) {
  245. macx:BDB_INCLUDE_PATH = /opt/local/include/db48
  246. }
  247. isEmpty(BOOST_LIB_PATH) {
  248. macx:BOOST_LIB_PATH = /opt/local/lib
  249. }
  250. isEmpty(BOOST_INCLUDE_PATH) {
  251. macx:BOOST_INCLUDE_PATH = /opt/local/include
  252. }
  253. windows:LIBS += -lws2_32 -lshlwapi
  254. windows:DEFINES += WIN32
  255. windows:RC_FILE = src/qt/res/bitcoin-qt.rc
  256. !windows:!mac {
  257. DEFINES += LINUX
  258. }
  259. macx:HEADERS += src/qt/macdockiconhandler.h
  260. macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm
  261. macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
  262. macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
  263. macx:ICON = src/qt/res/icons/bitcoin.icns
  264. macx:TARGET = "Bitcoin-Qt"
  265. # Set libraries and includes at end, to use platform-defined defaults if not overridden
  266. INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
  267. LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
  268. LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
  269. # -lgdi32 has to happen after -lcrypto (see #681)
  270. windows:LIBS += -lgdi32
  271. LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
  272. contains(RELEASE, 1) {
  273. !windows:!macx {
  274. # Linux: turn dynamic linking back on for c/c++ runtime libraries
  275. LIBS += -Wl,-Bdynamic
  276. }
  277. }
  278. system($$QMAKE_LRELEASE -silent $$_PRO_FILE_)