- const SourcePackage &spkg = component->get_package();
- LibMode libmode = spkg.get_library_mode();
- if(dynamic_cast<SharedLibrary *>(this))
- libmode = DYNAMIC;
+ vector<Target *> static_libs;
+ vector<Target *> shared_libs;
+ vector<string> missing_libs;
+ find_dependencies(this, static_libs, shared_libs, missing_libs);
+
+ for(Target *t: static_libs)
+ add_dependency(*t);
+ for(Target *t: shared_libs)
+ add_dependency(*t);
+ for(const string &m: missing_libs)
+ problems.push_back(format("Required library %s not found", m));
+}