X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbinarypackage.cpp;h=bc3e5c929ec41af7d6a5b515f2ac2a17501c50b1;hb=45c778b1976de1a3093e0c6fb5e2a94c42073dcb;hp=f804da08394c31fc3489109a46b1abf9eb9ef5fd;hpb=dcaf06c2bba4e02a312cd6af24ddc96410e7be4e;p=builder.git diff --git a/source/binarypackage.cpp b/source/binarypackage.cpp index f804da0..bc3e5c9 100644 --- a/source/binarypackage.cpp +++ b/source/binarypackage.cpp @@ -43,11 +43,19 @@ BinaryPackage *BinaryPackage::from_pkgconfig(Builder &builder, const string &nam if(!i->compare(0, 2, "-I")) binfo.incpath.push_back(i->substr(2)); else if(!i->compare(0, 2, "-D")) - binfo.defines.push_back(i->substr(2)); + { + string::size_type equals = i->find('='); + if(equals!=string::npos) + binfo.defines[i->substr(2, equals-2)] = i->substr(equals+1); + else + binfo.defines[i->substr(2)] = string(); + } else if(!i->compare(0, 2, "-L")) binfo.libpath.push_back(i->substr(2)); else if(!i->compare(0, 2, "-l")) binfo.libs.push_back(i->substr(2)); + else if(*i=="-pthread") + binfo.threads = true; } return pkg;