Target *lib = builder.get_vfs().find_library(*i, binfo.libpath, libmode);
if(lib)
{
- dep_libs.push_back(lib);
-
- lib = lib->get_real_target();
- if(StaticLibrary *stlib = dynamic_cast<StaticLibrary *>(lib))
+ Target *real = lib->get_real_target();
+ if(StaticLibrary *stlib = dynamic_cast<StaticLibrary *>(real))
+ {
+ dep_libs.push_back(stlib);
if(stlib->get_component())
queue.push_back(stlib->get_component());
+ }
+ else
+ dep_libs.push_back(lib);
}
else
builder.problem(package->get_name(), format("Couldn't find library %s for %s", *i, name));
const Target::Dependencies &depends = target.get_dependencies();
for(Target::Dependencies::const_iterator i=depends.begin(); i!=depends.end(); ++i)
{
+ FileTarget *file = dynamic_cast<FileTarget *>(*i);
Target *tgt = (*i)->get_real_target();
if(ObjectFile *obj = dynamic_cast<ObjectFile *>(tgt))
argv.push_back(relative(obj->get_path(), work_dir).str());
else if(StaticLibrary *stlib = dynamic_cast<StaticLibrary *>(tgt))
- argv.push_back(stlib->get_path().str());
+ argv.push_back((file?file:stlib)->get_path().str());
else if(SharedLibrary *shlib = dynamic_cast<SharedLibrary *>(tgt))
{
argv.push_back("-l"+shlib->get_libname());
if(shlib)
argv.push_back("-l"+shlib->get_libname());
else
- argv.push_back(imp->get_path().str());
+ argv.push_back((file?file:imp)->get_path().str());
static_link_ok = false;
}
}