if(!component)
return;
- const SourcePackage &spkg = component->get_package();
BuildInfo::LibraryMode libmode = component->get_build_info().libmode;
- if(dynamic_cast<SharedLibrary *>(this) && libmode<BuildInfo::DYNAMIC)
- libmode = BuildInfo::DYNAMIC;
list<const Component *> queue;
list<Target *> dep_libs;
const Component *c = queue.front();
queue.erase(queue.begin());
- const BuildInfo::PathList &libpath = c->get_build_info().libpath;
-
- const BuildInfo::WordList &libs = c->get_build_info().libs;
- for(BuildInfo::WordList::const_iterator i=libs.begin(); i!=libs.end(); ++i)
+ const BuildInfo &binfo = c->get_build_info();
+ for(BuildInfo::WordList::const_iterator i=binfo.libs.begin(); i!=binfo.libs.end(); ++i)
{
- Target *lib = builder.get_vfs().find_library(*i, libpath, libmode);
+ Target *lib = builder.get_vfs().find_library(*i, binfo.libpath, libmode);
if(lib)
{
dep_libs.push_back(lib);
queue.push_back(stlib->get_component());
}
else
- builder.problem(spkg.get_name(), format("Couldn't find library %s for %s", *i, name));
+ builder.problem(package->get_name(), format("Couldn't find library %s for %s", *i, name));
}
}
for(BuildInfo::PathList::iterator i=build_info.libpath.begin(); i!=build_info.libpath.end(); ++i)
*i = (pkg.get_source() / *i).str();
+ if(type==LIBRARY || type==MODULE)
+ if(build_info.libmode<BuildInfo::DYNAMIC)
+ build_info.libmode = BuildInfo::DYNAMIC;
+
if(build_info.libmode<BuildInfo::DYNAMIC)
{
for(PackageList::iterator i=all_reqs.begin(); i!=all_reqs.end(); ++i)