]> git.tdb.fi Git - builder.git/blobdiff - source/component.cpp
Fix include and library search order
[builder.git] / source / component.cpp
index f4e8fc2ee734f11e3306b38a03a60e7309d8a027..e674b018aabf42c338585ef6072e76f70221f111 100644 (file)
@@ -5,7 +5,7 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
-#include <msp/core/error.h>
+#include <msp/core/except.h>
 #include <msp/path/utils.h>
 #include <msp/strings/lexicalcast.h>
 #include "builder.h"
@@ -41,6 +41,11 @@ void Component::create_build_info()
        for(PackageList::iterator i=requires.begin(); i!=requires.end(); ++i)
                build_info.add((*i)->get_exported_binfo());
 
+       for(StringList::iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i)
+               *i=(pkg.get_source() / *i).str();
+       for(StringList::iterator i=build_info.libpath.begin(); i!=build_info.libpath.end(); ++i)
+               *i=(pkg.get_source() / *i).str();
+
        if(type==PROGRAM)
        {
                string strip=pkg.get_config().get_option("strip").value;