blob: 07202474d49dd26a7c4b69d5287635c083d1bef4 [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
Patrick Williams447d55d2022-03-21 10:18:25 -050015sdbusplus_dep = dependency('sdbusplus')
16sdeventplus_dep = dependency('sdeventplus')
17phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
18phosphor_logging_dep = dependency('phosphor-logging')
Patrick Williamsbb939ea2021-12-03 15:41:02 -060019
20systemd_dep = dependency('systemd')
21openssl_dep = dependency('openssl')
22
23config_data = configuration_data()
24config_data.set(
25 'authority_limit',
26 get_option('authority-limit')
27)
Nan Zhou6ec13c82021-12-30 11:34:50 -080028config_data.set(
29 'authorities_list_name',
30 get_option('authorities-list-name')
31)
Patrick Williamsbb939ea2021-12-03 15:41:02 -060032
33configure_file(
Patrick Williamse0e2cce2021-12-13 08:40:50 -060034 input: 'config.h.in',
Patrick Williamsbb939ea2021-12-03 15:41:02 -060035 output: 'config.h',
36 configuration: config_data
37)
38
39phosphor_certificate_deps = [
40 openssl_dep,
41 phosphor_dbus_interfaces_dep,
42 phosphor_logging_dep,
43 sdbusplus_dep,
44 sdeventplus_dep,
45]
46
47cert_manager_lib = static_library(
48 'phosphor-certificate-manager',
49 [
50 'argument.cpp',
51 'certificate.cpp',
52 'certs_manager.cpp',
53 'csr.cpp',
54 'watch.cpp',
Nan Zhoue869bb62021-12-30 11:34:42 -080055 'x509_utils.cpp',
Patrick Williamsbb939ea2021-12-03 15:41:02 -060056 ],
57 dependencies: phosphor_certificate_deps,
58)
59
60cert_manager_dep = declare_dependency(
61 link_with: cert_manager_lib,
62 dependencies: phosphor_certificate_deps
63)
64
65executable(
66 'phosphor-certificate-manager',
67 'mainapp.cpp',
68 dependencies: cert_manager_dep,
69 install: true,
70)
71
72if not get_option('ca-cert-extension').disabled()
73 subdir('bmc-vmi-ca')
74endif
75
76subdir('dist')
77
78if not get_option('tests').disabled()
79 subdir('test')
80endif
81