]> git.tdb.fi Git - builder.git/blob - source/lib/staticlibrary.h
Add visibility decorations to the library and plugins
[builder.git] / source / lib / staticlibrary.h
1 #ifndef STATICLIBRARY_H_
2 #define STATICLIBRARY_H_
3
4 #include "filetarget.h"
5 #include "libbuilder_api.h"
6
7 class Component;
8 class ObjectFile;
9
10 /**
11 A static library target.
12 */
13 class LIBBUILDER_API StaticLibrary: public FileTarget
14 {
15 private:
16         /* TODO this really belongs in a Component, but some refactoring is required
17         to allow non-builder packages to have components.  Rename BinaryPackage to
18         ExternalPackage, add BuildableComponent and ExternalComponent classes. */
19         BuildInfo build_info;
20
21 public:
22         StaticLibrary(Builder &b, const Msp::FS::Path &p): FileTarget(b, p) { }
23         StaticLibrary(Builder &, const Component &, const std::vector<ObjectFile *> &);
24 private:
25         static std::string generate_filename(const Component &);
26
27 public:
28         const char *get_type() const override { return "StaticLibrary"; }
29
30         void add_required_library(const std::string &);
31         void add_library_path(const Msp::FS::Path &);
32         void collect_build_info(BuildInfo &) const override;
33 };
34
35 #endif