forked from conanwu777/hashgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·59 lines (50 loc) · 1.29 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
cmake_minimum_required(VERSION 3.13)
# set the project name
project(hashgraph CXX)
# append module path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# cmake modules
include(Yaml)
include(Thrift)
include(Crypto)
include(SQLite)
# compiler settings
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "-g -Wall -DCOIN_ROUNDS=5") # -DDEBUG -DMAKE_FORKS
# set hashgraph executable
add_executable(hashgraph
src/main.cpp
src/message/Hashgraph.cpp
src/message/hashgraph_types.cpp
src/protocol/Event.cpp
src/protocol/Person.cpp
src/protocol/SuperPerson.cpp
src/protocol/PersonNetworker.cpp
src/protocol/PersonApplication.cpp
src/types/Endpoint.cpp
src/utils/sha.cpp
src/utils/sqlite.cpp
src/utils/ecdsa.cpp
src/utils/encoding.cpp
src/utils/payload.cpp
)
# hashgraph dependencies
add_dependencies(hashgraph
yaml_project
thrift_project
sqlite_project
openssl_samples
)
# external includes
target_include_directories(hashgraph
PUBLIC ${PROJECT_SOURCE_DIR}/external/include
)
# external libraries
target_link_directories(hashgraph
PUBLIC ${PROJECT_SOURCE_DIR}/external/lib
)
# link libraries
target_link_libraries(hashgraph
PUBLIC sqlite3 dl yaml-cpp thriftd pthread ssl crypto
)