meson: subproject as system dependency
When phosphor-dbus-interfaces is a subproject, use -isystem for
phosphor-dbus-interfaces headers. This is a signal to, for example
static analysis tools, that the phosphor-dbus-interfaces headers are to
be treated as if they were installed in the compilers default search
path (e.g. /usr/include).
Change-Id: Iaa94b339c689cb47abcaed49a397bc60518f48c3
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
diff --git a/meson.build b/meson.build
index 0fc0644..d66839c 100644
--- a/meson.build
+++ b/meson.build
@@ -106,6 +106,10 @@
],
)
+if meson.is_subproject()
+ phosphor_dbus_interfaces_dep = phosphor_dbus_interfaces_dep.as_system()
+endif
+
meson.override_dependency(
'phosphor-dbus-interfaces',
phosphor_dbus_interfaces_dep,