]> git.tdb.fi Git - builder.git/blobdiff - source/sharedlibrary.cpp
Move the Component reference to Target and make it a pointer
[builder.git] / source / sharedlibrary.cpp
index 606593bda0d88c82d3299e33db6a7a540d1876f4..c4f42e574ed7a484150966c063d9513d6bb72437 100644 (file)
@@ -1,3 +1,4 @@
+#include <msp/fs/utils.h>
 #include <msp/strings/format.h>
 #include "component.h"
 #include "sharedlibrary.h"
@@ -11,7 +12,14 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const list<ObjectFi
        Binary(b, c, objs),
        Library(b, &c.get_package(), path, c.get_name()),
        soname(create_soname(c))
-{ }
+{
+       install_location = "lib";
+       if(component->get_type()==Component::MODULE)
+       {
+               install_location += '/';
+               install_location += package->get_name();
+       }
+}
 
 string SharedLibrary::create_soname(const Component &c)
 {
@@ -29,5 +37,5 @@ string SharedLibrary::create_soname(const Component &c)
                                break;
                }
 
-       return format("%s.%s", name, ver.substr(0, i));
+       return format("%s.%s", FS::basename(path), ver.substr(0, i));
 }