X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsystemlibrary.cpp;h=66a346f8be4c1d8da5b8787e47c112425af41c9e;hb=af2dac0d09df4782060dd131f2a761e8a46a8d55;hp=0af4910dbc1dcd08d5c15c9a14db7bafd0bfdcfa;hpb=4d0d003b022943d8a0e39ba19078bab8d32d8857;p=builder.git diff --git a/source/systemlibrary.cpp b/source/systemlibrary.cpp index 0af4910..66a346f 100644 --- a/source/systemlibrary.cpp +++ b/source/systemlibrary.cpp @@ -1,20 +1,26 @@ /* $Id$ This file is part of builder -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions +Copyright © 2006-2009 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ -#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=splitext(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; }