-
Notifications
You must be signed in to change notification settings - Fork 3
/
meson.build
77 lines (68 loc) · 1.9 KB
/
meson.build
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
project(
'janus-ftl-orchestrator',
'cpp',
default_options: [
'cpp_std=c++2a',
'cpp_args=-Wno-unknown-pragmas',
'werror=true',
]
)
# Set the DEBUG define if we're a debug build
if get_option('buildtype').startswith('debug')
add_project_arguments('-DDEBUG', language : 'cpp')
endif
sources = files([
'src/Configuration.cpp',
'src/main.cpp',
'src/Orchestrator.cpp',
'src/TlsConnectionManager.cpp',
])
# Pull in subprojects
fmt_wrap = subproject('fmt', default_options: 'default_library=static')
meson.override_dependency('fmt', fmt_wrap.get_variable('fmt_dep')) # Use our copy of fmt for spdlog
spdlog_wrap = subproject('spdlog', default_options: ['default_library=static', 'compile_library=true', 'external_fmt=true'] )
catch2_wrap = subproject('catch2')
deps = [
dependency('libssl'),
dependency('libcrypto'),
# Meson wrapped dependencies
fmt_wrap.get_variable('fmt_dep'),
spdlog_wrap.get_variable('spdlog_dep'),
]
incdir = include_directories(['src', 'inc'])
executable(
'janus-ftl-orchestrator',
sources,
cpp_pch: 'pch/pch.h',
include_directories: incdir,
dependencies: deps,
install: true,
install_dir: '/usr/local/bin',
)
testsources = files([
# Test sources
'test/test.cpp',
# Unit tests
'test/unit/FtlConnectionUnitTests.cpp',
'test/unit/OrchestratorUnitTests.cpp',
# Functional tests
'test/functional/FunctionalTests.cpp',
# Project sources
'src/Orchestrator.cpp',
'src/TlsConnectionManager.cpp',
])
testdeps = [
dependency('libssl'),
dependency('libcrypto'),
# Meson wrapped dependencies
fmt_wrap.get_variable('fmt_dep'),
spdlog_wrap.get_variable('spdlog_dep'),
catch2_wrap.get_variable('catch2_dep'),
]
executable(
'janus-ftl-orchestrator-test',
testsources,
cpp_pch: 'pch/test_pch.h',
include_directories: incdir,
dependencies: testdeps,
)