]> git.tdb.fi Git - builder.git/blobdiff - source/sharedlibrary.cpp
Move some install location assignments to more logical places
[builder.git] / source / sharedlibrary.cpp
index 606593bda0d88c82d3299e33db6a7a540d1876f4..fac651a8e3518737187f817c0d4d14ee2575e036 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(comp.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));
 }