]> git.tdb.fi Git - builder.git/blob - source/systemlibrary.cpp
Improve file target naming
[builder.git] / source / systemlibrary.cpp
1 #include <msp/fs/path.h>
2 #include <msp/fs/utils.h>
3 #include "systemlibrary.h"
4
5 using namespace std;
6 using namespace Msp;
7
8 SystemLibrary::SystemLibrary(Builder &b, const FS::Path &p):
9         FileTarget(b, 0, p),
10         Library(b, 0, p, extract_libname(p))
11 { }
12
13 string SystemLibrary::extract_libname(const FS::Path &p)
14 {
15         string result = FS::basepart(FS::basename(p));
16         if(!result.compare(0, 3, "lib"))
17                 result.erase(0, 3);
18         return result;
19 }