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;