]> git.tdb.fi Git - builder.git/blobdiff - source/binarypackage.h
Rearrange Target members
[builder.git] / source / binarypackage.h
index b10331b27cec63731c076ad4a0db06e6611b9001..b47d468fe138ccf761c64d88b1f3169c2b3a51f6 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef BINARYPACKAGE_H_
 #define BINARYPACKAGE_H_
 
@@ -17,24 +10,31 @@ Builder.
 class BinaryPackage: public Package
 {
 public:
-       class Loader: public Package::Loader
+       class Loader: public Msp::DataFile::DerivedObjectLoader<BinaryPackage, Package>
        {
        public:
                Loader(BinaryPackage &);
-               BinaryPackage &get_object() { return static_cast<BinaryPackage &>(pkg); }
        private:
                void build_info();
        };
 
+private:
+       bool need_path;
+       Msp::FS::Path path;
+
+public:
        BinaryPackage(Builder &, const std::string &);
-       void set_path(const Msp::Path::Path &);
+
+       /**
+       Sets the path where the package's files were installed.  This is only useful
+       if the package doesn't use pkg-config.
+       */
+       void set_path(const Msp::FS::Path &);
+
        bool get_need_path() const { return need_path; }
 
-       static BinaryPackage *from_pkgconfig(Builder &, const std::string &);
+       static BinaryPackage *from_flags(Builder &, const std::string &, const std::vector<std::string> &);
 private:
-       bool need_path;
-       Msp::Path::Path path;
-
        virtual void create_build_info();
 };