]> git.tdb.fi Git - builder.git/blobdiff - source/binarypackage.cpp
Tool names are no longer retrieved from Architecture
[builder.git] / source / binarypackage.cpp
index 8c9ba5c442ef239be662c36672e7f35837ff0773..bc3e5c929ec41af7d6a5b515f2ac2a17501c50b1 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include <msp/io/print.h>
 #include <msp/strings/utils.h>
 #include "binarypackage.h"
@@ -50,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;