]> git.tdb.fi Git - libs/gl.git/blob - Build
Check the flat qualifier from the correct member
[libs/gl.git] / Build
1 package "mspgl"
2 {
3         version "3.0";
4         description "Lightweight C++/OpenGL graphics engine";
5
6         require "mspcore";
7         require "mspdatafile";
8         require "mspmath";
9         require "mspgui";
10         require "sigc++-2.0";
11
12         feature "vulkan" "Use Vulkan instead of OpenGL as backend";
13         if_feature "vulkan"
14         {
15                 require "vulkan";
16         };
17
18         if_feature "!vulkan"
19         {
20                 if_arch "android"
21                 {
22                         require "opengles";
23                 };
24                 if_arch "!android"
25                 {
26                         require "opengl";
27                 };
28
29                 generate "GLEX"
30                 {
31                         in_suffix ".glext";
32                         out_suffix ".cpp";
33                         out_suffix ".h";
34                         command "scripts/extgen.py";
35                         if_arch "android"
36                         {
37                                 argument "gles2";
38                         };
39                 };
40         };
41
42         generate "RES"
43         {
44                 in_suffix ".glsl";
45                 in_suffix ".samp";
46                 in_suffix ".mesh";
47                 out_suffix ".cpp";
48                 command "mspdatatool";
49                 arguments "-i" "-n" "Msp::GL";
50                 out_argument "-o";
51                 processing_unit DIRECTORY;
52         };
53
54         library "mspgl"
55         {
56                 source "source/core";
57                 source "source/materials";
58                 source "source/render";
59                 source "source/effects";
60                 source "source/animation";
61                 source "source/resources";
62                 source "source/glsl";
63                 source "source/builders";
64                 if_feature "vulkan"
65                 {
66                         source "source/backends/vulkan";
67                         build_info
68                         {
69                                 incpath "source/backends/vulkan";
70                         };
71                 };
72                 if_feature "!vulkan"
73                 {
74                         source "source/backends/opengl";
75                         build_info
76                         {
77                                 incpath "source/backends/opengl";
78                         };
79                 };
80                 source "extensions";
81                 source "builtin_data";
82                 source "shaderlib";
83                 build_info
84                 {
85                         incpath "source";
86                         incpath "source/core";
87                         incpath "source/materials";
88                         incpath "source/render";
89                         incpath "source/effects";
90                         incpath "source/animation";
91                         incpath "source/resources";
92                         incpath "source/builders";
93                         standard CXX "c++11";
94                 };
95                 install true;
96                 install_map
97                 {
98                         map "source/core" "include/msp/gl";
99                         map "source/materials" "include/msp/gl";
100                         map "source/render" "include/msp/gl";
101                         map "source/effects" "include/msp/gl";
102                         map "source/animation" "include/msp/gl";
103                         map "source/resources" "include/msp/gl";
104                         map "source/glsl" "include/msp/gl/glsl";
105                         map "source/builders" "include/msp/gl";
106                         map "source/backends/opengl" "include/msp/gl";
107                         map "source/backends/vulkan" "include/msp/gl";
108                         map "extensions" "include/msp/gl/extensions";
109                 };
110         };
111
112         program "viewer"
113         {
114                 source "tools/viewer.cpp";
115                 require "sigc++-2.0";
116                 use "mspgl";
117         };
118
119         program "desertpillars"
120         {
121                 source "demos/desertpillars/source";
122                 require "sigc++-2.0";
123                 use "mspgl";
124                 build_info
125                 {
126                         standard CXX "c++14";
127                 };
128         };
129
130         program "glslcompiler"
131         {
132                 source "tools/glslcompiler.cpp";
133                 use "mspgl";
134         };
135
136         source_tarball
137         {
138                 source "License.txt";
139                 source "Changelog.txt";
140         };
141 };