blob: efd0242c0a1e6e3ce59fe452985191638f830b00 [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 }],
borenet@google.com05d550e2013-06-11 15:52:19 +000012 ['skia_os != "linux" and skia_os != "chromeos"', {
bsalomon@google.come2953132011-10-13 13:33:08 +000013 '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 }],
borenet@google.com05d550e2013-06-11 15:52:19 +000038 [ 'skia_os == "linux" or skia_os == "chromeos"', {
bsalomon@google.come2953132011-10-13 13:33:08 +000039 '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': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000158 '/opt/X11/include/',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000159 ],
160 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000161 [ 'not skia_angle', {
162 'sources!': [
djsollen@google.com403b90e2013-05-03 14:00:34 +0000163 '<@(skgr_angle_gl_sources)',
164 ],
165 'dependencies!': [
166 'angle.gyp:*',
167 ],
168 'export_dependent_settings!': [
169 'angle.gyp:*',
robertphillips@google.com021bce92012-04-02 20:42:26 +0000170 ],
171 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000172 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000173 },
174 {
175 'target_name': 'gr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000176 'product_name': 'skia_gr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000177 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000178 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000179 'includes': [
180 'gpu.gypi',
181 ],
182 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +0000183 '../include/core',
184 '../include/config',
humper@google.com7af56be2013-01-14 18:49:19 +0000185 '../include/utils',
bsalomon@google.comd38f1372011-10-12 19:53:16 +0000186 '../include/gpu',
bsalomon@google.com150d2842012-01-12 20:19:56 +0000187 '../src/core', # SkRasterClip.h
tomhudson@google.comd8f856c2012-05-10 12:13:36 +0000188 '../src/gpu'
epoger@google.comae85aea2011-05-31 13:50:51 +0000189 ],
190 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000191 'angle.gyp:*',
192 ],
193 'export_dependent_settings': [
194 'angle.gyp:*',
epoger@google.comae85aea2011-05-31 13:50:51 +0000195 ],
196 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000197 '<@(gr_sources)',
198 '<@(gr_native_gl_sources)',
rmistry@google.comd6176b02012-08-23 18:14:13 +0000199 '<@(gr_angle_gl_sources)',
bsalomon@google.com20806352012-08-23 12:55:01 +0000200 '<@(gr_mesa_gl_sources)',
201 '<@(gr_debug_gl_sources)',
202 '<@(gr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000203 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000204 ],
205 'defines': [
206 'GR_IMPLEMENTATION=1',
207 ],
208 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000209 [ 'skia_nv_path_rendering', {
210 'defines': [
211 'GR_GL_USE_NV_PATH_RENDERING=1',
212 ],
213 }],
sugoi@google.come3453cb2013-01-07 14:26:40 +0000214 [ 'skia_stroke_path_rendering', {
215 'sources': [
216 '../experimental/StrokePathRenderer/GrStrokePathRenderer.h',
217 '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp',
218 ],
219 'defines': [
220 'GR_STROKE_PATH_RENDERING=1',
221 ],
222 }],
jvanverth@google.com74dda902013-01-09 21:04:52 +0000223 [ 'skia_android_path_rendering', {
224 'sources': [
225 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp',
226 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h',
227 '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp',
228 '../experimental/AndroidPathRenderer/AndroidPathRenderer.h',
229 '../experimental/AndroidPathRenderer/Vertex.h',
230 ],
231 'defines': [
232 'GR_ANDROID_PATH_RENDERING=1',
233 ],
234 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000235 [ 'skia_os == "linux" or skia_os == "chromeos"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000236 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000237 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
238 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000239 ],
240 'link_settings': {
241 'libraries': [
242 '-lGL',
borenet@google.com7158e6a2012-11-01 17:43:44 +0000243 '-lGLU',
senorblanco@chromium.org0d923532012-11-12 20:55:02 +0000244 '-lX11',
epoger@google.comae85aea2011-05-31 13:50:51 +0000245 ],
246 },
247 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000248 [ 'skia_os == "nacl"', {
249 'link_settings': {
250 'libraries': [
251 '-lppapi_gles2',
252 ],
253 },
254 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000255 [ 'skia_mesa and skia_os == "linux"', {
256 'link_settings': {
257 'libraries': [
258 '-lOSMesa',
259 ],
260 },
261 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000262 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000263 'link_settings': {
264 'libraries': [
265 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
266 ],
267 },
268 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000269 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
270 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000271 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000272 }],
273 [ 'skia_mesa and skia_os == "mac"', {
274 'link_settings': {
275 'libraries': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000276 '/opt/X11/lib/libOSMesa.dylib',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000277 ],
278 },
279 'include_dirs': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000280 '/opt/X11/include/',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000281 ],
282 }],
283 [ 'not skia_mesa', {
284 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000285 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000286 ],
287 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000288 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000289 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000290 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
291 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000292 ],
293 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000294 [ 'not skia_angle', {
295 'sources!': [
djsollen@google.com403b90e2013-05-03 14:00:34 +0000296 '<@(gr_angle_gl_sources)',
297 ],
298 'dependencies!': [
299 'angle.gyp:*',
300 ],
301 'export_dependent_settings!': [
302 'angle.gyp:*',
robertphillips@google.com021bce92012-04-02 20:42:26 +0000303 ],
304 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000305 [ 'skia_os == "android"', {
306 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000307 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
308 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000309 ],
310 'link_settings': {
311 'libraries': [
312 '-lGLESv2',
313 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000314 ],
315 },
316 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000317 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000318 },
319 ],
320}
321
322# Local Variables:
323# tab-width:2
324# indent-tabs-mode:nil
325# End:
326# vim: set expandtab tabstop=2 shiftwidth=2: