]> git.tdb.fi Git - builder.git/blobdiff - source/importlibrary.cpp
Update cross prefix for windows architecture
[builder.git] / source / importlibrary.cpp
index 9ac441f419ea6d683eb86c07890f622232711084..1e6650fdac1ee648ebae4fbf642ef2cf498a1c6e 100644 (file)
@@ -2,6 +2,7 @@
 #include "component.h"
 #include "exportdefinitions.h"
 #include "importlibrary.h"
+#include "sharedlibrary.h"
 #include "sourcepackage.h"
 
 using namespace std;
@@ -12,16 +13,17 @@ ImportLibrary::ImportLibrary(Builder &b, const FS::Path &p):
        shared_lib(0)
 { }
 
-ImportLibrary::ImportLibrary(Builder &b, const Component &c, ExportDefinitions &exp):
-       FileTarget(b, c.get_package(), c.get_package().get_out_dir()/format("lib%s.dll.a", c.get_name())),
-       shared_lib(&exp.get_library())
+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", c.get_name(), version);
+               install_filename = format("lib%s-%s.dll.a", sl.get_libname(), version);
 }