X-Git-Url: http://git.tdb.fi/?p=builder.git;a=blobdiff_plain;f=source%2Fimportlibrary.cpp;h=3cdc103f8ef190aa0cd6d672f1cf985ea620c1cd;hp=1e6650fdac1ee648ebae4fbf642ef2cf498a1c6e;hb=650560b14cac4bb35589b5b8db99197c5e1345cc;hpb=50baabc242633d531d3f9542e9a64491b6e12c6c diff --git a/source/importlibrary.cpp b/source/importlibrary.cpp index 1e6650f..3cdc103 100644 --- a/source/importlibrary.cpp +++ b/source/importlibrary.cpp @@ -1,4 +1,6 @@ #include +#include "architecture.h" +#include "builder.h" #include "component.h" #include "exportdefinitions.h" #include "importlibrary.h" @@ -14,7 +16,7 @@ ImportLibrary::ImportLibrary(Builder &b, const FS::Path &p): { } ImportLibrary::ImportLibrary(Builder &b, const Component &c, SharedLibrary &sl, ExportDefinitions &exp): - FileTarget(b, c.get_package(), c.get_package().get_output_directory()/format("lib%s.dll.a", sl.get_libname())), + FileTarget(b, c.get_package(), c.get_package().get_output_directory()/generate_filename(c, sl)), shared_lib(&sl) { component = &c; @@ -25,5 +27,14 @@ ImportLibrary::ImportLibrary(Builder &b, const Component &c, SharedLibrary &sl, const string &version = component->get_package().get_interface_version(); if(!version.empty()) - install_filename = format("lib%s-%s.dll.a", sl.get_libname(), version); + { + const Architecture &arch = builder.get_current_arch(); + install_filename = arch.create_filename(format("%s-%s", sl.get_libname(), version)); + } +} + +string ImportLibrary::generate_filename(const Component &comp, const SharedLibrary &sl) +{ + const Architecture &arch = comp.get_package().get_builder().get_current_arch(); + return arch.create_filename(sl.get_libname()); }