- {
- dep_libs.push_back(lib);
-
- if(Install *inst = dynamic_cast<Install *>(lib))
- lib = &inst->get_source();
- if(StaticLibrary *stlib = dynamic_cast<StaticLibrary *>(lib))
- queue.push_back(&stlib->get_component());
- }
+ libs_to_process.push_back(lib);
+ else if(missing_libs.insert(*i).second)
+ problems.push_back(format("Required library %s not found", *i));
+ }
+
+ if(tgt!=this)
+ {
+ const Target::Dependencies &tdeps = tgt->get_transitive_dependencies();
+ libs_to_process.insert(libs_to_process.end(), tdeps.begin(), tdeps.end());
+ }
+
+ list<Target *>::iterator insert_pos = j;
+ ++insert_pos;
+ for(list<Target *>::const_iterator i=libs_to_process.begin(); i!=libs_to_process.end(); ++i)
+ {
+ Target *real = (*i)->get_real_target();
+ if(StaticLibrary *stlib = dynamic_cast<StaticLibrary *>(real))
+ queue.insert(insert_pos, stlib);