blob: b41ecc484752f86326caeb27547370aa74c44107 [file] [log] [blame]
scroggo3e562272015-03-25 10:22:41 -07001# Copyright 2015 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
bsalomon3e791242014-12-17 13:43:13 -08005 # GYP file to build various tools.
epoger@google.comccdbd2c2011-06-02 14:38:23 +00006#
7# To build on Linux:
8# ./gyp_skia tools.gyp && make tools
9#
epoger@google.comccdbd2c2011-06-02 14:38:23 +000010{
11 'includes': [
12 'apptype_console.gypi',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000013 ],
14 'targets': [
15 {
16 # Build all executable targets defined below.
17 'target_name': 'tools',
18 'type': 'none',
19 'dependencies': [
caryclark7da2e552015-05-12 08:36:48 -070020 'chrome_fuzz',
mtklein2f2903d2015-11-18 11:06:37 -080021 'dump_record',
msarett3478f752016-02-12 14:47:09 -080022 'get_images_from_skps',
brianosman6373c952016-07-12 15:06:24 -070023 'get_current_monitor_profile',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +000024 'gpuveto',
robertphillips9c4909b2015-10-19 06:39:17 -070025 'imgblur',
robertphillips9c4909b2015-10-19 06:39:17 -070026 'imgslice',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000027 'lua_app',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000028 'lua_pictures',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000029 'pinspect',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000030 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000031 'skhello',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +000032 'skpinfo',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000033 'skpmaker',
djsollen0b17d6c2014-11-13 12:52:35 -080034 'test_public_includes',
halcanary00d44e02016-05-03 15:09:52 -070035 'using_skia_and_harfbuzz',
msarettaabe15e2016-05-13 07:32:59 -070036 'visualize_color_gamut',
caryclark5ef194c2015-08-31 09:22:38 -070037 'whitelist_typefaces',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000038 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000039 'conditions': [
halcanary63677f42016-04-18 12:42:05 -070040 ['skia_mesa and skia_os in ["linux", "mac"]',
41 { 'dependencies': [ 'fiddle_build_test' ] }
42 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000043 ['skia_shared_lib',
44 {
45 'dependencies': [
46 'sklua', # This can only be built if skia is built as a shared library
47 ],
48 },
49 ],
djsollen14d8fa02015-12-18 09:34:08 -080050 [ 'skia_os == "android"',
51 {
52 'dependencies': [
53 # Build this by default to catch compile errors more quickly, since
54 # the only other time this code is exercised in the android framework
55 'android_utils',
56 ],
57 },
58 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000059 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000060 },
mtklein9a0d6d62014-12-15 12:47:51 -080061 {
djsollen14d8fa02015-12-18 09:34:08 -080062 'target_name': 'android_utils',
63 'type': 'static_library',
64 'dependencies': [
65 'core.gyp:core',
66 ],
67 'sources': [
68 '../tools/android/SkAndroidSDKCanvas.h',
69 '../tools/android/SkAndroidSDKCanvas.cpp',
70 ],
71 'direct_dependent_settings': {
72 'include_dirs': [
73 '../tools/android',
74 ],
75 },
76 },
77 {
mtklein2f2903d2015-11-18 11:06:37 -080078 'target_name': 'dump_record',
79 'type': 'executable',
80 'sources': [
81 '../tools/dump_record.cpp',
82 '../tools/DumpRecord.cpp',
83 ],
84 'include_dirs': [
85 '../include/private',
86 '../src/core',
87 ],
88 'dependencies': [
89 'flags.gyp:flags',
mtklein2f2903d2015-11-18 11:06:37 -080090 'skia_lib.gyp:skia_lib',
91 ],
92 },
93 {
mtklein7e602c22016-07-11 11:27:30 -070094 'target_name': 'monobench',
95 'type': 'executable',
96 'dependencies': [
97 'flags.gyp:flags',
98 'flags.gyp:flags_common',
99 'resources',
100 'skia_lib.gyp:skia_lib',
101 'timer',
102 'pdf.gyp:pdf',
103 'tools.gyp:sk_tool_utils',
104 ],
105 'include_dirs': [
106 '../bench',
107 '../include/private',
108 '../src/core',
109 '../src/effects',
110 '../src/effects/gradients',
111 '../src/image',
112 '../src/gpu',
113 '../src/pdf',
114 '../src/utils',
115 ],
116 'sources': [
117 '../tools/monobench.cpp',
118 '../bench/Benchmark.cpp',
mtkleinada5a442016-08-02 14:28:26 -0700119 '<!@(python find.py "*Bench.cpp" ../bench)',
mtklein7e602c22016-07-11 11:27:30 -0700120 ],
121 'sources!': [
122 '../bench/GMBench.cpp',
123 ],
124 },
125 {
caryclark7da2e552015-05-12 08:36:48 -0700126 'target_name': 'chrome_fuzz',
127 'type': 'executable',
128 'sources': [
129 '../tools/chrome_fuzz.cpp',
130 ],
131 'dependencies': [
132 'skia_lib.gyp:skia_lib',
133 ],
134 },
135 {
mtklein9ac68ee2014-06-20 11:29:20 -0700136 'target_name': 'crash_handler',
137 'type': 'static_library',
138 'sources': [ '../tools/CrashHandler.cpp' ],
139 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
140 'direct_dependent_settings': {
141 'include_dirs': [ '../tools' ],
142 },
scroggoac928f22015-02-10 08:13:26 -0800143 'conditions': [
144 [ 'skia_is_bot', {
145 'defines': [ 'SK_CRASH_HANDLER' ],
146 }],
147 ],
148
mtklein9ac68ee2014-06-20 11:29:20 -0700149 'all_dependent_settings': {
150 'msvs_settings': {
151 'VCLinkerTool': {
152 'AdditionalDependencies': [ 'Dbghelp.lib' ],
153 }
154 },
155 }
156 },
157 {
158 'target_name': 'resources',
159 'type': 'static_library',
160 'sources': [ '../tools/Resources.cpp' ],
161 'dependencies': [
162 'flags.gyp:flags',
163 'skia_lib.gyp:skia_lib',
164 ],
165 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -0700166 'include_dirs': [ '../tools', ],
167 },
168 },
169 {
170 'target_name': 'sk_tool_utils',
171 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -0700172 'sources': [
173 '../tools/sk_tool_utils.cpp',
174 '../tools/sk_tool_utils_font.cpp',
caryclarkf1d41512016-02-09 10:30:22 -0800175 '../tools/random_parse_path.cpp',
caryclark5fb6bd42014-06-23 11:25:00 -0700176 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400177 'include_dirs': [
herb62a69c22015-09-29 11:47:45 -0700178 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400179 '../src/fonts',
robertphillips2f0dbc72015-08-20 05:15:06 -0700180 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400181 ],
tfarina20108912014-06-21 10:54:17 -0700182 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700183 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400184 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700185 'skia_lib.gyp:skia_lib',
186 ],
187 'direct_dependent_settings': {
188 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700189 },
190 },
191 {
192 'target_name' : 'timer',
193 'type': 'static_library',
mtklein33eefcd2015-10-23 07:02:06 -0700194 'sources': [ '../tools/timer/Timer.cpp' ],
mtklein9ac68ee2014-06-20 11:29:20 -0700195 'direct_dependent_settings': {
196 'include_dirs': ['../tools/timer'],
197 },
mtklein33eefcd2015-10-23 07:02:06 -0700198 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
mtklein9ac68ee2014-06-20 11:29:20 -0700199 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000200 {
201 'target_name': 'skdiff',
202 'type': 'executable',
203 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000204 '../tools/skdiff.cpp',
205 '../tools/skdiff.h',
206 '../tools/skdiff_html.cpp',
207 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000208 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000209 '../tools/skdiff_utils.cpp',
210 '../tools/skdiff_utils.h',
211 ],
212 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000213 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000214 ],
215 },
216 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000217 'target_name': 'skpmaker',
218 'type': 'executable',
219 'sources': [
220 '../tools/skpmaker.cpp',
221 ],
222 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700223 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000224 '../src/core',
225 ],
226 'dependencies': [
227 'flags.gyp:flags',
228 'skia_lib.gyp:skia_lib',
229 ],
230 },
231 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000232 'target_name': 'skimagediff',
233 'type': 'executable',
234 'sources': [
235 '../tools/skdiff.cpp',
236 '../tools/skdiff.h',
237 '../tools/skdiff_html.cpp',
238 '../tools/skdiff_html.h',
239 '../tools/skdiff_image.cpp',
240 '../tools/skdiff_utils.cpp',
241 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000242 ],
243 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000244 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000245 ],
246 },
247 {
248 'target_name': 'skhello',
249 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000250 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700251 'flags.gyp:flags',
252 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000253 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000254 ],
borenet48087572015-04-02 12:16:36 -0700255 'sources': [
256 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000257 ],
258 },
259 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000260 'target_name': 'skpinfo',
261 'type': 'executable',
262 'sources': [
263 '../tools/skpinfo.cpp',
264 ],
265 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700266 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000267 '../src/core/',
268 ],
269 'dependencies': [
270 'flags.gyp:flags',
271 'skia_lib.gyp:skia_lib',
272 ],
273 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000274 {
robertphillips9c4909b2015-10-19 06:39:17 -0700275 'target_name': 'imgblur',
276 'type': 'executable',
277 'sources': [
278 '../tools/imgblur.cpp',
279 ],
280 'include_dirs': [
281 '../include/core',
282 ],
283 'dependencies': [
284 'flags.gyp:flags',
285 'flags.gyp:flags_common',
286 'skia_lib.gyp:skia_lib',
287 'tools.gyp:sk_tool_utils',
288 ],
289 },
290 {
robertphillips5ce341f2015-09-18 09:04:43 -0700291 'target_name': 'imgslice',
292 'type': 'executable',
293 'sources': [
294 '../tools/imgslice.cpp',
295 ],
296 'include_dirs': [
297 '../include/core',
298 ],
299 'dependencies': [
300 'flags.gyp:flags',
301 'skia_lib.gyp:skia_lib',
302 ],
303 },
304 {
msarett6a738212016-03-04 13:27:35 -0800305 'target_name': 'get_images_from_skps',
306 'type': 'executable',
307 'sources': [
308 '../tools/get_images_from_skps.cpp',
309 ],
310 'include_dirs': [
311 '../src/core',
312 '../include/private',
313 ],
314 'dependencies': [
315 'flags.gyp:flags',
rmistry8d965a62016-04-25 10:35:03 -0700316 'jsoncpp.gyp:jsoncpp',
msarett6a738212016-03-04 13:27:35 -0800317 'skia_lib.gyp:skia_lib',
318 ],
msarett3478f752016-02-12 14:47:09 -0800319 },
320 {
brianosman6373c952016-07-12 15:06:24 -0700321 'target_name': 'get_current_monitor_profile',
322 'type': 'executable',
323 'sources': [
324 '../tools/get_current_monitor_profile.cpp',
325 ],
326 'include_dirs': [
327 '../src/core',
328 '../include/private',
329 ],
330 'dependencies': [
331 'flags.gyp:flags',
332 'skia_lib.gyp:skia_lib',
333 ],
334 },
335 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000336 'target_name': 'gpuveto',
337 'type': 'executable',
338 'sources': [
339 '../tools/gpuveto.cpp',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000340 ],
341 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700342 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000343 '../src/core/',
344 '../src/images',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000345 ],
346 'dependencies': [
347 'flags.gyp:flags',
348 'skia_lib.gyp:skia_lib',
349 ],
350 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000351 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000352 'target_name': 'lua_app',
353 'type': 'executable',
354 'sources': [
355 '../tools/lua/lua_app.cpp',
356 '../src/utils/SkLua.cpp',
357 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000358 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700359 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000360 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
361 '../src/gpu/',
362 '../src/core/',
363 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000364 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000365 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000366 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000367 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000368 'pdf.gyp:pdf',
369 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000370 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000371 ],
372 },
373 {
reed@google.comdff7e112013-05-15 19:34:20 +0000374 'target_name': 'lua_pictures',
375 'type': 'executable',
376 'sources': [
377 '../tools/lua/lua_pictures.cpp',
378 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000379 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000380 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000381 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700382 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000383 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
384 '../src/gpu/',
385 '../src/core/',
386 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000387 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000388 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000389 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000390 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000391 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000392 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000393 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000394 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000395 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000396 ],
397 },
398 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000399 'target_name': 'picture_utils',
400 'type': 'static_library',
401 'sources': [
402 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000403 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000404 ],
halcanary90602132016-04-20 08:49:53 -0700405 'include_dirs': [
brianosman3c579dc2016-04-19 09:18:11 -0700406 '../src/core/',
407 ],
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000408 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000409 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000410 ],
reed@google.come52d2912013-05-15 20:01:07 +0000411 'direct_dependent_settings': {
412 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700413 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000414 ],
415 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000416 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000417 {
418 'target_name': 'pinspect',
419 'type': 'executable',
420 'sources': [
421 '../tools/pinspect.cpp',
422 ],
423 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000424 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000425 'skia_lib.gyp:skia_lib',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000426 ],
427 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000428 {
mtkleinafb43792014-08-19 15:55:55 -0700429 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700430 'type': 'static_library',
431 'sources': [
432 '../tools/ProcStats.h',
433 '../tools/ProcStats.cpp',
434 ],
435 'direct_dependent_settings': {
436 'include_dirs': [ '../tools', ],
437 },
mtklein25c81d42016-07-27 13:55:26 -0700438 'dependencies': [
439 'skia_lib.gyp:skia_lib',
440 ],
halcanary0d154ee2014-08-11 11:33:51 -0700441 },
djsollen0b17d6c2014-11-13 12:52:35 -0800442 {
joshualittcdad12f2016-02-08 07:08:21 -0800443 'target_name': 'url_data_manager',
444 'type': 'static_library',
445 'sources': [
446 '../tools/UrlDataManager.h',
447 '../tools/UrlDataManager.cpp',
448 ],
449 'dependencies': [
450 'skia_lib.gyp:skia_lib',
451 ],
452 'include_dirs': [
453 '../include/private',
454 '../src/core',
455 ],
456 'direct_dependent_settings': {
457 'include_dirs': [
458 '../include/private',
mtklein2d225e32016-02-29 09:05:32 -0800459 '../tools',
joshualittcdad12f2016-02-08 07:08:21 -0800460 ],
461 },
462 },
463 {
halcanary00d44e02016-05-03 15:09:52 -0700464 'target_name': 'using_skia_and_harfbuzz',
465 'type': 'executable',
halcanary13cba492016-08-03 10:43:55 -0700466 'sources': [ '../tools/using_skia_and_harfbuzz.cpp', ],
467 'variables': { 'skia_example_use_harfbuzz%': 1, },
468 'conditions': [
469 [ 'skia_example_use_harfbuzz',
470 {
471 'dependencies': [ 'harfbuzz.gyp:harfbuzz', ],
472 'sources' : [ '../tools/SkShaper_harfbuzz.cpp', ],
473 }, {
474 'sources' : [ '../tools/SkShaper_primitive.cpp', ],
475 },
476 ]
halcanary8a74f132016-07-11 14:30:39 -0700477 ],
halcanary00d44e02016-05-03 15:09:52 -0700478 'dependencies': [
479 'skia_lib.gyp:skia_lib',
480 'pdf.gyp:pdf',
halcanary00d44e02016-05-03 15:09:52 -0700481 ],
halcanary00d44e02016-05-03 15:09:52 -0700482 },
483 {
msarettaabe15e2016-05-13 07:32:59 -0700484 'target_name': 'visualize_color_gamut',
485 'type': 'executable',
486 'sources': [
487 '../tools/visualize_color_gamut.cpp',
488 ],
489 'include_dirs': [
490 '../src/core',
491 '../include/private',
492 '../tools',
493 ],
494 'dependencies': [
495 'flags.gyp:flags',
496 'resources',
497 'skia_lib.gyp:skia_lib',
498 ],
499 },
500 {
caryclark5ef194c2015-08-31 09:22:38 -0700501 'target_name': 'whitelist_typefaces',
502 'type': 'executable',
503 'sources': [
504 '../tools/whitelist_typefaces.cpp',
505 ],
506 'dependencies': [
507 'skia_lib.gyp:skia_lib',
508 ],
509 },
510 {
joshualitt3ebd0502016-02-09 07:18:08 -0800511 'target_name': 'thermal_manager',
512 'type': 'static_library',
513 'sources': [
514 '../tools/ThermalManager.cpp',
515 ],
516 'dependencies': [
517 'skia_lib.gyp:skia_lib',
518 ],
519 'direct_dependent_settings': {
520 'include_dirs': [ '../tools', ],
521 },
522 },
523 {
djsollen0b17d6c2014-11-13 12:52:35 -0800524 'target_name': 'test_public_includes',
525 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800526 # Ensure that our public headers don't have unused params so that clients
527 # (e.g. Android) that include us can build with these warnings enabled
528 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800529 'variables': {
530 'includes_to_test': [
msarett506e19a2015-11-13 06:11:09 -0800531 '<(skia_include_path)/android',
djsollen0b17d6c2014-11-13 12:52:35 -0800532 '<(skia_include_path)/animator',
533 '<(skia_include_path)/c',
msarett33bee092015-11-11 12:43:07 -0800534 '<(skia_include_path)/codec',
djsollen0b17d6c2014-11-13 12:52:35 -0800535 '<(skia_include_path)/config',
536 '<(skia_include_path)/core',
537 '<(skia_include_path)/effects',
538 '<(skia_include_path)/gpu',
539 '<(skia_include_path)/images',
540 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800541 '<(skia_include_path)/ports',
djsollen0b17d6c2014-11-13 12:52:35 -0800542 '<(skia_include_path)/utils',
543 '<(skia_include_path)/views',
544 '<(skia_include_path)/xml',
545 ],
546 'paths_to_ignore': [
547 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
bungeman0b1de262015-06-17 07:55:59 -0700548 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800549 '<(skia_include_path)/ports/SkTypeface_mac.h',
550 '<(skia_include_path)/ports/SkTypeface_win.h',
551 '<(skia_include_path)/utils/ios',
552 '<(skia_include_path)/utils/mac',
553 '<(skia_include_path)/utils/win',
554 '<(skia_include_path)/utils/SkDebugUtils.h',
555 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800556 '<(skia_include_path)/views/SkOSWindow_iOS.h',
557 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800558 '<(skia_include_path)/views/SkOSWindow_SDL.h',
559 '<(skia_include_path)/views/SkOSWindow_Unix.h',
560 '<(skia_include_path)/views/SkOSWindow_Win.h',
561 '<(skia_include_path)/views/SkWindow.h',
Greg Daniel164a9f02016-02-22 09:56:40 -0500562 '<(skia_include_path)/gpu/vk',
djsollen0b17d6c2014-11-13 12:52:35 -0800563 ],
djsollen7c9c4a72016-03-30 08:28:02 -0700564 'output_file' : [
565 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
566 ],
djsollen0b17d6c2014-11-13 12:52:35 -0800567 },
568 'include_dirs': [
569 '<@(includes_to_test)',
570 ],
571 'sources': [
572 # unused_param_test.cpp is generated by the action below.
573 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
574 ],
575 'actions': [
576 {
577 'action_name': 'generate_includes_cpp',
578 'inputs': [
579 '../tools/generate_includes_cpp.py',
580 '<@(includes_to_test)',
djsollen0b17d6c2014-11-13 12:52:35 -0800581 ],
582 'outputs': [
djsollen7c9c4a72016-03-30 08:28:02 -0700583 '<@(output_file)',
584 # Force the script to always run so that we pick up when files have
585 # been deleted.
586 'filename_that_does_not_exists_but_forces_rebuild.txt',
djsollen0b17d6c2014-11-13 12:52:35 -0800587 ],
588 'action': ['python', '../tools/generate_includes_cpp.py',
589 '--ignore', '<(paths_to_ignore)',
djsollen7c9c4a72016-03-30 08:28:02 -0700590 '<@(output_file)', '<@(includes_to_test)'],
djsollen0b17d6c2014-11-13 12:52:35 -0800591 },
592 ],
593 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000594 ],
595 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000596 ['skia_shared_lib',
597 {
598 'targets': [
599 {
600 'target_name': 'sklua',
601 'product_name': 'skia',
602 'product_prefix': '',
603 'product_dir': '<(PRODUCT_DIR)/',
604 'type': 'shared_library',
605 'sources': [
606 '../src/utils/SkLuaCanvas.cpp',
607 '../src/utils/SkLua.cpp',
608 ],
609 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700610 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000611 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
612 '../src/gpu/',
613 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000614 '../third_party/lua/src/',
615 ],
616 'dependencies': [
617 'lua.gyp:lua',
618 'pdf.gyp:pdf',
619 'skia_lib.gyp:skia_lib',
620 ],
621 'conditions': [
622 ['skia_os != "win"',
623 {
624 'ldflags': [
625 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
626 ],
627 },
628 ],
629 ],
630 },
631 ],
632 },
633 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000634 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000635 {
636 'targets': [
637 {
638 'target_name': 'win_dbghelp',
639 'type': 'static_library',
640 'defines': [
641 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
642 ],
643 'sources': [
644 '../tools/win_dbghelp.h',
645 '../tools/win_dbghelp.cpp',
646 ],
647 },
648 ],
649 },
650 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000651 ['skia_os == "win"',
652 {
653 'targets': [
654 {
655 'target_name': 'win_lcid',
656 'type': 'executable',
657 'sources': [
658 '../tools/win_lcid.cpp',
659 ],
660 },
661 ],
662 },
663 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400664 ['skia_os == "mac"',
665 {
666 'targets': [
667 {
668 'target_name': 'create_test_font',
669 'type': 'executable',
670 'sources': [
671 '../tools/create_test_font.cpp',
672 ],
673 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700674 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400675 '../src/core',
676 ],
677 'dependencies': [
678 'flags.gyp:flags',
679 'skia_lib.gyp:skia_lib',
680 'resources',
681 ],
682 },
683 ],
684 },
685 ],
halcanary7e669542016-04-19 08:46:50 -0700686 ['skia_mesa and skia_os in ["linux", "mac"]',
halcanaryf0da1382016-04-18 11:50:07 -0700687 {
688 'targets': [
689 {
690 'target_name': 'fiddle_build_test',
691 'type': 'executable',
692 'sources': [
693 '../tools/fiddle/draw.cpp',
694 '../tools/fiddle/fiddle_main.cpp',
695 '../tools/fiddle/fiddle_main.h',
696 ],
697 'dependencies': [
698 'skia_lib.gyp:skia_lib',
699 'pdf.gyp:pdf',
halcanary90602132016-04-20 08:49:53 -0700700 'gputest.gyp:osmesa',
halcanaryf0da1382016-04-18 11:50:07 -0700701 ],
702 'defines': [ 'FIDDLE_BUILD_TEST' ],
halcanaryf0da1382016-04-18 11:50:07 -0700703 },
704 ],
705 },
706 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000707 ],
708}