]> git.tdb.fi Git - libs/gl.git/blob - Build
Refactor SL::Features::from_api_version to take the actual API version
[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                 in_suffix ".png";
48                 out_suffix ".cpp";
49                 command "mspdatatool";
50                 arguments "-i" "-n" "Msp::GL";
51                 out_argument "-o";
52                 processing_unit DIRECTORY;
53         };
54
55         library "mspgl"
56         {
57                 source "source/core";
58                 source "source/materials";
59                 source "source/render";
60                 source "source/effects";
61                 source "source/animation";
62                 source "source/resources";
63                 source "source/glsl";
64                 source "source/builders";
65                 if_feature "vulkan"
66                 {
67                         source "source/backends/vulkan";
68                         build_info
69                         {
70                                 incpath "source/backends/vulkan";
71                         };
72                 };
73                 if_feature "!vulkan"
74                 {
75                         source "source/backends/opengl";
76                         build_info
77                         {
78                                 incpath "source/backends/opengl";
79                         };
80                 };
81                 source "extensions";
82                 source "builtin_data";
83                 source "shaderlib";
84                 build_info
85                 {
86                         incpath "source";
87                         incpath "source/core";
88                         incpath "source/materials";
89                         incpath "source/render";
90                         incpath "source/effects";
91                         incpath "source/animation";
92                         incpath "source/resources";
93                         incpath "source/builders";
94                         standard CXX "c++11";
95                 };
96                 install true;
97                 install_map
98                 {
99                         map "source/core" "include/msp/gl";
100                         map "source/materials" "include/msp/gl";
101                         map "source/render" "include/msp/gl";
102                         map "source/effects" "include/msp/gl";
103                         map "source/animation" "include/msp/gl";
104                         map "source/resources" "include/msp/gl";
105                         map "source/glsl" "include/msp/gl/glsl";
106                         map "source/builders" "include/msp/gl";
107                         map "source/backends/opengl" "include/msp/gl";
108                         map "source/backends/vulkan" "include/msp/gl";
109                         map "extensions" "include/msp/gl/extensions";
110                 };
111         };
112
113         program "viewer"
114         {
115                 source "tools/viewer.cpp";
116                 require "sigc++-2.0";
117                 use "mspgl";
118         };
119
120         program "desertpillars"
121         {
122                 source "demos/desertpillars/source";
123                 require "sigc++-2.0";
124                 use "mspgl";
125                 build_info
126                 {
127                         standard CXX "c++14";
128                 };
129         };
130
131         program "forestpond"
132         {
133                 source "demos/forestpond/source";
134                 require "sigc++-2.0";
135                 use "mspgl";
136                 build_info
137                 {
138                         standard CXX "c++14";
139                 };
140         };
141
142         program "glslcompiler"
143         {
144                 source "tools/glslcompiler.cpp";
145                 use "mspgl";
146         };
147
148         source_tarball
149         {
150                 source "License.txt";
151                 source "Changelog.txt";
152         };
153 };