]> git.tdb.fi Git - libs/gui.git/blob - Build
Allow configuring window positions as well
[libs/gui.git] / Build
1 package "mspgui"
2 {
3         version "1.1";
4         description "Base graphics and input library";
5
6         require "mspcore";
7         require "sigc++-2.0";
8         if_arch "!windows & !darwin & !android"
9         {
10                 require "xlib";
11         };
12         if_arch "windows"
13         {
14                 build_info
15                 {
16                         library "gdi32";
17                 };
18         };
19         if_arch "darwin"
20         {
21                 build_info
22                 {
23                         library "CoreFoundation.framework";
24                         library "AppKit.framework";
25                 };
26         };
27
28         feature "devil" "Include DevIL support for loading image files";
29         if_feature "devil"
30         {
31                 require "IL";
32         };
33
34         feature "libpng" "Include libpng support for loading PNG files"
35         {
36                 default "yes";
37         };
38         if_feature "libpng"
39         {
40                 require "libpng";
41         };
42
43         feature "libjpeg" "Include libjpeg support for loading JPEG files"
44         {
45                 default "yes";
46         };
47         if_feature "libjpeg"
48         {
49                 build_info
50                 {
51                         library "jpeg";
52                 };
53         };
54
55         if_arch "darwin"
56         {
57                 feature "quartz" "Include Quartz support for loading image files"
58                 {
59                         default "yes";
60                 };
61                 if_feature "quartz"
62                 {
63                         build_info
64                         {
65                                 library "ApplicationServices.framework";
66                         };
67                 };
68         };
69
70         feature "opengl" "Include support for OpenGL contexts"
71         {
72                 default "yes";
73         };
74         if_feature "opengl"
75         {
76                 if_arch "android"
77                 {
78                         require "opengles";
79                 };
80                 if_arch "!android"
81                 {
82                         require "opengl";
83                 };
84         };
85
86         if_arch "!windows & !darwin & !android"
87         {
88                 feature "xrandr" "Include support for video mode switching with XRandR"
89                 {
90                         export true;
91                 };
92                 if_feature "xrandr"
93                 {
94                         require "xrandr";
95                 };
96         };
97
98         library "mspgui"
99         {
100                 source "source/graphics";
101                 source "source/input";
102                 if_feature "libpng"
103                 {
104                         source "source/graphics/png";
105                 };
106                 if_feature "libjpeg"
107                 {
108                         source "source/graphics/jpeg";
109                 };
110                 if_feature "devil"
111                 {
112                         source "source/graphics/devil";
113                 };
114                 if_arch "linux"
115                 {
116                         overlay "linux";
117                 };
118                 if_arch "windows"
119                 {
120                         overlay "windows";
121                         if_feature "opengl"
122                         {
123                                 overlay "wgl";
124                         };
125                 };
126                 if_arch "darwin"
127                 {
128                         if_feature "quartz"
129                         {
130                                 source "source/graphics/quartz";
131                         };
132                         overlay "cocoa";
133                         if_feature "opengl"
134                         {
135                                 overlay "cgl";
136                         };
137                         build_info
138                         {
139                                 standard CC "c99";
140                         };
141                 };
142                 if_arch "android"
143                 {
144                         overlay "android";
145                         if_feature "opengl"
146                         {
147                                 overlay "egl_android";
148                         };
149                 };
150                 if_arch "!windows & !darwin & !android"
151                 {
152                         overlay "x11";
153                         if_feature "opengl"
154                         {
155                                 overlay "glx";
156                         };
157                 };
158                 overlay "generic";
159                 install true;
160                 install_map
161                 {
162                         map "source" "include/msp";
163                 };
164         };
165
166         program "ev"
167         {
168                 source "examples/ev.cpp";
169                 use "mspgui";
170         };
171
172         source_tarball
173         {
174                 source "License.txt";
175                 source "Changelog.txt";
176         };
177 };