forked from ethereum/aleth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
104 lines (86 loc) · 3.24 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
#------------------------------------------------------------------------------
# Top-level CMake file for cpp-ethereum.
#
# The documentation for cpp-ethereum is hosted at http://cpp-ethereum.org
#
# ------------------------------------------------------------------------------
# This file is part of cpp-ethereum.
#
# cpp-ethereum is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cpp-ethereum is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2014-2016 cpp-ethereum contributors.
#------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.5.1)
if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)
# The default toolchain file configures compilers and build environment.
# This configuration is also used by hunter to build dependencies.
# CMake will cache this value, not need to explictly specify CACHE param.
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchain.cmake)
endif()
set(ETH_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/cmake" CACHE PATH "The path to the cmake directory")
list(APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR})
set(CPP_ETHEREUM_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Path to the root directory for cpp-ethereum")
# set cmake_policies
include(EthPolicy)
eth_policy()
set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo)
# Map current configuration to congigurations of imported targets.
set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG RelWithDebInfo Release)
set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo Release)
# project name and version should be set after cmake_policy CMP0048
project(cpp-ethereum VERSION "1.3.0")
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/evmjit/.git)
message(FATAL_ERROR "Git submodules not initialized, execute:\n git submodule update --init")
endif()
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY On)
include(EthOptions)
include(EthCompilerSettings)
include(EthExecutableHelper)
include(EthDependencies)
include(EthUtils)
include(ProjectBoost)
include(ProjectCryptopp)
include(ProjectJsonCpp)
include(ProjectJsonRpcCpp)
include(ProjectSecp256k1)
include(ProjectSnark)
configure_project()
add_subdirectory(eth)
add_subdirectory(libdevcore)
add_subdirectory(libdevcrypto)
add_subdirectory(libethash)
add_subdirectory(libethashseal)
add_subdirectory(libethcore)
add_subdirectory(libethereum)
add_subdirectory(libevm)
add_subdirectory(libevmcore)
add_subdirectory(libp2p)
add_subdirectory(libweb3jsonrpc)
add_subdirectory(libwebthree)
add_subdirectory(libwhisper)
if (EVMJIT)
add_subdirectory(evmjit)
endif()
if (TOOLS)
add_subdirectory(ethkey)
add_subdirectory(ethvm)
add_subdirectory(rlp)
add_subdirectory(bench)
endif()
if (TESTS)
enable_testing()
add_subdirectory(test)
endif()
# TODO: Split out json_spirit, libscrypt and sec256k1.
add_subdirectory(utils)