blob: 68c56c6a25516730128e357d1eaaf081bdcb1403 [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)
46
47configure_file(
Patrick Williamse0e2cce2021-12-13 08:40:50 -060048 input: 'config.h.in',
Patrick Williamsbb939ea2021-12-03 15:41:02 -060049 output: 'config.h',
50 configuration: config_data
51)
52
53phosphor_certificate_deps = [
54 openssl_dep,
55 phosphor_dbus_interfaces_dep,
56 phosphor_logging_dep,
57 sdbusplus_dep,
58 sdeventplus_dep,
59]
60
61cert_manager_lib = static_library(
62 'phosphor-certificate-manager',
63 [
64 'argument.cpp',
65 'certificate.cpp',
66 'certs_manager.cpp',
67 'csr.cpp',
68 'watch.cpp',
Nan Zhoue869bb62021-12-30 11:34:42 -080069 'x509_utils.cpp',
Patrick Williamsbb939ea2021-12-03 15:41:02 -060070 ],
71 dependencies: phosphor_certificate_deps,
72)
73
74cert_manager_dep = declare_dependency(
75 link_with: cert_manager_lib,
76 dependencies: phosphor_certificate_deps
77)
78
79executable(
80 'phosphor-certificate-manager',
81 'mainapp.cpp',
82 dependencies: cert_manager_dep,
83 install: true,
84)
85
86if not get_option('ca-cert-extension').disabled()
87 subdir('bmc-vmi-ca')
88endif
89
90subdir('dist')
91
92if not get_option('tests').disabled()
93 subdir('test')
94endif
95