blob: 6c599e162a12f49c406bec89ded9679d555220f5 [file] [log] [blame]
epoger@google.comae85aea2011-05-31 13:50:51 +00001{
bsalomon@google.come2953132011-10-13 13:33:08 +00002 'target_defaults': {
3 'conditions': [
4 ['skia_os != "win"', {
5 'sources/': [ ['exclude', '_win.(h|cpp)$'],
6 ],
7 }],
8 ['skia_os != "mac"', {
bsalomon@google.com2b64f842012-10-02 15:25:12 +00009 'sources/': [ ['exclude', '_mac.(h|cpp|m|mm)$'],
bsalomon@google.come2953132011-10-13 13:33:08 +000010 ],
11 }],
12 ['skia_os != "linux"', {
13 'sources/': [ ['exclude', '_unix.(h|cpp)$'],
14 ],
15 }],
16 ['skia_os != "ios"', {
bsalomon@google.com2b64f842012-10-02 15:25:12 +000017 'sources/': [ ['exclude', '_iOS.(h|cpp|m|mm)$'],
bsalomon@google.come2953132011-10-13 13:33:08 +000018 ],
19 }],
20 ['skia_os != "android"', {
21 'sources/': [ ['exclude', '_android.(h|cpp)$'],
22 ],
23 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +000024 ['skia_os != "nacl"', {
25 'sources/': [ ['exclude', '_nacl.(h|cpp)$'],
26 ],
27 }],
bsalomon@google.come2953132011-10-13 13:33:08 +000028 [ 'skia_os == "android"', {
29 'defines': [
30 'GR_ANDROID_BUILD=1',
31 ],
32 }],
33 [ 'skia_os == "mac"', {
34 'defines': [
35 'GR_MAC_BUILD=1',
36 ],
37 }],
38 [ 'skia_os == "linux"', {
39 'defines': [
40 'GR_LINUX_BUILD=1',
41 ],
42 }],
43 [ 'skia_os == "ios"', {
44 'defines': [
45 'GR_IOS_BUILD=1',
46 ],
47 }],
48 [ 'skia_os == "win"', {
49 'defines': [
50 'GR_WIN32_BUILD=1',
bsalomon@google.come2953132011-10-13 13:33:08 +000051 ],
52 }],
bsalomon@google.comcf8fb1f2012-08-02 14:03:32 +000053 # nullify the targets in this gyp file if skia_gpu is 0
54 [ 'skia_gpu == 0', {
55 'sources/': [
56 ['exclude', '.*'],
57 ],
58 'defines/': [
59 ['exclude', '.*'],
60 ],
61 'include_dirs/': [
62 ['exclude', '.*'],
63 ],
64 'link_settings': {
65 'libraries/': [
66 ['exclude', '.*'],
67 ],
68 },
69 'direct_dependent_settings': {
70 'defines/': [
71 ['exclude', '.*'],
72 ],
73 'include_dirs/': [
74 ['exclude', '.*'],
75 ],
76 },
77 }],
djsollen@google.com42041e62012-10-29 19:24:45 +000078 [ 'skia_texture_cache_mb_limit != 0', {
79 'defines': [
80 'GR_DEFAULT_TEXTURE_CACHE_MB_LIMIT=<(skia_texture_cache_mb_limit)',
81 ],
82 }],
bsalomon@google.come2953132011-10-13 13:33:08 +000083 ],
84 'direct_dependent_settings': {
85 'conditions': [
86 [ 'skia_os == "android"', {
87 'defines': [
88 'GR_ANDROID_BUILD=1',
89 ],
90 }],
91 [ 'skia_os == "mac"', {
92 'defines': [
93 'GR_MAC_BUILD=1',
94 ],
95 }],
96 [ 'skia_os == "linux"', {
97 'defines': [
98 'GR_LINUX_BUILD=1',
99 ],
100 }],
101 [ 'skia_os == "ios"', {
102 'defines': [
103 'GR_IOS_BUILD=1',
104 ],
105 }],
106 [ 'skia_os == "win"', {
107 'defines': [
108 'GR_WIN32_BUILD=1',
109 'GR_GL_FUNCTION_TYPE=__stdcall',
110 ],
111 }],
112 ],
113 'include_dirs': [
114 '../include/gpu',
115 ],
116 },
117 },
epoger@google.comae85aea2011-05-31 13:50:51 +0000118 'targets': [
119 {
120 'target_name': 'skgr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000121 'product_name': 'skia_skgr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000122 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000123 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000124 'includes': [
125 'gpu.gypi',
126 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000127 'include_dirs': [
bungeman@google.com5a64e582012-03-29 14:51:56 +0000128 '../include/config',
129 '../include/core',
humper@google.com7af56be2013-01-14 18:49:19 +0000130 '../include/utils',
epoger@google.comae85aea2011-05-31 13:50:51 +0000131 '../src/core',
132 '../include/gpu',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000133 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +0000134 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000135 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000136 'angle.gyp:*',
137 ],
138 'export_dependent_settings': [
139 'angle.gyp:*',
140 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000141 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000142 '<@(skgr_sources)',
143 '<@(skgr_native_gl_sources)',
144 '<@(skgr_angle_gl_sources)',
145 '<@(skgr_mesa_gl_sources)',
146 '<@(skgr_debug_gl_sources)',
147 '<@(skgr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000148 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000149 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000150 'conditions': [
151 [ 'not skia_mesa', {
152 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000153 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000154 ],
155 }],
156 [ 'skia_mesa and skia_os == "mac"', {
157 'include_dirs': [
158 '$(SDKROOT)/usr/X11/include/',
159 ],
160 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000161 [ 'not skia_angle', {
162 'sources!': [
163 '../include/gpu/gl/SkANGLEGLContext.h',
164 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
165 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
166 ],
167 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000168 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000169 },
170 {
171 'target_name': 'gr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000172 'product_name': 'skia_gr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000173 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000174 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000175 'includes': [
176 'gpu.gypi',
177 ],
178 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +0000179 '../include/core',
180 '../include/config',
humper@google.com7af56be2013-01-14 18:49:19 +0000181 '../include/utils',
bsalomon@google.comd38f1372011-10-12 19:53:16 +0000182 '../include/gpu',
bsalomon@google.com150d2842012-01-12 20:19:56 +0000183 '../src/core', # SkRasterClip.h
tomhudson@google.comd8f856c2012-05-10 12:13:36 +0000184 '../src/gpu'
epoger@google.comae85aea2011-05-31 13:50:51 +0000185 ],
186 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000187 'angle.gyp:*',
188 ],
189 'export_dependent_settings': [
190 'angle.gyp:*',
epoger@google.comae85aea2011-05-31 13:50:51 +0000191 ],
192 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000193 '<@(gr_sources)',
194 '<@(gr_native_gl_sources)',
rmistry@google.comd6176b02012-08-23 18:14:13 +0000195 '<@(gr_angle_gl_sources)',
bsalomon@google.com20806352012-08-23 12:55:01 +0000196 '<@(gr_mesa_gl_sources)',
197 '<@(gr_debug_gl_sources)',
198 '<@(gr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000199 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000200 ],
201 'defines': [
202 'GR_IMPLEMENTATION=1',
203 ],
204 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000205 [ 'skia_nv_path_rendering', {
206 'defines': [
207 'GR_GL_USE_NV_PATH_RENDERING=1',
208 ],
209 }],
sugoi@google.come3453cb2013-01-07 14:26:40 +0000210 [ 'skia_stroke_path_rendering', {
211 'sources': [
212 '../experimental/StrokePathRenderer/GrStrokePathRenderer.h',
213 '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp',
214 ],
215 'defines': [
216 'GR_STROKE_PATH_RENDERING=1',
217 ],
218 }],
jvanverth@google.com74dda902013-01-09 21:04:52 +0000219 [ 'skia_android_path_rendering', {
220 'sources': [
221 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp',
222 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h',
223 '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp',
224 '../experimental/AndroidPathRenderer/AndroidPathRenderer.h',
225 '../experimental/AndroidPathRenderer/Vertex.h',
226 ],
227 'defines': [
228 'GR_ANDROID_PATH_RENDERING=1',
229 ],
230 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000231 [ 'skia_os == "linux"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000232 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000233 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
234 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000235 ],
236 'link_settings': {
237 'libraries': [
238 '-lGL',
borenet@google.com7158e6a2012-11-01 17:43:44 +0000239 '-lGLU',
senorblanco@chromium.org0d923532012-11-12 20:55:02 +0000240 '-lX11',
epoger@google.comae85aea2011-05-31 13:50:51 +0000241 ],
242 },
243 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000244 [ 'skia_os == "nacl"', {
245 'link_settings': {
246 'libraries': [
247 '-lppapi_gles2',
248 ],
249 },
250 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000251 [ 'skia_mesa and skia_os == "linux"', {
252 'link_settings': {
253 'libraries': [
254 '-lOSMesa',
255 ],
256 },
257 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000258 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000259 'link_settings': {
260 'libraries': [
261 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
262 ],
263 },
264 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000265 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
266 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000267 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000268 }],
269 [ 'skia_mesa and skia_os == "mac"', {
270 'link_settings': {
271 'libraries': [
272 '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib',
273 ],
274 },
275 'include_dirs': [
276 '$(SDKROOT)/usr/X11/include/',
277 ],
278 }],
279 [ 'not skia_mesa', {
280 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000281 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000282 ],
283 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000284 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000285 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000286 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
287 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000288 ],
289 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000290 [ 'not skia_angle', {
291 'sources!': [
292 '../include/gpu/gl/SkANGLEGLContext.h',
293
294 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
295 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
296 ],
297 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000298 [ 'skia_os == "android"', {
299 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000300 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
301 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000302 ],
303 'link_settings': {
304 'libraries': [
305 '-lGLESv2',
306 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000307 ],
308 },
309 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000310 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000311 },
312 ],
313}
314
315# Local Variables:
316# tab-width:2
317# indent-tabs-mode:nil
318# End:
319# vim: set expandtab tabstop=2 shiftwidth=2: