-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
115 lines (94 loc) · 2.75 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
cmake_minimum_required(VERSION 3.14)
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0" CACHE STRING "Minimum OS X deployment version")
if(NOT DEFINED URL_BASE)
set(URL_BASE "github.com")
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(VERSION "3.2.0")
set(VERSION_SUFFIX "")
include(Options)
configure_project()
# vcpkg init
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
find_package(Git REQUIRED)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive -- vcpkg WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "Vcpkg toolchain file")
endif()
project(FISCO-BCOS VERSION ${VERSION})
include(CompilerSettings)
include(BuildInfoGenerator)
include(IncludeDirectories)
include(TargetSettings)
add_subdirectory(bcos-boostssl)
add_subdirectory(bcos-framework)
add_subdirectory(bcos-crypto)
add_subdirectory(bcos-utilities)
if(WITH_LIGHTNODE)
add_subdirectory(lightnode)
endif()
if(FULLNODE)
if(WITH_WASM)
include(ProjectWABT)
include(ProjectBCOSWASM)
endif()
include(ProjectGroupSig)
include(ProjectSDF)
add_subdirectory(bcos-codec)
add_subdirectory(bcos-sealer)
add_subdirectory(bcos-security)
add_subdirectory(bcos-table)
add_subdirectory(bcos-tool)
add_subdirectory(bcos-scheduler)
add_subdirectory(bcos-executor)
add_subdirectory(bcos-storage)
add_subdirectory(bcos-ledger)
add_subdirectory(bcos-protocol)
add_subdirectory(bcos-tars-protocol)
add_subdirectory(bcos-rpc)
add_subdirectory(bcos-gateway)
add_subdirectory(bcos-pbft)
add_subdirectory(bcos-txpool)
add_subdirectory(bcos-sync)
add_subdirectory(bcos-front)
add_subdirectory(bcos-leader-election)
add_subdirectory(libinitializer)
add_subdirectory(fisco-bcos-air)
add_subdirectory(concepts)
add_subdirectory(libtask)
if(WITH_TARS_SERVICES)
add_subdirectory(fisco-bcos-tars-service)
endif()
if(TESTS)
enable_testing()
add_subdirectory(tests)
add_subdirectory(benchmark)
endif()
endif()
if(WITH_CPPSDK)
add_subdirectory(bcos-sdk)
endif()
if(TOOLS)
add_subdirectory(tools)
endif()
# for code coverage
if(COVERAGE)
include(Coverage)
config_coverage("coverage" "'/usr*' 'boost/*'")
endif()
print_config("FISCO BCOS")
include(CMakePackageConfigHelpers)
configure_package_config_file(
"${CMAKE_SOURCE_DIR}/cmake/fiscobcos-config.cmake.in"
"${CMAKE_BINARY_DIR}/fiscobcos-config.cmake"
INSTALL_DESTINATION "share/fiscobcos"
)
install(
FILES "${CMAKE_BINARY_DIR}/fiscobcos-config.cmake"
DESTINATION "share/fiscobcos"
)
install(
EXPORT fiscobcosTargets
DESTINATION share/fiscobcos
NAMESPACE fiscobcos::
)