aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-03-29 13:52:03 +0200
committerEli Schwartz <eschwartz93@gmail.com>2022-05-03 02:00:29 -0400
commit3a960023d3e78d04651850178db96c7d742725e6 (patch)
tree6701f36e22752547c9041844d9c70ba301f3e4a1 /mesonbuild/dependencies
parent06b76f7c9d7bbe74450ed49316eaeae28dccda7d (diff)
downloadmeson-3a960023d3e78d04651850178db96c7d742725e6.zip
meson-3a960023d3e78d04651850178db96c7d742725e6.tar.gz
meson-3a960023d3e78d04651850178db96c7d742725e6.tar.bz2
interpreter: new function add_project_dependencies()
This function can be used to add fundamental dependencies such as glib to all build products in one fell swoop. This can be useful whenever, due to a project's coding conventions, it is not really possible to compile any source file without including the dependency. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r--mesonbuild/dependencies/base.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index c2a274e..97a19be 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -165,6 +165,9 @@ class Dependency(HoldableObject):
else:
return 'unknown'
+ def get_include_dirs(self) -> T.List['IncludeDirs']:
+ return []
+
def get_include_type(self) -> str:
return self.include_type
@@ -298,6 +301,9 @@ class InternalDependency(Dependency):
final_link_args, final_libraries, final_whole_libraries,
final_sources, final_deps, self.variables, [], [])
+ def get_include_dirs(self) -> T.List['IncludeDirs']:
+ return self.include_directories
+
def get_variable(self, *, cmake: T.Optional[str] = None, pkgconfig: T.Optional[str] = None,
configtool: T.Optional[str] = None, internal: T.Optional[str] = None,
default_value: T.Optional[str] = None,