1project( 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( 48 input: 'config.h.meson', 49 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', 69 ], 70 dependencies: phosphor_certificate_deps, 71) 72 73cert_manager_dep = declare_dependency( 74 link_with: cert_manager_lib, 75 dependencies: phosphor_certificate_deps 76) 77 78executable( 79 'phosphor-certificate-manager', 80 'mainapp.cpp', 81 dependencies: cert_manager_dep, 82 install: true, 83) 84 85if not get_option('ca-cert-extension').disabled() 86 subdir('bmc-vmi-ca') 87endif 88 89subdir('dist') 90 91if not get_option('tests').disabled() 92 subdir('test') 93endif 94 95