meson: add necessary subprojects

Add subprojects for all the direct dependencies of the project such
that the project can be built outside of a Yocto SDK on a typical
Linux development system.

  - Update the .gitignore to ignore the subproject source directories.
  - Update the .gitignore to ignore alternative build subdirectory
    names as is typical with most projects in the openbmc organization.
  - Add wrap files for direct dependencies, copied from other
    repositories that already have the same dependencies.
  - Modify the meson.build dependency for libgpiod so that the C++
    bindings are included.
  - Add many missing dependencies throughout.
  - Sort all dependencies alphabetically for consistency.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0feb6f0f175e6dba0b00a2c2b666eb0801575734
diff --git a/meson.build b/meson.build
index a590265..a531922 100644
--- a/meson.build
+++ b/meson.build
@@ -13,6 +13,8 @@
     meson_version: '>=0.58.0',
 )
 
+cxx = meson.get_compiler('cpp')
+
 build_tests = get_option('tests')
 
 if get_option('oe-sdk').enabled()
@@ -42,7 +44,26 @@
 stdplus = dependency('stdplus')
 boost = dependency('boost')
 fmt = dependency('fmt')
-libgpiodcxx = dependency('libgpiodcxx')
+libgpiodcxx = dependency('libgpiodcxx',
+    default_options: ['bindings=cxx'])
+
+if cxx.has_header('nlohmann/json.hpp')
+    nlohmann_json_dep = declare_dependency()
+else
+    subproject('nlohmann', required: false)
+    nlohmann_json_dep = declare_dependency(
+        include_directories: [
+            'subprojects/nlohmann-json/single_include',
+            'subprojects/nlohmann-json/single_include/nlohmann',
+        ]
+    )
+endif
+
+if cxx.has_header('CLI/CLI.hpp')
+    cli11_dep = declare_dependency()
+else
+    cli11_dep = dependency('CLI11')
+endif
 
 systemd = dependency('systemd')
 servicedir = systemd.get_variable('systemdsystemunitdir')
@@ -112,6 +133,7 @@
     'pmbus.cpp',
     'utility.cpp',
     dependencies: [
+        nlohmann_json_dep,
         phosphor_dbus_interfaces,
         phosphor_logging,
         sdbusplus,