sdbus++-gen-meson: switch to project_source_root

The meson call 'source_root' is deprecated in 0.56 and is
incorrect when the project using gen-meson is used as a
subproject.  Switch to 'project_source_root', which was
introduced in 0.56, and is the correct replacement for the
deprecated 'source_root' ('global_source_root' is incorrect
for use in a sub-project).

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6053f547ab48ee7c9f31acf966b94cda15a1d53b
diff --git a/tools/sdbus++-gen-meson b/tools/sdbus++-gen-meson
index 27613f2..53a948d 100755
--- a/tools/sdbus++-gen-meson
+++ b/tools/sdbus++-gen-meson
@@ -36,7 +36,7 @@
 ## if a repository contains old copies of the generated meson.build files and
 ## needs an update.  We should increment the version number whenever the
 ## resulting meson.build would change.
-tool_version="sdbus++-gen-meson version 1"
+tool_version="sdbus++-gen-meson version 2"
 function show_version {
     echo "$tool_version"
 }
@@ -177,7 +177,7 @@
     outputs=""
     for s in ${interfaces[$1]};
     do
-        sources="${sources}meson.source_root() / '$1.$s', "
+        sources="${sources}meson.project_source_root() / '$1.$s', "
 
         case "$s" in
             errors.yaml)
@@ -202,7 +202,7 @@
         sdbuspp_gen_meson_prog, '--command', 'cpp',
         '--output', meson.current_build_dir(),
         '--tool', sdbusplusplus_prog,
-        '--directory', meson.source_root(),
+        '--directory', meson.project_source_root(),
         '$1',
     ],
 )
@@ -218,7 +218,7 @@
     sources=""
     for s in ${interfaces[$1]};
     do
-        sources="${sources}meson.source_root() / '$1.$s', "
+        sources="${sources}meson.project_source_root() / '$1.$s', "
     done
 
     # Create the target to generate the interface.md file.
@@ -232,7 +232,7 @@
         sdbuspp_gen_meson_prog, '--command', 'markdown',
         '--output', meson.current_build_dir(),
         '--tool', sdbusplusplus_prog,
-        '--directory', meson.source_root(),
+        '--directory', meson.project_source_root(),
         '$1',
     ],
     build_by_default: true,