]> git.tdb.fi Git - builder.git/blobdiff - source/binarypackage.cpp
Having to specify package paths manually is stupid and un-modern
[builder.git] / source / binarypackage.cpp
index 514481f0066c56a3febb253a81708d3ff51c16da..381e792681abfbee7e78163753e397c6f5a68d5a 100644 (file)
@@ -7,26 +7,20 @@ using namespace std;
 using namespace Msp;
 
 BinaryPackage::BinaryPackage(Builder &b, const string &n):
-       Package(b, n),
-       need_path(false)
+       Package(b, n)
 {
        use_pkgconfig = false;
 }
 
-void BinaryPackage::set_path(const FS::Path &p)
-{
-       path = builder.get_cwd()/p;
-}
-
 void BinaryPackage::create_build_info()
 {
        for(BuildInfo::PathList::iterator i=export_binfo.incpath.begin(); i!=export_binfo.incpath.end(); ++i)
                if((*i)[0]=="@")
-                       *i = path/i->subpath(1);
+                       *i = builder.get_prefix()/i->subpath(1);
 
        for(BuildInfo::PathList::iterator i=export_binfo.libpath.begin(); i!=export_binfo.libpath.end(); ++i)
                if((*i)[0]=="@")
-                       *i = path/i->subpath(1);
+                       *i = builder.get_prefix()/i->subpath(1);
 }
 
 BinaryPackage *BinaryPackage::from_flags(Builder &builder, const string &name, const vector<string> &flags)
@@ -62,7 +56,6 @@ BinaryPackage *BinaryPackage::from_flags(Builder &builder, const string &name, c
 BinaryPackage::Loader::Loader(BinaryPackage &p):
        DataFile::DerivedObjectLoader<BinaryPackage, Package>(p)
 {
-       add("need_path", &BinaryPackage::need_path);
        add("build_info", &Loader::build_info);
 }