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: Ife3bcd3dcbd423f08c513f9a05fc8cabff41e2f6
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/meson.build b/test/meson.build
index 8fa22a7..3b8f167 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -17,8 +17,6 @@
 
 foreach t : tests
   test(t, executable(t.underscorify(), t + '.cpp',
-                     include_directories: includes,
                      implicit_include_directories: false,
-                     link_with: sdeventplus,
-                     dependencies: [gtest, gmock]))
+                     dependencies: [sdeventplus, gtest, gmock]))
 endforeach