blob: c647bc850134d76b4cb02988ed0ac6e07d653790 [file] [log] [blame]
Patrick Williamsbb939ea2021-12-03 15:41:02 -06001project(
2 'phosphor-certificate-manager',
3 'cpp',
4 default_options: [
5 'buildtype=debugoptimized',
6 'cpp_std=c++20',
7 'warning_level=3',
8 'werror=true',
9 ],
10 meson_version: '>=0.57.0',
11)
12
13cpp = meson.get_compiler('cpp')
14
15sdbusplus_dep = dependency(
16 'sdbusplus',
17 fallback: ['sdbusplus', 'sdbusplus_dep'],
18)
19
20sdeventplus_dep = dependency(
21 'sdeventplus',
22 fallback: ['sdeventplus', 'sdeventplus_dep'],
23)
24
25phosphor_dbus_interfaces_dep = dependency(
26 'phosphor-dbus-interfaces',
27 fallback: [
28 'phosphor-dbus-interfaces',
29 'phosphor_dbus_interfaces_dep'
30 ],
31)
32
33phosphor_logging_dep = dependency(
34 'phosphor-logging',
35 fallback: ['phosphor-logging', 'phosphor_logging_dep'],
36)
37
38systemd_dep = dependency('systemd')
39openssl_dep = dependency('openssl')
40
41config_data = configuration_data()
42config_data.set(
43 'authority_limit',
44 get_option('authority-limit')
45)
Nan Zhou6ec13c82021-12-30 11:34:50 -080046config_data.set(
47 'authorities_list_name',
48 get_option('authorities-list-name')
49)
Patrick Williamsbb939ea2021-12-03 15:41:02 -060050
51configure_file(
Patrick Williamse0e2cce2021-12-13 08:40:50 -060052 input: 'config.h.in',
Patrick Williamsbb939ea2021-12-03 15:41:02 -060053 output: 'config.h',
54 configuration: config_data
55)
56
57phosphor_certificate_deps = [
58 openssl_dep,
59 phosphor_dbus_interfaces_dep,
60 phosphor_logging_dep,
61 sdbusplus_dep,
62 sdeventplus_dep,
63]
64
65cert_manager_lib = static_library(
66 'phosphor-certificate-manager',
67 [
68 'argument.cpp',
69 'certificate.cpp',
70 'certs_manager.cpp',
71 'csr.cpp',
72 'watch.cpp',
Nan Zhoue869bb62021-12-30 11:34:42 -080073 'x509_utils.cpp',
Patrick Williamsbb939ea2021-12-03 15:41:02 -060074 ],
75 dependencies: phosphor_certificate_deps,
76)
77
78cert_manager_dep = declare_dependency(
79 link_with: cert_manager_lib,
80 dependencies: phosphor_certificate_deps
81)
82
83executable(
84 'phosphor-certificate-manager',
85 'mainapp.cpp',
86 dependencies: cert_manager_dep,
87 install: true,
88)
89
90if not get_option('ca-cert-extension').disabled()
91 subdir('bmc-vmi-ca')
92endif
93
94subdir('dist')
95
96if not get_option('tests').disabled()
97 subdir('test')
98endif
99