-/* $Id$
-
-This file is part of builder
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
#ifndef BINARYPACKAGE_H_
#define BINARYPACKAGE_H_
class BinaryPackage: public Package
{
public:
- class Loader: public Package::Loader
+ class Loader: public Msp::DataFile::DerivedObjectLoader<BinaryPackage, Package::Loader>
{
public:
Loader(BinaryPackage &);
- BinaryPackage &get_object() { return static_cast<BinaryPackage &>(pkg); }
private:
void build_info();
+ void header(const std::string &);
};
- BinaryPackage(Builder &, const std::string &);
- void set_path(const Msp::FS::Path &);
- bool get_need_path() const { return need_path; }
+ typedef std::vector<std::string> Flags;
- static BinaryPackage *from_pkgconfig(Builder &, const std::string &);
private:
- bool need_path;
- Msp::FS::Path path;
+ typedef std::list<std::string> HeaderList;
+
+ Msp::FS::Path base_path;
+ HeaderList headers;
+ BuildInfo static_binfo;
- virtual void create_build_info();
+public:
+ BinaryPackage(Builder &, const std::string &);
+
+ const BuildInfo &get_static_build_info() const { return static_binfo; }
+
+ static BinaryPackage *from_flags(Builder &, const std::string &, const Flags &, const Flags & = Flags());
+private:
+ static void process_flags(const Flags &, BuildInfo &);
+ void do_prepare() override;
};
#endif