build: add meson support

Port the existing autotools build system to meson, add meson wrap files
for all openbmc dependencies, and add appropriate meson rules to
gitignore.

Tested:

Verified executables all build, test cases pass, and executables
install.  Checked configuration files are all installed into the same
locations as a Yocto-built autotools version of the package.  Manually
checked the symlinks for the systemd service files.

```
$ DESTDIR=/tmp/certificate_test ninja install
$ find /tmp/certificate_test/lib /tmp/certificate_test/usr/local/share/phosphor-certificate-manager/
/tmp/certificate_test/lib
/tmp/certificate_test/lib/systemd
/tmp/certificate_test/lib/systemd/system
/tmp/certificate_test/lib/systemd/system/multi-user.target.wants
/tmp/certificate_test/lib/systemd/system/multi-user.target.wants/phosphor-certificate-manager@authority.service
/tmp/certificate_test/lib/systemd/system/multi-user.target.wants/phosphor-certificate-manager@bmcweb.service
/tmp/certificate_test/lib/systemd/system/bmc-vmi-ca-manager.service
/tmp/certificate_test/lib/systemd/system/phosphor-certificate-manager@.service
/tmp/certificate_test/usr/local/share/phosphor-certificate-manager/
/tmp/certificate_test/usr/local/share/phosphor-certificate-manager/authority
/tmp/certificate_test/usr/local/share/phosphor-certificate-manager/bmcweb
$ ls -n /tmp/certificate_test/lib/systemd/system/multi-user.target.wants
total 0
lrwxrwxrwx 1 1000 1000 40 Dec  3 15:37 phosphor-certificate-manager@authority.service -> ../phosphor-certificate-manager@.service
lrwxrwxrwx 1 1000 1000 40 Dec  3 15:37 phosphor-certificate-manager@bmcweb.service -> ../phosphor-certificate-manager@.service
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib9700b5a3bb437ccc157a2d060067b8e2b777981
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..6e8d350
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,94 @@
+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',
+    fallback: ['sdbusplus', 'sdbusplus_dep'],
+)
+
+sdeventplus_dep = dependency(
+    'sdeventplus',
+    fallback: ['sdeventplus', 'sdeventplus_dep'],
+)
+
+phosphor_dbus_interfaces_dep = dependency(
+    'phosphor-dbus-interfaces',
+    fallback: [
+        'phosphor-dbus-interfaces',
+        'phosphor_dbus_interfaces_dep'
+    ],
+)
+
+phosphor_logging_dep = dependency(
+    'phosphor-logging',
+    fallback: ['phosphor-logging', 'phosphor_logging_dep'],
+)
+
+systemd_dep = dependency('systemd')
+openssl_dep = dependency('openssl')
+
+config_data = configuration_data()
+config_data.set(
+    'authority_limit',
+     get_option('authority-limit')
+)
+
+configure_file(
+    input: 'config.h.meson',
+    output: 'config.h',
+    configuration: config_data
+)
+
+phosphor_certificate_deps = [
+    openssl_dep,
+    phosphor_dbus_interfaces_dep,
+    phosphor_logging_dep,
+    sdbusplus_dep,
+    sdeventplus_dep,
+]
+
+cert_manager_lib = static_library(
+    'phosphor-certificate-manager',
+    [
+        'argument.cpp',
+        'certificate.cpp',
+        'certs_manager.cpp',
+        'csr.cpp',
+        'watch.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
+
+subdir('dist')
+
+if not get_option('tests').disabled()
+    subdir('test')
+endif
+