-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
52 lines (41 loc) · 1.08 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
cmake_minimum_required(VERSION 3.13)
project(
wot
VERSION 0.1
DESCRIPTION "A decentralized Web of Trust"
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 17)
enable_testing()
# This part only if this is the main project and not included
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
find_package(Doxygen)
if(Doxygen_FOUND)
add_subdirectory(doc)
else()
message(STATUS "Doxygen not found: no Doxygen docs")
endif()
endif()
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREAD ON)
find_package(Boost 1.54.0 REQUIRED COMPONENTS log log_setup program_options unit_test_framework)
find_package(OpenSSL REQUIRED)
include(FetchContent)
FetchContent_Declare(
json
URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
)
FetchContent_MakeAvailable(json)
FetchContent_Declare(
tomlplusplus
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
GIT_TAG v3.3.0
)
FetchContent_MakeAvailable(tomlplusplus)
set(CMAKE_BUILD_TYPE Debug)
add_subdirectory(src)
if( WITH_TEST )
add_subdirectory(test)
else()
add_subdirectory(test EXCLUDE_FROM_ALL)
endif()