meson: create structure for use as submodule

Some other openbmc projects have set up sdbusplus to use as a
meson-subproject.  When porting one of them (entity-manager) to use
the meson build, I realized we are not structuring our meson.build
file according to best-practices for consumption as a submodule.
Specifically, we are missing the 'sdbusplus_dep' variable as described
in the meson reference: https://mesonbuild.com/Subprojects.html

Now that 'sdbusplus_dep' is defined, use it throughout the rest of
the meson.build files as well for simplification.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I79ad586aa185f769c7ecc83ef06e1f3897e8db2d
diff --git a/test/meson.build b/test/meson.build
index 7debf0e..59e17bb 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -22,13 +22,11 @@
         executable(
             'test-' + t.underscorify(),
             t + '.cpp',
-            include_directories: root_inc,
-            link_with: libsdbusplus,
             dependencies: [
                 gtest_dep,
                 gmock_dep,
                 gmock_main_dep,
-                libsystemd_pkg,
+                sdbusplus_dep,
             ],
         )
     )
@@ -40,9 +38,7 @@
         'test-vtable',
         'vtable/vtable.cpp',
         'vtable/vtable_c.c',
-        include_directories: root_inc,
-        link_with: libsdbusplus,
-        dependencies: [ gtest_dep, gtest_main_dep, libsystemd_pkg ],
+        dependencies: [ gtest_dep, gtest_main_dep, sdbusplus_dep ],
     ),
 )
 
@@ -63,14 +59,13 @@
         'test-server',
         'server/object.cpp',
         server_files,
-        include_directories: [ root_inc, include_directories('server') ],
-        link_with: libsdbusplus,
+        include_directories: include_directories('server'),
         dependencies: [
             gmock_dep,
             gmock_main_dep,
             gtest_dep,
-            libsystemd_pkg,
             pthread_dep,
+            sdbusplus_dep,
         ],
     ),
 )