]> 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 868e822159847deebf24a76ff23867442485c142..c4f42e574ed7a484150966c063d9513d6bb72437 100644 (file)
@@ -1,10 +1,4 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
+#include <msp/fs/utils.h>
 #include <msp/strings/format.h>
 #include "component.h"
 #include "sharedlibrary.h"
@@ -18,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)
 {
@@ -36,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));
 }