X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsystemlibrary.cpp;h=61bd810fa10931d6953febdc56526b69725e11d7;hb=632361796a7ddadf8a726526c937fab22281fb7b;hp=00cbddc5b67e5306161c4ddd8669a72e15bcddd7;hpb=4f78d9f016482ce1ac7d726852e33e07c090df1b;p=builder.git diff --git a/source/systemlibrary.cpp b/source/systemlibrary.cpp index 00cbddc..61bd810 100644 --- a/source/systemlibrary.cpp +++ b/source/systemlibrary.cpp @@ -1,13 +1,19 @@ -#include +#include +#include #include "systemlibrary.h" using namespace std; using namespace Msp; -SystemLibrary::SystemLibrary(Builder &b, const string &n): - Target(b, 0, n) +SystemLibrary::SystemLibrary(Builder &b, const FS::Path &p): + FileTarget(b, 0, p), + Library(b, 0, p, extract_libname(p)) +{ } + +string SystemLibrary::extract_libname(const FS::Path &p) { - libname=Path::splitext(Path::basename(n)).base; - if(!libname.compare(0, 3, "lib")) - libname.erase(0, 3); + string result = FS::basepart(FS::basename(p)); + if(!result.compare(0, 3, "lib")) + result.erase(0, 3); + return result; }