meson: Use declare_dependency for libraries

Now example binaries and tests don't have to be aware of the nuances for
configuring the build to use the library. This makes the project library
look like any other system dependency.

Change-Id: Ib042c253adedb6f949c8a8897ed9a34e61d2a888
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/meson.build b/test/meson.build
index 84abb79..15e5e7b 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -12,8 +12,6 @@
 
 foreach t : tests
   test(t, executable(t.underscorify(), t + '.cpp',
-                     include_directories: includes,
                      implicit_include_directories: false,
-                     link_with: gpioplus,
-                     dependencies: [gtest, gmock]))
+                     dependencies: [gpioplus, gtest, gmock]))
 endforeach