1 #include <msp/strings/format.h>
2 #include "architecture.h"
5 #include "exportdefinitions.h"
6 #include "importlibrary.h"
7 #include "sharedlibrary.h"
8 #include "sourcepackage.h"
13 ImportLibrary::ImportLibrary(Builder &b, const FS::Path &p):
18 ImportLibrary::ImportLibrary(Builder &b, const Component &c, SharedLibrary &sl, ExportDefinitions &exp):
19 FileTarget(b, c.get_package(), c.get_package().get_output_directory()/generate_filename(c, sl)),
24 shared_lib->set_import_library(this);
26 install_location = "lib";
28 const string &version = component->get_package().get_interface_version();
31 const Architecture &arch = builder.get_current_arch();
32 install_filename = arch.create_filename<ImportLibrary>(format("%s-%s", sl.get_libname(), version));
36 string ImportLibrary::generate_filename(const Component &comp, const SharedLibrary &sl)
38 const Architecture &arch = comp.get_package().get_builder().get_current_arch();
39 return arch.create_filename<ImportLibrary>(sl.get_libname());