From 1c0a735e00e12140817432f5b1218f388f59b287 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Tue, 2 Sep 2014 23:06:07 +0300 Subject: Use static library dependencies not when the library is built but when it is used. --- build.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'build.py') diff --git a/build.py b/build.py index d747b32..84191c4 100644 --- a/build.py +++ b/build.py @@ -131,6 +131,7 @@ class BuildTarget(): 'cs_args' : True, 'link_args' : True, 'link_depends': True, + 'link_with' : True, 'include_directories': True, 'dependencies' : True, 'install_dir' : True, @@ -362,7 +363,12 @@ class BuildTarget(): return self.extra_args.get(language, []) def get_dependencies(self): - return self.link_targets + transitive_deps = [] + for t in self.link_targets: + transitive_deps.append(t) + if isinstance(t, StaticLibrary): + transitive_deps += t.get_dependencies() + return transitive_deps def get_basename(self): return self.name -- cgit v1.1