forked from ethereum/libethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (53 loc) · 1.55 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
cmake_minimum_required(VERSION 3.0.0)
set(ETH_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/../webthree-helpers/cmake" CACHE PATH "The path to the cmake directory")
list(APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR})
# set cmake_policies
include(EthPolicy)
eth_policy()
# project name and version should be set after cmake_policy CMP0048
project(ethereum VERSION "1.2.9")
include(EthCompilerSettings)
include(EthExecutableHelper)
include(EthDependencies)
include(EthUtils)
include(EthOptions)
set(LIBETHEREUM_OPTIONS CPUID CURL VMTRACE ROCKSDB OLYMPIC PARANOID TESTS ETHASHCL FATDB)
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64")
# EVMJIT option is only available for x86_64 targets.
list(APPEND LIBETHEREUM_OPTIONS EVMJIT)
else()
set(EVMJIT OFF)
endif()
configure_project(${LIBETHEREUM_OPTIONS})
if (EVMJIT)
if (DEFINED MSVC AND NOT DEFINED LLVM_DIR)
set(LLVM_DIR "${ETH_CMAKE_DIR}/extdep/install/windows/x64/share/llvm/cmake")
endif()
add_subdirectory(evmjit)
if (DEFINED MSVC)
set(EVMJIT_DLLS_LOCAL $<TARGET_FILE:evmjit>)
set(EVMJIT_DLLS optimized ${EVMJIT_DLLS_LOCAL} debug ${EVMJIT_DLLS_LOCAL} PARENT_SCOPE)
endif()
endif()
# core libraries
if (NOT EMSCRIPTEN)
add_subdirectory(libethcore)
add_subdirectory(libevm)
add_subdirectory(libethereum)
add_subdirectory(libethash)
add_subdirectory(libethashseal)
endif()
add_subdirectory(libevmcore)
if (ETHASHCL)
add_subdirectory(libethash-cl)
endif()
# executables
if (TOOLS)
add_subdirectory(ethkey)
add_subdirectory(ethminer)
add_subdirectory(ethvm)
endif()
if (TESTS)
# test
add_subdirectory(test)
endif()