build: add wrapfile for libgpiod

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6e9b3f12bcf05e60278457e561c29eeff4472585
diff --git a/meson.build b/meson.build
index 211d855..127fa2c 100644
--- a/meson.build
+++ b/meson.build
@@ -23,7 +23,11 @@
 )
 
 build_tests = get_option('tests')
-gpiodcxx = dependency('libgpiodcxx')
+gpiodcxx = dependency(
+    'libgpiodcxx',
+    fallback: ['libgpiod', 'gpiodcxx_dep'],
+    default_options: ['bindings=cxx'],
+)
 
 # i2c-tools doesn't ship a pkg-config file for libi2c
 i2c = meson.get_compiler('cpp').find_library('i2c')
diff --git a/subprojects/libgpiod.wrap b/subprojects/libgpiod.wrap
new file mode 100644
index 0000000..f650e74
--- /dev/null
+++ b/subprojects/libgpiod.wrap
@@ -0,0 +1,13 @@
+[wrap-file]
+directory = libgpiod-1.6.3
+source_url = https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-1.6.3.tar.gz
+source_filename = libgpiod-1.6.3.tar.gz
+source_hash = eb446070be1444fd7d32d32bbca53c2f3bbb0a21193db86198cf6050b7a28441
+patch_filename = libgpiod_1.6.3-1_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/libgpiod_1.6.3-1/get_patch
+patch_hash = 76821c637073679a88f77593c6f7ce65b4b5abf8c998f823fffa13918c8761df
+
+[provide]
+libgpiod = gpiod_dep
+libgpiodcxx = gpiodcxx_dep
+