Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. TEMPLATE = app
  2. TARGET =
  3. VERSION = 0.6.99
  4. INCLUDEPATH += src src/json src/qt
  5. DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE USE_IPV6
  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:
  13. # BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
  14. # BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
  15. OBJECTS_DIR = build
  16. MOC_DIR = build
  17. UI_DIR = build
  18. # use: qmake "RELEASE=1"
  19. contains(RELEASE, 1) {
  20. # Mac: compile for maximum compatibility (10.5, 32-bit)
  21. macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
  22. !windows:!macx {
  23. # Linux: static link
  24. LIBS += -Wl,-Bstatic
  25. }
  26. }
  27. # use: qmake "USE_QRCODE=1"
  28. # libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
  29. contains(USE_QRCODE, 1) {
  30. message(Building with QRCode support)
  31. DEFINES += USE_QRCODE
  32. LIBS += -lqrencode
  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 "FIRST_CLASS_MESSAGING=1"
  57. contains(FIRST_CLASS_MESSAGING, 1) {
  58. message(Building with first-class messaging)
  59. DEFINES += FIRST_CLASS_MESSAGING
  60. }
  61. contains(BITCOIN_NEED_QT_PLUGINS, 1) {
  62. DEFINES += BITCOIN_NEED_QT_PLUGINS
  63. QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
  64. }
  65. !windows {
  66. # for extra security against potential buffer overflows
  67. QMAKE_CXXFLAGS += -fstack-protector
  68. QMAKE_LFLAGS += -fstack-protector
  69. # do not enable this on windows, as it will result in a non-working executable!
  70. }
  71. # regenerate src/build.h
  72. !windows|contains(USE_BUILD_INFO, 1) {
  73. genbuild.depends = FORCE
  74. genbuild.commands = cd $$PWD; /bin/sh share/genbuild.sh $$OUT_PWD/build/build.h
  75. genbuild.target = $$OUT_PWD/build/build.h
  76. PRE_TARGETDEPS += $$OUT_PWD/build/build.h
  77. QMAKE_EXTRA_TARGETS += genbuild
  78. DEFINES += HAVE_BUILD_INFO
  79. }
  80. QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter
  81. # Input
  82. DEPENDPATH += src src/json src/qt
  83. HEADERS += src/qt/bitcoingui.h \
  84. src/qt/transactiontablemodel.h \
  85. src/qt/addresstablemodel.h \
  86. src/qt/optionsdialog.h \
  87. src/qt/sendcoinsdialog.h \
  88. src/qt/addressbookpage.h \
  89. src/qt/signverifymessagedialog.h \
  90. src/qt/aboutdialog.h \
  91. src/qt/editaddressdialog.h \
  92. src/qt/bitcoinaddressvalidator.h \
  93. src/addrman.h \
  94. src/base58.h \
  95. src/bignum.h \
  96. src/checkpoints.h \
  97. src/compat.h \
  98. src/sync.h \
  99. src/util.h \
  100. src/uint256.h \
  101. src/serialize.h \
  102. src/strlcpy.h \
  103. src/main.h \
  104. src/net.h \
  105. src/key.h \
  106. src/db.h \
  107. src/walletdb.h \
  108. src/script.h \
  109. src/init.h \
  110. src/irc.h \
  111. src/mruset.h \
  112. src/json/json_spirit_writer_template.h \
  113. src/json/json_spirit_writer.h \
  114. src/json/json_spirit_value.h \
  115. src/json/json_spirit_utils.h \
  116. src/json/json_spirit_stream_reader.h \
  117. src/json/json_spirit_reader_template.h \
  118. src/json/json_spirit_reader.h \
  119. src/json/json_spirit_error_position.h \
  120. src/json/json_spirit.h \
  121. src/qt/clientmodel.h \
  122. src/qt/guiutil.h \
  123. src/qt/transactionrecord.h \
  124. src/qt/guiconstants.h \
  125. src/qt/optionsmodel.h \
  126. src/qt/monitoreddatamapper.h \
  127. src/qt/transactiondesc.h \
  128. src/qt/transactiondescdialog.h \
  129. src/qt/bitcoinamountfield.h \
  130. src/wallet.h \
  131. src/keystore.h \
  132. src/qt/transactionfilterproxy.h \
  133. src/qt/transactionview.h \
  134. src/qt/walletmodel.h \
  135. src/bitcoinrpc.h \
  136. src/qt/overviewpage.h \
  137. src/qt/csvmodelwriter.h \
  138. src/crypter.h \
  139. src/qt/sendcoinsentry.h \
  140. src/qt/qvalidatedlineedit.h \
  141. src/qt/bitcoinunits.h \
  142. src/qt/qvaluecombobox.h \
  143. src/qt/askpassphrasedialog.h \
  144. src/protocol.h \
  145. src/qt/notificator.h \
  146. src/qt/qtipcserver.h \
  147. src/allocators.h \
  148. src/ui_interface.h \
  149. src/qt/rpcconsole.h
  150. SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
  151. src/qt/transactiontablemodel.cpp \
  152. src/qt/addresstablemodel.cpp \
  153. src/qt/optionsdialog.cpp \
  154. src/qt/sendcoinsdialog.cpp \
  155. src/qt/addressbookpage.cpp \
  156. src/qt/signverifymessagedialog.cpp \
  157. src/qt/aboutdialog.cpp \
  158. src/qt/editaddressdialog.cpp \
  159. src/qt/bitcoinaddressvalidator.cpp \
  160. src/version.cpp \
  161. src/sync.cpp \
  162. src/util.cpp \
  163. src/netbase.cpp \
  164. src/key.cpp \
  165. src/script.cpp \
  166. src/main.cpp \
  167. src/init.cpp \
  168. src/net.cpp \
  169. src/irc.cpp \
  170. src/checkpoints.cpp \
  171. src/addrman.cpp \
  172. src/db.cpp \
  173. src/walletdb.cpp \
  174. src/json/json_spirit_writer.cpp \
  175. src/json/json_spirit_value.cpp \
  176. src/json/json_spirit_reader.cpp \
  177. src/qt/clientmodel.cpp \
  178. src/qt/guiutil.cpp \
  179. src/qt/transactionrecord.cpp \
  180. src/qt/optionsmodel.cpp \
  181. src/qt/monitoreddatamapper.cpp \
  182. src/qt/transactiondesc.cpp \
  183. src/qt/transactiondescdialog.cpp \
  184. src/qt/bitcoinstrings.cpp \
  185. src/qt/bitcoinamountfield.cpp \
  186. src/wallet.cpp \
  187. src/keystore.cpp \
  188. src/qt/transactionfilterproxy.cpp \
  189. src/qt/transactionview.cpp \
  190. src/qt/walletmodel.cpp \
  191. src/bitcoinrpc.cpp \
  192. src/rpcdump.cpp \
  193. src/rpcnet.cpp \
  194. src/rpcrawtransaction.cpp \
  195. src/qt/overviewpage.cpp \
  196. src/qt/csvmodelwriter.cpp \
  197. src/crypter.cpp \
  198. src/qt/sendcoinsentry.cpp \
  199. src/qt/qvalidatedlineedit.cpp \
  200. src/qt/bitcoinunits.cpp \
  201. src/qt/qvaluecombobox.cpp \
  202. src/qt/askpassphrasedialog.cpp \
  203. src/protocol.cpp \
  204. src/qt/notificator.cpp \
  205. src/qt/qtipcserver.cpp \
  206. src/qt/rpcconsole.cpp \
  207. src/noui.cpp
  208. RESOURCES += \
  209. src/qt/bitcoin.qrc
  210. FORMS += \
  211. src/qt/forms/sendcoinsdialog.ui \
  212. src/qt/forms/addressbookpage.ui \
  213. src/qt/forms/signverifymessagedialog.ui \
  214. src/qt/forms/aboutdialog.ui \
  215. src/qt/forms/editaddressdialog.ui \
  216. src/qt/forms/transactiondescdialog.ui \
  217. src/qt/forms/overviewpage.ui \
  218. src/qt/forms/sendcoinsentry.ui \
  219. src/qt/forms/askpassphrasedialog.ui \
  220. src/qt/forms/rpcconsole.ui \
  221. src/qt/forms/optionsdialog.ui
  222. contains(USE_QRCODE, 1) {
  223. HEADERS += src/qt/qrcodedialog.h
  224. SOURCES += src/qt/qrcodedialog.cpp
  225. FORMS += src/qt/forms/qrcodedialog.ui
  226. }
  227. contains(BITCOIN_QT_TEST, 1) {
  228. SOURCES += src/qt/test/test_main.cpp \
  229. src/qt/test/uritests.cpp
  230. HEADERS += src/qt/test/uritests.h
  231. DEPENDPATH += src/qt/test
  232. QT += testlib
  233. TARGET = bitcoin-qt_test
  234. DEFINES += BITCOIN_QT_TEST
  235. }
  236. CODECFORTR = UTF-8
  237. # for lrelease/lupdate
  238. # also add new translations to src/qt/bitcoin.qrc under translations/
  239. TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts)
  240. isEmpty(QMAKE_LRELEASE) {
  241. win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
  242. else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
  243. }
  244. isEmpty(QM_DIR):QM_DIR = $$PWD/src/qt/locale
  245. # automatically build translations, so they can be included in resource file
  246. TSQM.name = lrelease ${QMAKE_FILE_IN}
  247. TSQM.input = TRANSLATIONS
  248. TSQM.output = $$QM_DIR/${QMAKE_FILE_BASE}.qm
  249. TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
  250. TSQM.CONFIG = no_link
  251. QMAKE_EXTRA_COMPILERS += TSQM
  252. # "Other files" to show in Qt Creator
  253. OTHER_FILES += \
  254. doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc
  255. # platform specific defaults, if not overridden on command line
  256. isEmpty(BOOST_LIB_SUFFIX) {
  257. macx:BOOST_LIB_SUFFIX = -mt
  258. windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
  259. }
  260. isEmpty(BOOST_THREAD_LIB_SUFFIX) {
  261. BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
  262. }
  263. isEmpty(BDB_LIB_PATH) {
  264. macx:BDB_LIB_PATH = /opt/local/lib/db48
  265. }
  266. isEmpty(BDB_LIB_SUFFIX) {
  267. macx:BDB_LIB_SUFFIX = -4.8
  268. }
  269. isEmpty(BDB_INCLUDE_PATH) {
  270. macx:BDB_INCLUDE_PATH = /opt/local/include/db48
  271. }
  272. isEmpty(BOOST_LIB_PATH) {
  273. macx:BOOST_LIB_PATH = /opt/local/lib
  274. }
  275. isEmpty(BOOST_INCLUDE_PATH) {
  276. macx:BOOST_INCLUDE_PATH = /opt/local/include
  277. }
  278. windows:LIBS += -lws2_32 -lshlwapi -lmswsock
  279. windows:DEFINES += WIN32
  280. windows:RC_FILE = src/qt/res/bitcoin-qt.rc
  281. windows:!contains(MINGW_THREAD_BUGFIX, 0) {
  282. # At least qmake's win32-g++-cross profile is missing the -lmingwthrd
  283. # thread-safety flag. GCC has -mthreads to enable this, but it doesn't
  284. # work with static linking. -lmingwthrd must come BEFORE -lmingw, so
  285. # it is prepended to QMAKE_LIBS_QT_ENTRY.
  286. # It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes
  287. # any problems on some untested qmake profile now or in the future.
  288. DEFINES += _MT
  289. QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY
  290. }
  291. !windows:!mac {
  292. DEFINES += LINUX
  293. LIBS += -lrt
  294. }
  295. macx:HEADERS += src/qt/macdockiconhandler.h
  296. macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm
  297. macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
  298. macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
  299. macx:ICON = src/qt/res/icons/bitcoin.icns
  300. macx:TARGET = "Bitcoin-Qt"
  301. # Set libraries and includes at end, to use platform-defined defaults if not overridden
  302. INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
  303. LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
  304. LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
  305. # -lgdi32 has to happen after -lcrypto (see #681)
  306. windows:LIBS += -lole32 -luuid -lgdi32
  307. LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
  308. contains(RELEASE, 1) {
  309. !windows:!macx {
  310. # Linux: turn dynamic linking back on for c/c++ runtime libraries
  311. LIBS += -Wl,-Bdynamic
  312. }
  313. }
  314. system($$QMAKE_LRELEASE -silent $$_PRO_FILE_)