-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
86 lines (71 loc) · 1.79 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
# Copyright (c) 2019-2024 The Open-Transactions developers
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
cmake_minimum_required(VERSION 3.26.0)
cmake_policy(
SET
CMP0091
NEW
)
cmake_policy(
SET
CMP0126
NEW
)
project(metier-server)
# -----------------------------------------------------------------------------
# Setup
find_package(
otcommon
3
CONFIG
REQUIRED
)
otcommon_set_build_type()
otcommon_require_out_of_source_build()
# -----------------------------------------------------------------------------
# Set option defaults
if(CMAKE_BUILD_TYPE
STREQUAL
"Debug"
)
set(METIER_SERVER_PEDANTIC_DEFAULT ON)
set(CMAKE_VERBOSE_MAKEFILE ON)
else()
set(METIER_SERVER_PEDANTIC_DEFAULT OFF)
endif()
# -----------------------------------------------------------------------------
# Options
option(
METIER_SERVER_PEDANTIC_BUILD
"Treat compiler warnings as errors."
${METIER_SERVER_PEDANTIC_DEFAULT}
)
# -----------------------------------------------------------------------------
# Set compiler options
otcommon_set_project_language_standard(
99
20
${METIER_SERVER_PEDANTIC_BUILD}
)
# -----------------------------------------------------------------------------
# Print system information and build options
otcommon_print_build_details(METIER_SERVER_PEDANTIC_BUILD "")
# -----------------------------------------------------------------------------
# Dependencies
otcommon_find_system_libraries()
find_package(
opentxs
1.210.0
CONFIG
REQUIRED
)
find_package(
Boost
REQUIRED
program_options
)
# -----------------------------------------------------------------------------
# Build source
add_subdirectory(src)