meson: build: Generate the error.cpp/hpp files

Tested: The meson-generated error.hpp file in the build subdir was
        identical to the autotools one:
$ diff ./xyz/openbmc_project/Software/Image/error.hpp ./build/xyz/openbmc_project/Software/Image/error.hpp
$

Change-Id: I26ef286e8f13c8d72f6a4c83f272bbab35454af0
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/xyz/openbmc_project/Software/Image/meson.build b/xyz/openbmc_project/Software/Image/meson.build
new file mode 100644
index 0000000..293efa0
--- /dev/null
+++ b/xyz/openbmc_project/Software/Image/meson.build
@@ -0,0 +1,29 @@
+image_error_hpp = custom_target(
+    'error.hpp',
+    capture: true,
+    command: [
+        sdbuspp,
+        '-r', meson.source_root(),
+        'error',
+        'exception-header',
+        'xyz.openbmc_project.Software.Image',
+    ],
+    input: '../Image.errors.yaml',
+    install: true,
+    install_dir: get_option('includedir') / 'xyz/openbmc_project/Software/Image',
+    output: 'error.hpp',
+)
+
+image_error_cpp = custom_target(
+    'error.cpp',
+    capture: true,
+    command: [
+        sdbuspp,
+        '-r', meson.source_root(),
+        'error',
+        'exception-cpp',
+        'xyz.openbmc_project.Software.Image',
+    ],
+    input: '../Image.errors.yaml',
+    output: 'error.cpp',
+)