blob: 7438babe5967021f9d16b30d5ab3411c256e71ab [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',
epoger@google.comae85aea2011-05-31 13:50:51 +0000130 '../src/core',
131 '../include/gpu',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000132 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +0000133 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000134 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000135 'angle.gyp:*',
136 ],
137 'export_dependent_settings': [
138 'angle.gyp:*',
139 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000140 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000141 '<@(skgr_sources)',
142 '<@(skgr_native_gl_sources)',
143 '<@(skgr_angle_gl_sources)',
144 '<@(skgr_mesa_gl_sources)',
145 '<@(skgr_debug_gl_sources)',
146 '<@(skgr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000147 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000148 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000149 'conditions': [
150 [ 'not skia_mesa', {
151 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000152 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000153 ],
154 }],
155 [ 'skia_mesa and skia_os == "mac"', {
156 'include_dirs': [
157 '$(SDKROOT)/usr/X11/include/',
158 ],
159 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000160 [ 'not skia_angle', {
161 'sources!': [
162 '../include/gpu/gl/SkANGLEGLContext.h',
163 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
164 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
165 ],
166 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000167 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000168 },
169 {
170 'target_name': 'gr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000171 'product_name': 'skia_gr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000172 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000173 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000174 'includes': [
175 'gpu.gypi',
176 ],
177 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +0000178 '../include/core',
179 '../include/config',
bsalomon@google.comd38f1372011-10-12 19:53:16 +0000180 '../include/gpu',
bsalomon@google.com150d2842012-01-12 20:19:56 +0000181 '../src/core', # SkRasterClip.h
tomhudson@google.comd8f856c2012-05-10 12:13:36 +0000182 '../src/gpu'
epoger@google.comae85aea2011-05-31 13:50:51 +0000183 ],
184 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000185 'angle.gyp:*',
186 ],
187 'export_dependent_settings': [
188 'angle.gyp:*',
epoger@google.comae85aea2011-05-31 13:50:51 +0000189 ],
190 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000191 '<@(gr_sources)',
192 '<@(gr_native_gl_sources)',
rmistry@google.comd6176b02012-08-23 18:14:13 +0000193 '<@(gr_angle_gl_sources)',
bsalomon@google.com20806352012-08-23 12:55:01 +0000194 '<@(gr_mesa_gl_sources)',
195 '<@(gr_debug_gl_sources)',
196 '<@(gr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000197 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000198 ],
199 'defines': [
200 'GR_IMPLEMENTATION=1',
201 ],
202 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000203 [ 'skia_nv_path_rendering', {
204 'defines': [
205 'GR_GL_USE_NV_PATH_RENDERING=1',
206 ],
207 }],
sugoi@google.come3453cb2013-01-07 14:26:40 +0000208 [ 'skia_stroke_path_rendering', {
209 'sources': [
210 '../experimental/StrokePathRenderer/GrStrokePathRenderer.h',
211 '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp',
212 ],
213 'defines': [
214 'GR_STROKE_PATH_RENDERING=1',
215 ],
216 }],
jvanverth@google.com74dda902013-01-09 21:04:52 +0000217 [ 'skia_android_path_rendering', {
218 'sources': [
219 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp',
220 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h',
221 '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp',
222 '../experimental/AndroidPathRenderer/AndroidPathRenderer.h',
223 '../experimental/AndroidPathRenderer/Vertex.h',
224 ],
225 'defines': [
226 'GR_ANDROID_PATH_RENDERING=1',
227 ],
228 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000229 [ 'skia_os == "linux"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000230 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000231 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
232 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000233 ],
234 'link_settings': {
235 'libraries': [
236 '-lGL',
borenet@google.com7158e6a2012-11-01 17:43:44 +0000237 '-lGLU',
senorblanco@chromium.org0d923532012-11-12 20:55:02 +0000238 '-lX11',
epoger@google.comae85aea2011-05-31 13:50:51 +0000239 ],
240 },
241 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000242 [ 'skia_os == "nacl"', {
243 'link_settings': {
244 'libraries': [
245 '-lppapi_gles2',
246 ],
247 },
248 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000249 [ 'skia_mesa and skia_os == "linux"', {
250 'link_settings': {
251 'libraries': [
252 '-lOSMesa',
253 ],
254 },
255 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000256 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000257 'link_settings': {
258 'libraries': [
259 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
260 ],
261 },
262 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000263 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
264 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000265 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000266 }],
267 [ 'skia_mesa and skia_os == "mac"', {
268 'link_settings': {
269 'libraries': [
270 '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib',
271 ],
272 },
273 'include_dirs': [
274 '$(SDKROOT)/usr/X11/include/',
275 ],
276 }],
277 [ 'not skia_mesa', {
278 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000279 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000280 ],
281 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000282 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000283 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000284 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
285 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000286 ],
287 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000288 [ 'not skia_angle', {
289 'sources!': [
290 '../include/gpu/gl/SkANGLEGLContext.h',
291
292 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
293 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
294 ],
295 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000296 [ 'skia_os == "android"', {
297 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000298 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
299 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000300 ],
301 'link_settings': {
302 'libraries': [
303 '-lGLESv2',
304 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000305 ],
306 },
307 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000308 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000309 },
310 ],
311}
312
313# Local Variables:
314# tab-width:2
315# indent-tabs-mode:nil
316# End:
317# vim: set expandtab tabstop=2 shiftwidth=2: