aboutsummaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-06-15 00:26:19 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-06-15 00:26:19 +0300
commit6d744b13ff205a4a85c298c620525d8a3b685447 (patch)
tree89cbfa3e9f7e63de77d33ba688037e0103700e76 /build.py
parentee0fee2111087a1082baaad3f53e871bd9123c69 (diff)
downloadmeson-6d744b13ff205a4a85c298c620525d8a3b685447.zip
meson-6d744b13ff205a4a85c298c620525d8a3b685447.tar.gz
meson-6d744b13ff205a4a85c298c620525d8a3b685447.tar.bz2
Now can create internal dependencies to simplify subproject usage.
Diffstat (limited to 'build.py')
-rw-r--r--build.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/build.py b/build.py
index 9f4fa95..29f20a8 100644
--- a/build.py
+++ b/build.py
@@ -421,11 +421,16 @@ class BuildTarget():
for dep in deps:
if hasattr(dep, 'held_object'):
dep = dep.held_object
- if not isinstance(dep, dependencies.Dependency):
- raise InvalidArguments('Argument is not an external dependency')
- self.external_deps.append(dep)
- if isinstance(dep, dependencies.Dependency):
+ if isinstance(dep, dependencies.InternalDependency):
+ self.sources += dep.sources
+ self.add_include_dirs(dep.include_directories)
+ for l in dep.libraries:
+ self.link(l)
+ elif isinstance(dep, dependencies.Dependency):
+ self.external_deps.append(dep)
self.process_sourcelist(dep.get_sources())
+ else:
+ raise InvalidArguments('Argument is not an external dependency')
def get_external_deps(self):
return self.external_deps