meson: add support for boost library vendoring

Abuse the meson subproject command to download boost and build against
that when boost is not found in the usual places.  This enables building
and running the unit tests without needing to install boost.

This is abuse because the subproject command will always fail - meson
only supports other meson projects as subprojects but it will download
it, and since we don't actually build boost but just use headers this
isn't a problem.

Change-Id: I54aae9e92aa0e2f7bf7540b21ae9838609c950df
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meson.build b/meson.build
index 076d00f..2c9b70b 100644
--- a/meson.build
+++ b/meson.build
@@ -18,7 +18,13 @@
     '-DBOOST_ALL_NO_LIB',
 ]
 build_tests = get_option('tests')
-boost = dependency('boost')
+boost = dependency('boost', required: false)
+if not boost.found()
+     subproject('boost', required: false)
+     boost = declare_dependency(
+         include_directories: 'subprojects/boost_1_71_0',
+     )
+endif
 i2c = meson.get_compiler('cpp').find_library('i2c')
 sdbusplus = dependency('sdbusplus')
 systemd = dependency('systemd')
diff --git a/subprojects/boost.wrap b/subprojects/boost.wrap
new file mode 100644
index 0000000..5448337
--- /dev/null
+++ b/subprojects/boost.wrap
@@ -0,0 +1,4 @@
+[wrap-file]
+source_url = http://dl.bintray.com/boostorg/release/1.71.0/source/boost_1_71_0.tar.gz
+source_hash = 96b34f7468f26a141f6020efb813f1a2f3dfb9797ecf76a7d7cbd843cc95f5bd
+source_filename = boost_1_71_0.tar.gz