gen: update due to sdbusplus-gen-meson change

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I7dfb64d1567c829fe5a3ac71bf5c9aff6773abc7
diff --git a/gen/meson.build b/gen/meson.build
index 56193c7..2756633 100644
--- a/gen/meson.build
+++ b/gen/meson.build
@@ -4,10 +4,10 @@
     '--version',
 ).stdout().strip().split('\n')[0]
 
-if sdbuspp_gen_meson_ver != 'sdbus++-gen-meson version 3'
+if sdbuspp_gen_meson_ver != 'sdbus++-gen-meson version 4'
     warning('Generated meson files from wrong version of sdbus++-gen-meson.')
     warning(
-        'Expected "sdbus++-gen-meson version 3", got:',
+        'Expected "sdbus++-gen-meson version 4", got:',
         sdbuspp_gen_meson_ver
     )
 endif
diff --git a/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build b/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build
index 69bab31..0d8c7e0 100644
--- a/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build
+++ b/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build
@@ -3,6 +3,7 @@
     'xyz/openbmc_project/Logging/Internal/Manager__cpp'.underscorify(),
     input: [ '../../../../../../xyz/openbmc_project/Logging/Internal/Manager.interface.yaml',  ],
     output: [ 'server.cpp', 'server.hpp', 'client.hpp',  ],
+    depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
         '--output', meson.current_build_dir(),
diff --git a/gen/xyz/openbmc_project/Logging/Internal/meson.build b/gen/xyz/openbmc_project/Logging/Internal/meson.build
index 044d181..d5bfd81 100644
--- a/gen/xyz/openbmc_project/Logging/Internal/meson.build
+++ b/gen/xyz/openbmc_project/Logging/Internal/meson.build
@@ -4,6 +4,7 @@
     'xyz/openbmc_project/Logging/Internal/Manager__markdown'.underscorify(),
     input: [ '../../../../../xyz/openbmc_project/Logging/Internal/Manager.interface.yaml',  ],
     output: [ 'Manager.md' ],
+    depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'markdown',
         '--output', meson.current_build_dir(),
diff --git a/meson.build b/meson.build
index 86d0499..b58fc85 100644
--- a/meson.build
+++ b/meson.build
@@ -18,6 +18,10 @@
 sdbusplus_dep = dependency('sdbusplus')
 sdbusplusplus_prog = find_program('sdbus++', native: true)
 sdbuspp_gen_meson_prog = find_program('sdbus++-gen-meson', native: true)
+sdbusplusplus_depfiles = files()
+if sdbusplus_dep.type_name() == 'internal'
+    sdbusplusplus_depfiles = subproject('sdbusplus').get_variable('sdbusplusplus_depfiles')
+endif
 
 pdi_dep = dependency('phosphor-dbus-interfaces')