-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeLists.txt
85 lines (65 loc) · 2.13 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
# Copyright (c) 2019 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.14)
project(otagent)
list(APPEND CMAKE_MODULE_PATH "${${PROJECT_NAME}_SOURCE_DIR}/cmake")
include(open-transactions-common)
# -----------------------------------------------------------------------------
# Setup
set_version_from_git()
set_build_type()
set_out_of_source_build()
update_git_submodules()
# -----------------------------------------------------------------------------
# Set option defaults
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(OTCTL_PEDANTIC_DEFAULT ON)
set(CMAKE_VERBOSE_MAKEFILE ON)
else()
set(OTCTL_PEDANTIC_DEFAULT OFF)
endif()
# -----------------------------------------------------------------------------
# Options
option(OTCTL_PEDANTIC_BUILD "Treat compiler warnings as errors."
${OTCTL_PEDANTIC_DEFAULT})
# -----------------------------------------------------------------------------
# Set compiler options
set_compiler_flags(17 ${OTCTL_PEDANTIC_BUILD})
# -----------------------------------------------------------------------------
# Print system information and build options
print_build_details(OTCTL_PEDANTIC_BUILD "")
# -----------------------------------------------------------------------------
# Dependencies
find_system_libraries()
find_package(Protobuf REQUIRED)
find_package(opentxs-proto REQUIRED)
find_package(opentxs REQUIRED)
find_package(
Boost
REQUIRED
program_options
filesystem
system
)
set(CURSES_NEED_NCURSES TRUE)
find_package(Curses REQUIRED)
find_package(jsoncpp REQUIRED)
find_package(
Qt5
COMPONENTS
Core
Gui
Qml
Widgets
)
# -----------------------------------------------------------------------------
# Source Definitions
set_common_defines()
# -----------------------------------------------------------------------------
# Build source
add_subdirectory(src)
# -----------------------------------------------------------------------------
# Package
generate_uninstall_target()