+ for(const FS::Path &p: combined_path)
+ {
+ const list<string> *cur_names = (mode>=BuildInfo::DYNAMIC ? &shared_names : &static_names);
+ for(auto j=cur_names->begin(); j!=cur_names->end(); )
+ {
+ FS::Path filename = p / *j;
+ if(FileTarget *tgt = get_target(filename))
+ {
+ builder.get_logger().log("vfs", format("Library %s (%s) found in %s as existing %s", lib, *j, p.str(), tgt->get_type()));
+ return tgt;
+ }
+ else if(file_exists(filename))
+ {
+ builder.get_logger().log("vfs", format("Library %s (%s) found in %s", lib, *j, p.str()));
+ if(cur_names==&shared_names)
+ {
+ if(use_import_lib)
+ return new ImportLibrary(builder, filename);
+ return new SharedLibrary(builder, filename);
+ }
+ else
+ return new StaticLibrary(builder, filename);
+ }