meson: Fix deprecated meson warnings
Fix the warnings related to deprecated meson functions:
WARNING: Project targeting '>= 0.57.0' but tried to use feature
deprecated since '0.56.0': Dependency.get_pkgconfig_variable. use
Dependency.get_variable(pkgconfig : ...) instead
WARNING: Project targeting '>= 0.57.0' but tried to use feature
deprecated since '0.56.0': meson.source_root. use
meson.project_source_root() or meson.global_source_root() instead.
Tested: Verify that there are no such warnings in local CI.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Id076918558f8988c9aa5275cf6585ffc51aa1d9e
diff --git a/meson.build b/meson.build
index a44306a..f37ac3d 100644
--- a/meson.build
+++ b/meson.build
@@ -46,7 +46,7 @@
libgpiodcxx = dependency('libgpiodcxx')
systemd = dependency('systemd')
-servicedir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
+servicedir = systemd.get_variable(pkgconfig : 'systemdsystemunitdir')
services = [
['supply-monitor', 'power-supply-monitor@.service'],
diff --git a/org/open_power/Witherspoon/Fault/meson.build b/org/open_power/Witherspoon/Fault/meson.build
index 0669c2e..29f4a3d 100644
--- a/org/open_power/Witherspoon/Fault/meson.build
+++ b/org/open_power/Witherspoon/Fault/meson.build
@@ -3,7 +3,7 @@
capture: true,
command: [
sdbuspp,
- '-r', meson.source_root(),
+ '-r', meson.project_source_root(),
'error',
'exception-header',
'org.open_power.Witherspoon.Fault',
@@ -19,7 +19,7 @@
capture: true,
command: [
sdbuspp,
- '-r', meson.source_root(),
+ '-r', meson.project_source_root(),
'error',
'exception-cpp',
'org.open_power.Witherspoon.Fault',