-
Notifications
You must be signed in to change notification settings - Fork 1
/
library.hpp
51 lines (48 loc) · 1.17 KB
/
library.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include "macro.hpp"
#include "ser.hpp"
#include <string>
#include <vector>
#define LIBRARY_TYPES \
X_MACRO(File) \
X_MACRO(Git) \
X_MACRO(PkgConfig) \
X_MACRO(Lib) \
X_MACRO(Framework) \
X_MACRO(EmPort)
class Library
{
public:
enum class Type {
#define X_MACRO(x) x,
LIBRARY_TYPES
#undef X_MACRO
};
Type type;
std::string name;
std::string path;
std::string version; // only for git
std::string postClone;
std::vector<std::string> includes;
std::string incdir;
std::vector<std::string> incdirs;
std::string libdir;
std::vector<std::string> dependencies;
std::string flag; // only for emscripten ports
#define SER_PROPERTY_LIST \
SER_PROPERTY(type); \
SER_PROPERTY(name); \
SER_PROPERTY(path); \
SER_PROPERTY(version); \
SER_PROPERTY(postClone); \
SER_PROPERTY(includes); \
SER_PROPERTY(incdir); \
SER_PROPERTY(incdirs); \
SER_PROPERTY(libdir); \
SER_PROPERTY(dependencies); \
SER_PROPERTY(flag);
SER_DEFINE_PROPERTIES()
#undef SER_PROPERTY_LIST
};
std::string toString(Library::Type);
Library::Type toLibraryType(const std::string &);