]> git.tdb.fi Git - builder.git/blob - source/binarypackage.h
Improve file target naming
[builder.git] / source / binarypackage.h
1 #ifndef BINARYPACKAGE_H_
2 #define BINARYPACKAGE_H_
3
4 #include "package.h"
5
6 /**
7 Represents a package that is installed on the system, but can't be built by
8 Builder.
9 */
10 class BinaryPackage: public Package
11 {
12 public:
13         class Loader: public Package::Loader
14         {
15         public:
16                 Loader(BinaryPackage &);
17                 BinaryPackage &get_object() { return static_cast<BinaryPackage &>(pkg); }
18         private:
19                 void build_info();
20         };
21
22 private:
23         bool need_path;
24         Msp::FS::Path path;
25
26 public:
27         BinaryPackage(Builder &, const std::string &);
28
29         /**
30         Sets the path where the package's files were installed.  This is only useful
31         if the package doesn't use pkg-config.
32         */
33         void set_path(const Msp::FS::Path &);
34
35         bool get_need_path() const { return need_path; }
36
37         static BinaryPackage *from_pkgconfig(Builder &, const std::string &);
38 private:
39         virtual void create_build_info();
40 };
41
42 #endif