-
Notifications
You must be signed in to change notification settings - Fork 34
/
CMakeLists.txt
94 lines (86 loc) · 2.41 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
#
# Copyright Quadrivium LLC
# All Rights Reserved
# SPDX-License-Identifier: Apache-2.0
#
add_library(application_util
impl/util.cpp
)
target_link_libraries(application_util
filesystem
outcome
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMAND echo "#include <string>" > ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMAND echo "namespace kagome {" >> ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMAND echo " const std::string &buildVersion() {" >> ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMAND echo " static const std::string buildVersion(\"" | tr -d "\\n" >> ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMAND ${PROJECT_SOURCE_DIR}/get_version.sh | tr -d "\\n" >> ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMAND echo "\");" >> ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMAND echo " return buildVersion;" >> ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMAND echo " }" >> ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMAND echo "}" >> ${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
COMMENT "Generate build_version.cpp"
VERBATIM
)
add_library(build_version
${CMAKE_CURRENT_BINARY_DIR}/build_version.cpp
)
kagome_install(build_version)
add_library(app_config
impl/app_configuration_impl.cpp
)
target_link_libraries(app_config
Boost::program_options
p2p::p2p_multiaddress
api
blob
assets
chain_spec
build_version
wasm_compiler
)
kagome_install(app_config)
add_library(chain_spec
impl/chain_spec_impl.cpp
)
target_link_libraries(chain_spec
assets
filesystem
p2p::p2p_multiaddress
p2p::p2p_peer_id
sr25519_types
)
kagome_install(chain_spec)
add_library(app_state_manager
impl/app_state_manager_impl.cpp
)
target_link_libraries(app_state_manager
logger
)
kagome_install(app_state_manager)
add_library(application_modes
modes/precompile_wasm.cpp
modes/print_chain_info_mode.cpp
)
target_link_libraries(application_modes
hexutil
RapidJSON::rapidjson
benchmark::benchmark
)
add_library(recovery_mode
modes/recovery_mode.cpp
)
target_link_libraries(recovery_mode
logger
)
add_library(kagome_application
impl/kagome_application_impl.cpp
)
target_link_libraries(kagome_application
application_injector
application_util
log_configurator
telemetry
)