1 #include <msp/fs/utils.h>
2 #include <msp/strings/format.h>
4 #include "sharedlibrary.h"
5 #include "sourcepackage.h"
10 SharedLibrary::SharedLibrary(Builder &b, const Component &c, const list<ObjectFile *> &objs):
11 FileTarget(b, &c.get_package(), generate_target_path(c)),
13 Library(b, &c.get_package(), path, c.get_name()),
14 soname(create_soname(c))
17 string SharedLibrary::create_soname(const Component &c)
19 const string &ver = c.get_package().get_version();
25 for(; i<ver.size(); ++i)
33 return format("%s.%s", FS::basename(path), ver.substr(0, i));