forked from amjuarez/bytecoin-gui
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
248 lines (234 loc) · 8.12 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
cmake_minimum_required(VERSION 3.0.2)
include(CryptoNoteWallet.cmake)
project(${CN_PROJECT_NAME})
set(VERSION_MAJOR 1)
set(VERSION_MINOR 0)
set(VERSION_PATCH 0)
message(STATUS "${PROJECT_BINARY_DIR}")
find_package(Git)
find_package(Boost 1.58 REQUIRED COMPONENTS
date_time
filesystem
program_options
regex
serialization
system
thread
chrono)
find_package(Qt5 REQUIRED COMPONENTS
Core
Gui
Widgets
Network
DBus)
#set(EXTERNAL_CMAKE_ARGS
# -DSTATIC:BOOL=OFF
# -DBoost_USE_STATIC_LIBS:BOOL=ON
# -DBoost_USE_STATIC_RUNTIME:BOOL=OFF)
#include(ExternalProject)
#ExternalProject_Add(Bytecoin
# SOURCE_DIR ${CMAKE_SOURCE_DIR}/bytecoin
# PREFIX ${CMAKE_CURRENT_BINARY_DIR}/Bytecoin
# CMAKE_ARGS
# -DSTATIC:BOOL=OFF
# -DBoost_USE_STATIC_LIBS:BOOL=ON
# -DBoost_USE_STATIC_RUNTIME:BOOL=OFF
# INSTALL_COMMAND ""
# )
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME OFF)
# Get and add-definition for AboutDialog.cpp
# Set something in case git is not found
set(GIT_REVISION "unknown")
if (GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "Git Revision ${GIT_REVISION}")
else()
message(STATUS "Git not found")
endif()
configure_file("${PROJECT_SOURCE_DIR}/src/CryptoNoteWalletConfig.h.in" "${PROJECT_BINARY_DIR}/CryptoNoteWalletConfig.h")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(SOURCES
src/Application/AddressBookManager.cpp
src/Application/BlogReader.cpp
src/Application/CommandLineParser.cpp
src/Application/LogFileWatcher.cpp
src/Application/MiningManager.cpp
src/Application/OptimizationManager.cpp
src/Application/SignalHandler.cpp
src/Application/WalletApplication.cpp
src/Application/WalletSplashScreen.cpp
src/CryptoNoteWrapper/BlockChainExplorerAdapter.cpp
src/CryptoNoteWrapper/BlockChainExplorerWorker.cpp
src/CryptoNoteWrapper/CommonNodeAdapter.cpp
src/CryptoNoteWrapper/CryptoNoteAdapter.cpp
src/CryptoNoteWrapper/GuardExecutor.cpp
src/CryptoNoteWrapper/InProcessNodeAdapter.cpp
src/CryptoNoteWrapper/InProcessNodeWorker.cpp
src/CryptoNoteWrapper/ProxyRpcNodeAdapter.cpp
src/CryptoNoteWrapper/ProxyRpcNodeWorker.cpp
src/CryptoNoteWrapper/SemaphoreUtils.cpp
src/CryptoNoteWrapper/WalletGreenAdapter.cpp
src/CryptoNoteWrapper/WalletGreenWorker.cpp
src/Gui/AddressBook/AddressBookDelegate.cpp
src/Gui/AddressBook/AddressBookFrame.cpp
src/Gui/AddressBook/DonationColumnDelegate.cpp
src/Gui/AddressBook/NewAddressDialog.cpp
src/Gui/BlockchainExplorer/BlockDetailsDialog.cpp
src/Gui/BlockchainExplorer/BlockExplorerFrame.cpp
src/Gui/BlockchainExplorer/FilteredBlockModel.cpp
src/Gui/BlockchainExplorer/TransactionsBlockModel.cpp
src/Gui/BlockchainExplorer/WindowedBlockModel.cpp
src/Gui/Common/AboutDialog.cpp
src/Gui/Common/AddressBookDialog.cpp
src/Gui/Common/BlockchainInstaller.cpp
src/Gui/Common/ChangePasswordDialog.cpp
src/Gui/Common/ClearableLineEdit.cpp
src/Gui/Common/CopyColumnDelegate.cpp
src/Gui/Common/CopyMagicLabel.cpp
src/Gui/Common/ExitWidget.cpp
src/Gui/Common/GlassFrame.cpp
src/Gui/Common/KeyDialog.cpp
src/Gui/Common/LinkLikeColumnDelegate.cpp
src/Gui/Common/MagicLabel.cpp
src/Gui/Common/NewPasswordDialog.cpp
src/Gui/Common/NewsFrame.cpp
src/Gui/Common/NewTransactionDelegate.cpp
src/Gui/Common/P2pBindPortErrorDialog.cpp
src/Gui/Common/PoolTransactionDetailsDialog.cpp
src/Gui/Common/QuestionDialog.cpp
src/Gui/Common/ResizableScrollArea.cpp
src/Gui/Common/RightAlignmentColumnDelegate.cpp
src/Gui/Common/TransactionDetailsDialog.cpp
src/Gui/Common/TransactionsAmountDelegate.cpp
src/Gui/Common/TransactionsHeaderView.cpp
src/Gui/Common/TransactionsTimeDelegate.cpp
src/Gui/Common/TransfersHeaderView.cpp
src/Gui/Common/WalletBlueButton.cpp
src/Gui/Common/WalletCancelButton.cpp
src/Gui/Common/WalletDescriptionLabel.cpp
src/Gui/Common/WalletGrayCheckBox.cpp
src/Gui/Common/WalletLinkLikeButton.cpp
src/Gui/Common/WalletNavigationButton.cpp
src/Gui/Common/WalletOkButton.cpp
src/Gui/Common/WalletTableView.cpp
src/Gui/Common/WalletTextLabel.cpp
src/Gui/Common/WalletTreeView.cpp
src/Gui/Common/WalletWindowedItemModel.cpp
src/Gui/MainWindow/MainWindow.cpp
src/Gui/MainWindow/WalletStatusBar.cpp
src/Gui/Mining/MinerDelegate.cpp
src/Gui/Mining/MiningFrame.cpp
src/Gui/Mining/PoolHeaderView.cpp
src/Gui/Mining/PoolTreeView.cpp
src/Gui/NoWallet/NoWalletFrame.cpp
src/Gui/Options/ConnectionOptionsFrame.cpp
src/Gui/Options/DonationAddressesModel.cpp
src/Gui/Options/DonationOptionsFrame.cpp
src/Gui/Options/OptimizationOptionsFrame.cpp
src/Gui/Options/OptionsDialog.cpp
src/Gui/Options/PrivacyFrame.cpp
src/Gui/Overview/OverviewFrame.cpp
src/Gui/Overview/OverviewHeaderFrame.cpp
src/Gui/Overview/OverviewHeaderGlassFrame.cpp
src/Gui/Overview/OverviewTransactionPoolModel.cpp
src/Gui/Overview/OverviewTransactionPoolTreeView.cpp
src/Gui/Overview/RecentTransactionsModel.cpp
src/Gui/Send/SendFrame.cpp
src/Gui/Send/SendGlassFrame.cpp
src/Gui/Send/TransferFrame.cpp
src/Gui/Transactions/DrawableTransfersModel.cpp
src/Gui/Transactions/FilteredByAddressTransactionsModel.cpp
src/Gui/Transactions/FilteredByAgeTransactionsModel.cpp
src/Gui/Transactions/FilteredByHashTransactionsModel.cpp
src/Gui/Transactions/FilteredByPeriodTransactionsModel.cpp
src/Gui/Transactions/FilteredTransactionsModel.cpp
src/Gui/Transactions/TransactionsDelegate.cpp
src/Gui/Transactions/TransactionsFrame.cpp
src/Gui/Transactions/TransactionTransfersRenderer.cpp
src/main.cpp
src/Miner/Miner.cpp
src/Miner/StratumClient.cpp
src/Miner/Worker.cpp
src/Models/AddressBookModel.cpp
src/Models/BlockchainModel.cpp
src/Models/FusionTransactionsFilterModel.cpp
src/Models/MinerModel.cpp
src/Models/NodeStateModel.cpp
src/Models/SortedAddressBookModel.cpp
src/Models/SortedTransactionsModel.cpp
src/Models/TransactionPoolModel.cpp
src/Models/TransactionsModel.cpp
src/Models/TransfersModel.cpp
src/Models/WalletStateModel.cpp
src/QJsonRpc/JsonRpcNotification.cpp
src/QJsonRpc/JsonRpcObject.cpp
src/QJsonRpc/JsonRpcObjectFactory.cpp
src/QJsonRpc/JsonRpcRequest.cpp
src/QJsonRpc/JsonRpcResponse.cpp
src/QJsonRpc/JsonRpcServer.cpp
src/Settings/Settings.cpp
src/Style/DarkStyle.cpp
src/Style/LightStyle.cpp
src/Style/Style.cpp
src/WalletLogger/WalletLogger.cpp)
if(WIN32)
set(SOURCES ${SOURCES} src/Platform/Windows/ApplicationEventHandler.cpp)
if(MSVC)
add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600)
include_directories(
bytecoin/src/Platform/msc
bytecoin/src/Platform/Windows
src/Platform/Windows)
set(BUILD_PLATFORM WIN32)
set(Qt5_MAIN Qt5::WinMain)
endif()
endif()
# Include boost
#include_directories(${Boost_INCLUDE_DIRS})
# Link our externalproject *.lib's
link_directories(
${Boost_LIBRARY_DIRS}
${PROJECT_SOURCE_DIR}/libs)
# Build BytecoinWallet.exe
add_executable(${PROJECT_NAME} ${BUILD_PLATFORM} ${SOURCES})
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS _GNU_SOURCE)
target_compile_definitions(${PROJECT_NAME} PUBLIC -DGIT_REVISION="${GIT_REVISION}")
target_include_directories(${PROJECT_NAME} PUBLIC
include
src
bytecoin/include
bytecoin/src
bytecoin/external/rocksdb/include
${Boost_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME}
${Qt5_MAIN}
${Qt5DBus_LIBRARIES}
BlockchainExplorer
Common
Crypto
CryptoNoteCore
Http
InProcessNode
Logging
NodeRpcProxy
P2p
Rpc
Serialization
System
Transfers
Wallet
rocksdblib
miniupnpc
Qt5::Widgets
Qt5::Gui
Qt5::Network
Imm32 Iphlpapi Rpcrt4 Winmm Wtsapi32) #WIN32 lib's