X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fimportlibrary.cpp;h=1e6650fdac1ee648ebae4fbf642ef2cf498a1c6e;hb=e4c839cacd8572ade951f4961e8e145d20e0103f;hp=60e5511b96ff08ebb4be74aa0fa5e39182f2eddd;hpb=728b2f65fadd5fb5f000d908efa414027123f964;p=builder.git diff --git a/source/importlibrary.cpp b/source/importlibrary.cpp index 60e5511..1e6650f 100644 --- a/source/importlibrary.cpp +++ b/source/importlibrary.cpp @@ -1,8 +1,29 @@ #include +#include "component.h" +#include "exportdefinitions.h" #include "importlibrary.h" +#include "sharedlibrary.h" +#include "sourcepackage.h" +using namespace std; using namespace Msp; ImportLibrary::ImportLibrary(Builder &b, const FS::Path &p): - FileTarget(b, p) + FileTarget(b, p), + shared_lib(0) { } + +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())), + shared_lib(&sl) +{ + component = &c; + add_dependency(exp); + shared_lib->set_import_library(this); + + install_location = "lib"; + + const string &version = component->get_package().get_interface_version(); + if(!version.empty()) + install_filename = format("lib%s-%s.dll.a", sl.get_libname(), version); +}