-
Notifications
You must be signed in to change notification settings - Fork 12
/
meson.build
104 lines (88 loc) · 2.22 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
project(
'phosphor-certificate-manager',
'cpp',
default_options: [
'buildtype=debugoptimized',
'cpp_std=c++20',
'warning_level=3',
'werror=true',
],
meson_version: '>=0.57.0',
)
cpp = meson.get_compiler('cpp')
sdbusplus_dep = dependency('sdbusplus')
sdeventplus_dep = dependency('sdeventplus')
phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
phosphor_logging_dep = dependency('phosphor-logging')
cli11_dep = dependency('cli11', required: false)
has_cli11 = meson.get_compiler('cpp').has_header_symbol(
'CLI/CLI.hpp',
'CLI::App',
dependencies: cli11_dep,
required: false)
if not has_cli11
cli11_proj = subproject('cli11', required: false)
assert(cli11_proj.found(), 'CLI11 is required')
cli11_dep = cli11_proj.get_variable('CLI11_dep')
endif
systemd_dep = dependency('systemd')
openssl_dep = dependency('openssl')
config_data = configuration_data()
config_data.set(
'authority_limit',
get_option('authority-limit')
)
config_data.set(
'authorities_list_name',
get_option('authorities-list-name')
)
if not get_option('allow-expired').disabled()
config_data.set('allow_expired', 'true')
else
config_data.set('allow_expired', 'false')
endif
configure_file(
input: 'config.h.in',
output: 'config.h',
configuration: config_data
)
phosphor_certificate_deps = [
openssl_dep,
phosphor_dbus_interfaces_dep,
phosphor_logging_dep,
sdbusplus_dep,
sdeventplus_dep,
cli11_dep,
]
cert_manager_lib = static_library(
'phosphor-certificate-manager',
[
'argument.cpp',
'certificate.cpp',
'certs_manager.cpp',
'csr.cpp',
'watch.cpp',
'x509_utils.cpp',
],
dependencies: phosphor_certificate_deps,
)
cert_manager_dep = declare_dependency(
link_with: cert_manager_lib,
dependencies: phosphor_certificate_deps
)
executable(
'phosphor-certificate-manager',
'mainapp.cpp',
dependencies: cert_manager_dep,
install: true,
)
if not get_option('ca-cert-extension').disabled()
subdir('bmc-vmi-ca')
endif
if not get_option('acf-cert-extension').disabled()
subdir('bmc-acf')
endif
subdir('dist')
if not get_option('tests').disabled()
subdir('test')
endif