From: Mikko Rasa Date: Sun, 10 Aug 2008 13:46:27 +0000 (+0000) Subject: Make sure we have libpaths for all static libs X-Git-Tag: 0.9~2 X-Git-Url: http://git.tdb.fi/?p=builder.git;a=commitdiff_plain;h=eb0f435b45dd9ed4154365381533a784eb002419 Make sure we have libpaths for all static libs --- diff --git a/source/component.cpp b/source/component.cpp index 29bf9d1..26a0ab4 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -48,6 +48,17 @@ void Component::create_build_info() for(StringList::iterator i=build_info.libpath.begin(); i!=build_info.libpath.end(); ++i) *i=(pkg.get_source() / *i).str(); + if(pkg.get_library_mode()!=DYNAMIC) + { + // XXX This may pull in some unnecessary libpaths too. More thought required. + PackageList reqs=pkg.collect_requires(); + for(PackageList::iterator i=reqs.begin(); i!=reqs.end(); ++i) + { + const BuildInfo &ebi=(*i)->get_exported_binfo(); + build_info.libpath.insert(build_info.libpath.end(), ebi.libpath.begin(), ebi.libpath.end()); + } + } + if(type==PROGRAM) { string strip=pkg.get_config().get_option("strip").value;