argv.push_back(relative(exp->get_path(), work_dir).str());
argv.push_back("-D");
- if(shlib.get_install_filename().empty())
- argv.push_back(FS::basename(shlib.get_path()));
- else
- argv.push_back(shlib.get_install_filename());
+ argv.push_back(FS::basename(shlib.get_path()));
argv.push_back("-l");
argv.push_back(relative(imp->get_path(), work_dir).str());
const BinaryComponent &bcomp = dynamic_cast<const BinaryComponent &>(*component);
if(bcomp.get_type()==BinaryComponent::MODULE)
install_location /= package->get_name();
- else
- {
- const string &version = component->get_package().get_interface_version();
- if(!version.empty())
- {
- const Architecture &arch = builder.get_current_arch();
- if(arch.get_system()=="windows")
- soname = arch.create_filename<SharedLibrary>(format("%s-%s", libname, version));
- else if(arch.get_system()=="darwin")
- soname = arch.create_filename<SharedLibrary>(format("%s.%s", libname, version));
- else
- soname = format("%s.%s", arch.create_filename<SharedLibrary>(libname), version);
-
- install_filename = soname;
- }
- }
for(ObjectFile *o: objects)
o->set_used_in_shared_library(true);
return comp.get_name()+".dlm";
else
{
- const Architecture &arch = comp.get_package().get_builder().get_current_arch();
- return arch.create_filename<SharedLibrary>(comp.get_name());
+ const SourcePackage &pkg = comp.get_package();
+ const Architecture &arch = pkg.get_builder().get_current_arch();
+ const string &version = pkg.get_interface_version();
+ if(!version.empty())
+ {
+ if(arch.get_system()=="windows")
+ return arch.create_filename<SharedLibrary>(format("%s-%s", comp.get_name(), version));
+ else if(arch.get_system()=="darwin")
+ return arch.create_filename<SharedLibrary>(format("%s.%s", comp.get_name(), version));
+ else
+ return format("%s.%s", arch.create_filename<SharedLibrary>(comp.get_name()), version);
+ }
+ else
+ return arch.create_filename<SharedLibrary>(comp.get_name());
}
}