]> git.tdb.fi Git - builder.git/blob - source/lib/binary.h
Add visibility decorations to the library and plugins
[builder.git] / source / lib / binary.h
1 #ifndef BINARY_H_
2 #define BINARY_H_
3
4 #include "buildinfo.h"
5 #include "filetarget.h"
6 #include "libbuilder_api.h"
7
8 class Component;
9 class ObjectFile;
10
11 /**
12 Produces a binary file, which may be either a standalone executable or a shared
13 library.
14 */
15 class LIBBUILDER_API Binary: public FileTarget
16 {
17 private:
18         BuildInfo static_binfo;
19
20 protected:
21         std::vector<ObjectFile *> objects;
22
23         Binary(Builder &b, const Msp::FS::Path &p): FileTarget(b, p) { }
24         Binary(Builder &, const Component &, const std::string &, const std::vector<ObjectFile *> &);
25
26 public:
27         void collect_build_info(BuildInfo &) const override;
28
29 protected:
30         void find_dependencies() override;
31 private:
32         void find_dependencies(Target *, std::vector<Target *> &, std::vector<Target *> &, std::vector<std::string> &);
33 };
34
35 #endif