{
sharedlib_patterns.push_back(Pattern("%.dll"));
sharedlib_patterns.push_back(Pattern("lib%.dll"));
+ /* XXX Hack: Consider import libraries (*.dll.a) as dynamic libraries,
+ even though technically they are linked statically. */
+ sharedlib_patterns.push_back(Pattern("lib%.dll.a"));
staticlib_patterns.push_back(Pattern("lib%.a"));
- staticlib_patterns.push_back(Pattern("lib%.dll.a"));
executable_patterns.push_back(Pattern("%.exe"));
}
else
FS::Path filename = *i / *j;
if(FileTarget *tgt = get_target(filename))
{
- if(cur_names!=&shared_names || mode==BuildInfo::DYNAMIC)
- {
- builder.get_logger().log("vfs", format("Library %s (%s) found in %s as existing %s", lib, *j, i->str(), tgt->get_type()));
- return tgt;
- }
+ builder.get_logger().log("vfs", format("Library %s (%s) found in %s as existing %s", lib, *j, i->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, i->str()));
if(cur_names==&shared_names)
+ {
+ // XXX Hack: create StaticLibrary targets for import libraries
+ if(FS::extpart(*j)==".a")
+ return new StaticLibrary(builder, filename);
return new SharedLibrary(builder, filename);
+ }
else
return new StaticLibrary(builder, filename);
}