blob: 969a6b45dfbc1894fc3d013542806e45fc16acfe [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 {
mtklein2f2903d2015-11-18 11:06:37 -080062 'target_name': 'dump_record',
63 'type': 'executable',
64 'sources': [
65 '../tools/dump_record.cpp',
66 '../tools/DumpRecord.cpp',
67 ],
68 'include_dirs': [
69 '../include/private',
70 '../src/core',
71 ],
72 'dependencies': [
73 'flags.gyp:flags',
mtklein2f2903d2015-11-18 11:06:37 -080074 'skia_lib.gyp:skia_lib',
75 ],
76 },
77 {
mtklein7e602c22016-07-11 11:27:30 -070078 'target_name': 'monobench',
79 'type': 'executable',
80 'dependencies': [
81 'flags.gyp:flags',
82 'flags.gyp:flags_common',
83 'resources',
84 'skia_lib.gyp:skia_lib',
85 'timer',
86 'pdf.gyp:pdf',
87 'tools.gyp:sk_tool_utils',
88 ],
89 'include_dirs': [
90 '../bench',
91 '../include/private',
92 '../src/core',
93 '../src/effects',
94 '../src/effects/gradients',
95 '../src/image',
96 '../src/gpu',
97 '../src/pdf',
98 '../src/utils',
99 ],
100 'sources': [
101 '../tools/monobench.cpp',
102 '../bench/Benchmark.cpp',
mtkleinada5a442016-08-02 14:28:26 -0700103 '<!@(python find.py "*Bench.cpp" ../bench)',
mtklein7e602c22016-07-11 11:27:30 -0700104 ],
105 'sources!': [
106 '../bench/GMBench.cpp',
107 ],
108 },
109 {
caryclark7da2e552015-05-12 08:36:48 -0700110 'target_name': 'chrome_fuzz',
111 'type': 'executable',
112 'sources': [
113 '../tools/chrome_fuzz.cpp',
114 ],
115 'dependencies': [
116 'skia_lib.gyp:skia_lib',
117 ],
118 },
119 {
mtklein9ac68ee2014-06-20 11:29:20 -0700120 'target_name': 'crash_handler',
121 'type': 'static_library',
122 'sources': [ '../tools/CrashHandler.cpp' ],
123 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
124 'direct_dependent_settings': {
125 'include_dirs': [ '../tools' ],
126 },
scroggoac928f22015-02-10 08:13:26 -0800127 'conditions': [
128 [ 'skia_is_bot', {
129 'defines': [ 'SK_CRASH_HANDLER' ],
130 }],
131 ],
132
mtklein9ac68ee2014-06-20 11:29:20 -0700133 'all_dependent_settings': {
134 'msvs_settings': {
135 'VCLinkerTool': {
136 'AdditionalDependencies': [ 'Dbghelp.lib' ],
137 }
138 },
139 }
140 },
141 {
142 'target_name': 'resources',
143 'type': 'static_library',
144 'sources': [ '../tools/Resources.cpp' ],
145 'dependencies': [
146 'flags.gyp:flags',
147 'skia_lib.gyp:skia_lib',
148 ],
149 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -0700150 'include_dirs': [ '../tools', ],
151 },
152 },
153 {
154 'target_name': 'sk_tool_utils',
155 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -0700156 'sources': [
157 '../tools/sk_tool_utils.cpp',
158 '../tools/sk_tool_utils_font.cpp',
caryclarkf1d41512016-02-09 10:30:22 -0800159 '../tools/random_parse_path.cpp',
caryclark5fb6bd42014-06-23 11:25:00 -0700160 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400161 'include_dirs': [
herb62a69c22015-09-29 11:47:45 -0700162 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400163 '../src/fonts',
robertphillips2f0dbc72015-08-20 05:15:06 -0700164 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400165 ],
tfarina20108912014-06-21 10:54:17 -0700166 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700167 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400168 'flags.gyp:flags',
fmalitafb4b9a22016-10-31 07:22:24 -0700169 'flags.gyp:flags_common',
tfarina20108912014-06-21 10:54:17 -0700170 'skia_lib.gyp:skia_lib',
171 ],
172 'direct_dependent_settings': {
173 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700174 },
175 },
176 {
177 'target_name' : 'timer',
178 'type': 'static_library',
mtklein33eefcd2015-10-23 07:02:06 -0700179 'sources': [ '../tools/timer/Timer.cpp' ],
mtklein9ac68ee2014-06-20 11:29:20 -0700180 'direct_dependent_settings': {
181 'include_dirs': ['../tools/timer'],
182 },
mtklein33eefcd2015-10-23 07:02:06 -0700183 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
mtklein9ac68ee2014-06-20 11:29:20 -0700184 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000185 {
186 'target_name': 'skdiff',
187 'type': 'executable',
188 'sources': [
bungemanfe917272016-10-13 17:36:40 -0400189 '../tools/skdiff/skdiff.cpp',
190 '../tools/skdiff/skdiff.h',
191 '../tools/skdiff/skdiff_html.cpp',
192 '../tools/skdiff/skdiff_html.h',
193 '../tools/skdiff/skdiff_main.cpp',
194 '../tools/skdiff/skdiff_utils.cpp',
195 '../tools/skdiff/skdiff_utils.h',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000196 ],
197 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000198 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000199 ],
200 },
201 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000202 'target_name': 'skpmaker',
203 'type': 'executable',
204 'sources': [
205 '../tools/skpmaker.cpp',
206 ],
207 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700208 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000209 '../src/core',
210 ],
211 'dependencies': [
212 'flags.gyp:flags',
213 'skia_lib.gyp:skia_lib',
214 ],
215 },
216 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000217 'target_name': 'skimagediff',
218 'type': 'executable',
219 'sources': [
bungemanfe917272016-10-13 17:36:40 -0400220 '../tools/skdiff/skdiff.cpp',
221 '../tools/skdiff/skdiff.h',
222 '../tools/skdiff/skdiff_html.cpp',
223 '../tools/skdiff/skdiff_html.h',
224 '../tools/skdiff/skdiff_image.cpp',
225 '../tools/skdiff/skdiff_utils.cpp',
226 '../tools/skdiff/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000227 ],
228 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000229 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000230 ],
231 },
232 {
233 'target_name': 'skhello',
234 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000235 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700236 'flags.gyp:flags',
237 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000238 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000239 ],
borenet48087572015-04-02 12:16:36 -0700240 'sources': [
241 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000242 ],
243 },
244 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000245 'target_name': 'skpinfo',
246 'type': 'executable',
247 'sources': [
248 '../tools/skpinfo.cpp',
249 ],
250 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700251 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000252 '../src/core/',
253 ],
254 'dependencies': [
255 'flags.gyp:flags',
256 'skia_lib.gyp:skia_lib',
257 ],
258 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000259 {
robertphillips9c4909b2015-10-19 06:39:17 -0700260 'target_name': 'imgblur',
261 'type': 'executable',
262 'sources': [
263 '../tools/imgblur.cpp',
264 ],
265 'include_dirs': [
266 '../include/core',
267 ],
268 'dependencies': [
269 'flags.gyp:flags',
270 'flags.gyp:flags_common',
271 'skia_lib.gyp:skia_lib',
272 'tools.gyp:sk_tool_utils',
273 ],
274 },
275 {
robertphillips5ce341f2015-09-18 09:04:43 -0700276 'target_name': 'imgslice',
277 'type': 'executable',
278 'sources': [
279 '../tools/imgslice.cpp',
280 ],
281 'include_dirs': [
282 '../include/core',
283 ],
284 'dependencies': [
285 'flags.gyp:flags',
286 'skia_lib.gyp:skia_lib',
287 ],
288 },
289 {
msarett6a738212016-03-04 13:27:35 -0800290 'target_name': 'get_images_from_skps',
291 'type': 'executable',
292 'sources': [
293 '../tools/get_images_from_skps.cpp',
294 ],
295 'include_dirs': [
296 '../src/core',
297 '../include/private',
298 ],
299 'dependencies': [
300 'flags.gyp:flags',
rmistry8d965a62016-04-25 10:35:03 -0700301 'jsoncpp.gyp:jsoncpp',
msarett6a738212016-03-04 13:27:35 -0800302 'skia_lib.gyp:skia_lib',
303 ],
msarett3478f752016-02-12 14:47:09 -0800304 },
305 {
brianosman6373c952016-07-12 15:06:24 -0700306 'target_name': 'get_current_monitor_profile',
307 'type': 'executable',
308 'sources': [
309 '../tools/get_current_monitor_profile.cpp',
310 ],
311 'include_dirs': [
312 '../src/core',
313 '../include/private',
314 ],
315 'dependencies': [
316 'flags.gyp:flags',
317 'skia_lib.gyp:skia_lib',
318 ],
319 },
320 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000321 'target_name': 'gpuveto',
322 'type': 'executable',
323 'sources': [
324 '../tools/gpuveto.cpp',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000325 ],
326 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700327 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000328 '../src/core/',
329 '../src/images',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000330 ],
331 'dependencies': [
332 'flags.gyp:flags',
333 'skia_lib.gyp:skia_lib',
334 ],
335 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000336 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000337 'target_name': 'lua_app',
338 'type': 'executable',
339 'sources': [
340 '../tools/lua/lua_app.cpp',
341 '../src/utils/SkLua.cpp',
342 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000343 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700344 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000345 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
346 '../src/gpu/',
347 '../src/core/',
348 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000349 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000350 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000351 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000352 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000353 'pdf.gyp:pdf',
354 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000355 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000356 ],
357 },
358 {
reed@google.comdff7e112013-05-15 19:34:20 +0000359 'target_name': 'lua_pictures',
360 'type': 'executable',
361 'sources': [
362 '../tools/lua/lua_pictures.cpp',
363 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000364 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000365 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000366 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700367 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000368 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
369 '../src/gpu/',
370 '../src/core/',
371 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000372 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000373 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000374 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000375 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000376 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000377 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000378 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000379 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000380 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000381 ],
382 },
383 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000384 'target_name': 'picture_utils',
385 'type': 'static_library',
386 'sources': [
387 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000388 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000389 ],
halcanary90602132016-04-20 08:49:53 -0700390 'include_dirs': [
Mike Klein2ad208d2016-11-14 18:05:16 -0500391 '../include/private',
brianosman3c579dc2016-04-19 09:18:11 -0700392 '../src/core/',
393 ],
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000394 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000395 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000396 ],
reed@google.come52d2912013-05-15 20:01:07 +0000397 'direct_dependent_settings': {
398 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700399 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000400 ],
401 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000402 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000403 {
404 'target_name': 'pinspect',
405 'type': 'executable',
406 'sources': [
407 '../tools/pinspect.cpp',
408 ],
409 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000410 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000411 'skia_lib.gyp:skia_lib',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000412 ],
413 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000414 {
mtkleinafb43792014-08-19 15:55:55 -0700415 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700416 'type': 'static_library',
417 'sources': [
418 '../tools/ProcStats.h',
419 '../tools/ProcStats.cpp',
420 ],
421 'direct_dependent_settings': {
422 'include_dirs': [ '../tools', ],
423 },
mtklein25c81d42016-07-27 13:55:26 -0700424 'dependencies': [
425 'skia_lib.gyp:skia_lib',
426 ],
halcanary0d154ee2014-08-11 11:33:51 -0700427 },
djsollen0b17d6c2014-11-13 12:52:35 -0800428 {
joshualittcdad12f2016-02-08 07:08:21 -0800429 'target_name': 'url_data_manager',
430 'type': 'static_library',
431 'sources': [
432 '../tools/UrlDataManager.h',
433 '../tools/UrlDataManager.cpp',
434 ],
435 'dependencies': [
436 'skia_lib.gyp:skia_lib',
437 ],
438 'include_dirs': [
439 '../include/private',
440 '../src/core',
441 ],
442 'direct_dependent_settings': {
443 'include_dirs': [
444 '../include/private',
mtklein2d225e32016-02-29 09:05:32 -0800445 '../tools',
joshualittcdad12f2016-02-08 07:08:21 -0800446 ],
447 },
448 },
449 {
halcanary00d44e02016-05-03 15:09:52 -0700450 'target_name': 'using_skia_and_harfbuzz',
451 'type': 'executable',
halcanary13cba492016-08-03 10:43:55 -0700452 'sources': [ '../tools/using_skia_and_harfbuzz.cpp', ],
453 'variables': { 'skia_example_use_harfbuzz%': 1, },
454 'conditions': [
455 [ 'skia_example_use_harfbuzz',
456 {
457 'dependencies': [ 'harfbuzz.gyp:harfbuzz', ],
458 'sources' : [ '../tools/SkShaper_harfbuzz.cpp', ],
459 }, {
460 'sources' : [ '../tools/SkShaper_primitive.cpp', ],
461 },
462 ]
halcanary8a74f132016-07-11 14:30:39 -0700463 ],
halcanary00d44e02016-05-03 15:09:52 -0700464 'dependencies': [
465 'skia_lib.gyp:skia_lib',
466 'pdf.gyp:pdf',
halcanary00d44e02016-05-03 15:09:52 -0700467 ],
halcanary00d44e02016-05-03 15:09:52 -0700468 },
469 {
msarettaabe15e2016-05-13 07:32:59 -0700470 'target_name': 'visualize_color_gamut',
471 'type': 'executable',
472 'sources': [
Florin Malitafcfc4ba2016-11-14 14:29:00 -0500473 '../tools/colorspaceinfo.cpp',
msarettaabe15e2016-05-13 07:32:59 -0700474 ],
475 'include_dirs': [
476 '../src/core',
477 '../include/private',
478 '../tools',
479 ],
480 'dependencies': [
481 'flags.gyp:flags',
482 'resources',
483 'skia_lib.gyp:skia_lib',
484 ],
485 },
486 {
caryclark5ef194c2015-08-31 09:22:38 -0700487 'target_name': 'whitelist_typefaces',
488 'type': 'executable',
489 'sources': [
490 '../tools/whitelist_typefaces.cpp',
491 ],
492 'dependencies': [
493 'skia_lib.gyp:skia_lib',
494 ],
495 },
496 {
joshualitt3ebd0502016-02-09 07:18:08 -0800497 'target_name': 'thermal_manager',
498 'type': 'static_library',
499 'sources': [
500 '../tools/ThermalManager.cpp',
501 ],
502 'dependencies': [
503 'skia_lib.gyp:skia_lib',
504 ],
505 'direct_dependent_settings': {
506 'include_dirs': [ '../tools', ],
507 },
508 },
509 {
djsollen0b17d6c2014-11-13 12:52:35 -0800510 'target_name': 'test_public_includes',
511 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800512 # Ensure that our public headers don't have unused params so that clients
513 # (e.g. Android) that include us can build with these warnings enabled
514 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800515 'variables': {
516 'includes_to_test': [
msarett506e19a2015-11-13 06:11:09 -0800517 '<(skia_include_path)/android',
djsollen0b17d6c2014-11-13 12:52:35 -0800518 '<(skia_include_path)/c',
msarett33bee092015-11-11 12:43:07 -0800519 '<(skia_include_path)/codec',
djsollen0b17d6c2014-11-13 12:52:35 -0800520 '<(skia_include_path)/config',
521 '<(skia_include_path)/core',
522 '<(skia_include_path)/effects',
523 '<(skia_include_path)/gpu',
524 '<(skia_include_path)/images',
525 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800526 '<(skia_include_path)/ports',
djsollen0b17d6c2014-11-13 12:52:35 -0800527 '<(skia_include_path)/utils',
528 '<(skia_include_path)/views',
529 '<(skia_include_path)/xml',
530 ],
531 'paths_to_ignore': [
532 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
bungeman0b1de262015-06-17 07:55:59 -0700533 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800534 '<(skia_include_path)/ports/SkTypeface_mac.h',
535 '<(skia_include_path)/ports/SkTypeface_win.h',
536 '<(skia_include_path)/utils/ios',
537 '<(skia_include_path)/utils/mac',
538 '<(skia_include_path)/utils/win',
539 '<(skia_include_path)/utils/SkDebugUtils.h',
540 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800541 '<(skia_include_path)/views/SkOSWindow_iOS.h',
542 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800543 '<(skia_include_path)/views/SkOSWindow_SDL.h',
544 '<(skia_include_path)/views/SkOSWindow_Unix.h',
545 '<(skia_include_path)/views/SkOSWindow_Win.h',
546 '<(skia_include_path)/views/SkWindow.h',
Greg Daniel164a9f02016-02-22 09:56:40 -0500547 '<(skia_include_path)/gpu/vk',
djsollen0b17d6c2014-11-13 12:52:35 -0800548 ],
djsollen7c9c4a72016-03-30 08:28:02 -0700549 'output_file' : [
550 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
551 ],
djsollen0b17d6c2014-11-13 12:52:35 -0800552 },
553 'include_dirs': [
554 '<@(includes_to_test)',
555 ],
556 'sources': [
557 # unused_param_test.cpp is generated by the action below.
558 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
559 ],
560 'actions': [
561 {
562 'action_name': 'generate_includes_cpp',
563 'inputs': [
564 '../tools/generate_includes_cpp.py',
565 '<@(includes_to_test)',
djsollen0b17d6c2014-11-13 12:52:35 -0800566 ],
567 'outputs': [
djsollen7c9c4a72016-03-30 08:28:02 -0700568 '<@(output_file)',
569 # Force the script to always run so that we pick up when files have
570 # been deleted.
571 'filename_that_does_not_exists_but_forces_rebuild.txt',
djsollen0b17d6c2014-11-13 12:52:35 -0800572 ],
573 'action': ['python', '../tools/generate_includes_cpp.py',
574 '--ignore', '<(paths_to_ignore)',
djsollen7c9c4a72016-03-30 08:28:02 -0700575 '<@(output_file)', '<@(includes_to_test)'],
djsollen0b17d6c2014-11-13 12:52:35 -0800576 },
577 ],
578 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000579 ],
580 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000581 ['skia_shared_lib',
582 {
583 'targets': [
584 {
585 'target_name': 'sklua',
586 'product_name': 'skia',
587 'product_prefix': '',
588 'product_dir': '<(PRODUCT_DIR)/',
589 'type': 'shared_library',
590 'sources': [
591 '../src/utils/SkLuaCanvas.cpp',
592 '../src/utils/SkLua.cpp',
593 ],
594 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700595 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000596 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
597 '../src/gpu/',
598 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000599 '../third_party/lua/src/',
600 ],
601 'dependencies': [
602 'lua.gyp:lua',
603 'pdf.gyp:pdf',
604 'skia_lib.gyp:skia_lib',
605 ],
606 'conditions': [
607 ['skia_os != "win"',
608 {
609 'ldflags': [
610 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
611 ],
612 },
613 ],
614 ],
615 },
616 ],
617 },
618 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000619 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000620 {
621 'targets': [
622 {
623 'target_name': 'win_dbghelp',
624 'type': 'static_library',
625 'defines': [
626 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
627 ],
628 'sources': [
629 '../tools/win_dbghelp.h',
630 '../tools/win_dbghelp.cpp',
631 ],
632 },
633 ],
634 },
635 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000636 ['skia_os == "win"',
637 {
638 'targets': [
639 {
640 'target_name': 'win_lcid',
641 'type': 'executable',
642 'sources': [
643 '../tools/win_lcid.cpp',
644 ],
645 },
646 ],
647 },
648 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400649 ['skia_os == "mac"',
650 {
651 'targets': [
652 {
653 'target_name': 'create_test_font',
654 'type': 'executable',
655 'sources': [
656 '../tools/create_test_font.cpp',
657 ],
658 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700659 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400660 '../src/core',
661 ],
662 'dependencies': [
663 'flags.gyp:flags',
664 'skia_lib.gyp:skia_lib',
665 'resources',
666 ],
667 },
668 ],
669 },
670 ],
halcanary7e669542016-04-19 08:46:50 -0700671 ['skia_mesa and skia_os in ["linux", "mac"]',
halcanaryf0da1382016-04-18 11:50:07 -0700672 {
673 'targets': [
674 {
675 'target_name': 'fiddle_build_test',
676 'type': 'executable',
677 'sources': [
678 '../tools/fiddle/draw.cpp',
679 '../tools/fiddle/fiddle_main.cpp',
680 '../tools/fiddle/fiddle_main.h',
681 ],
682 'dependencies': [
683 'skia_lib.gyp:skia_lib',
684 'pdf.gyp:pdf',
halcanary90602132016-04-20 08:49:53 -0700685 'gputest.gyp:osmesa',
halcanaryf0da1382016-04-18 11:50:07 -0700686 ],
687 'defines': [ 'FIDDLE_BUILD_TEST' ],
halcanaryf0da1382016-04-18 11:50:07 -0700688 },
689 ],
690 },
691 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000692 ],
693}