X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsystemlibrary.cpp;h=66a346f8be4c1d8da5b8787e47c112425af41c9e;hb=20994a6f4802f2dbcf01888d0e1996edf554ade5;hp=2df0eb54e89a663b8ef7cab5049a84030670026b;hpb=242c55b17e6608b29a77ca17a5b677e202a3ca90;p=builder.git diff --git a/source/systemlibrary.cpp b/source/systemlibrary.cpp index 2df0eb5..66a346f 100644 --- a/source/systemlibrary.cpp +++ b/source/systemlibrary.cpp @@ -12,10 +12,15 @@ Distributed under the LGPL 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=FS::basepart(FS::basename(n)); - 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; }