meson: subproject as system dependency
When sdbusplus is a subproject, use -isystem for sdbusplus headers. This
is a signal to, for example static analysis tools, that the sdbusplus
headers are to be treated as if they were installed in the compilers
default search path (e.g. /usr/include).
Change-Id: I7d4bfd83306d0ab9858b49bf48c730677c7c292a
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
diff --git a/meson.build b/meson.build
index 173bff6..d11202e 100644
--- a/meson.build
+++ b/meson.build
@@ -75,6 +75,10 @@
dependencies: [boost_dep, libsystemd_pkg, nlohmann_json_dep],
)
+if meson.is_subproject()
+ sdbusplus_dep = sdbusplus_dep.as_system()
+endif
+
should_generate_cpp = true
should_generate_markdown = false
should_generate_registry = false