blob: 8685570347a6d09be2870a9d8b3375baadbec69e [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': [
edisonn@google.com8ba9a832013-01-18 18:06:22 +000020 'bench_pictures',
msaretta5783ae2015-09-08 15:35:32 -070021 'bitmap_region_decoder',
caryclark7da2e552015-05-12 08:36:48 -070022 'chrome_fuzz',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +000023 'dump_record',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000024 'filter',
mtklein60c04752015-07-08 10:06:01 -070025 'flatten',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +000026 'gpuveto',
robertphillips9c4909b2015-10-19 06:39:17 -070027 'imgblur',
28 'imgconv',
29 'imgslice',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000030 'lua_app',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000031 'lua_pictures',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000032 'pinspect',
33 'render_pdfs',
34 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000035 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000036 'skhello',
fmalita93957f42015-01-30 09:03:29 -080037 'skp2svg',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000038 'skpdiff',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +000039 'skpinfo',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000040 'skpmaker',
halcanary@google.comfed30372013-10-04 12:46:45 +000041 'test_image_decoder',
djsollen0b17d6c2014-11-13 12:52:35 -080042 'test_public_includes',
caryclark5ef194c2015-08-31 09:22:38 -070043 'whitelist_typefaces',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000044 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000045 'conditions': [
46 ['skia_shared_lib',
47 {
48 'dependencies': [
49 'sklua', # This can only be built if skia is built as a shared library
50 ],
51 },
52 ],
53 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000054 },
mtklein9a0d6d62014-12-15 12:47:51 -080055 {
msaretta5783ae2015-09-08 15:35:32 -070056 'target_name': 'bitmap_region_decoder',
57 'type': 'static_library',
58 'sources': [
59 '../tools/SkBitmapRegionCanvas.cpp',
60 '../tools/SkBitmapRegionDecoderInterface.cpp',
61 '../tools/SkBitmapRegionSampler.cpp',
62 ],
63 'include_dirs': [
msarette6dd0042015-10-09 11:07:34 -070064 '../include/private',
65 '../src/codec',
msaretta5783ae2015-09-08 15:35:32 -070066 ],
67 'dependencies': [
68 'skia_lib.gyp:skia_lib',
69 ],
70 },
71 {
caryclark7da2e552015-05-12 08:36:48 -070072 'target_name': 'chrome_fuzz',
73 'type': 'executable',
74 'sources': [
75 '../tools/chrome_fuzz.cpp',
76 ],
77 'dependencies': [
78 'skia_lib.gyp:skia_lib',
79 ],
80 },
81 {
mtklein9ac68ee2014-06-20 11:29:20 -070082 'target_name': 'crash_handler',
83 'type': 'static_library',
84 'sources': [ '../tools/CrashHandler.cpp' ],
85 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
86 'direct_dependent_settings': {
87 'include_dirs': [ '../tools' ],
88 },
scroggoac928f22015-02-10 08:13:26 -080089 'conditions': [
90 [ 'skia_is_bot', {
91 'defines': [ 'SK_CRASH_HANDLER' ],
92 }],
93 ],
94
mtklein9ac68ee2014-06-20 11:29:20 -070095 'all_dependent_settings': {
96 'msvs_settings': {
97 'VCLinkerTool': {
98 'AdditionalDependencies': [ 'Dbghelp.lib' ],
99 }
100 },
101 }
102 },
103 {
104 'target_name': 'resources',
105 'type': 'static_library',
106 'sources': [ '../tools/Resources.cpp' ],
107 'dependencies': [
108 'flags.gyp:flags',
109 'skia_lib.gyp:skia_lib',
110 ],
111 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -0700112 'include_dirs': [ '../tools', ],
113 },
114 },
115 {
116 'target_name': 'sk_tool_utils',
117 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -0700118 'sources': [
119 '../tools/sk_tool_utils.cpp',
120 '../tools/sk_tool_utils_font.cpp',
121 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400122 'include_dirs': [
herb62a69c22015-09-29 11:47:45 -0700123 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400124 '../src/fonts',
robertphillips2f0dbc72015-08-20 05:15:06 -0700125 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400126 ],
tfarina20108912014-06-21 10:54:17 -0700127 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700128 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400129 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700130 'skia_lib.gyp:skia_lib',
131 ],
132 'direct_dependent_settings': {
133 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700134 },
135 },
136 {
137 'target_name' : 'timer',
138 'type': 'static_library',
139 'sources': [
140 '../tools/timer/Timer.cpp',
141 '../tools/timer/TimerData.cpp',
142 ],
143 'include_dirs': [
mtkleincd1f2da2015-07-28 08:55:14 -0700144 '../include/private',
mtklein9ac68ee2014-06-20 11:29:20 -0700145 '../src/core',
146 '../src/gpu',
147 ],
148 'direct_dependent_settings': {
149 'include_dirs': ['../tools/timer'],
150 },
151 'dependencies': [
152 'skia_lib.gyp:skia_lib',
153 'jsoncpp.gyp:jsoncpp',
154 ],
155 'conditions': [
156 ['skia_gpu == 1', {
157 'sources': [ '../tools/timer/GpuTimer.cpp' ],
158 }],
159 [ 'skia_os in ["mac", "ios"]', {
160 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
161 }],
162 [ 'skia_os == "win"', {
163 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
164 }],
165 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
166 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
167 }],
168 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
169 'link_settings': { 'libraries': [ '-lrt' ] },
170 }],
171 ],
172 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000173 {
174 'target_name': 'skdiff',
175 'type': 'executable',
176 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000177 '../tools/skdiff.cpp',
178 '../tools/skdiff.h',
179 '../tools/skdiff_html.cpp',
180 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000181 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000182 '../tools/skdiff_utils.cpp',
183 '../tools/skdiff_utils.h',
184 ],
185 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000186 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000187 ],
bungemanf3c15b72015-08-19 11:56:48 -0700188 'xcode_settings': {
189 'conditions': [
190 [ 'skia_osx_deployment_target==""', {
191 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed in env to ld.
192 }, {
193 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)',
194 }],
195 ],
196 'CLANG_CXX_LIBRARY': 'libc++',
197 },
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000198 },
199 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000200 'target_name': 'skpdiff',
201 'type': 'executable',
202 'sources': [
203 '../tools/skpdiff/skpdiff_main.cpp',
204 '../tools/skpdiff/SkDiffContext.cpp',
205 '../tools/skpdiff/SkImageDiffer.cpp',
206 '../tools/skpdiff/SkPMetric.cpp',
207 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000208 ],
209 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700210 '../include/private',
djsollen@google.comefc51b72013-11-12 18:29:17 +0000211 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700212 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000213 ],
214 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700215 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000216 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700217 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000218 ],
219 'cflags': [
220 '-O3',
221 ],
222 'conditions': [
223 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
224 'link_settings': {
225 'libraries': [
226 '-lrt',
borenet283714f2015-06-25 08:05:19 -0700227 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000228 ],
229 },
230 }],
231 ['skia_opencl', {
232 'sources': [
233 '../tools/skpdiff/SkCLImageDiffer.cpp',
234 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
235 ],
236 'conditions': [
237 [ 'skia_os == "mac"', {
238 'link_settings': {
239 'libraries': [
240 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
241 ]
242 }
243 }, {
244 'link_settings': {
245 'libraries': [
246 '-lOpenCL',
247 ],
248 },
249 }],
250 ],
251 }, { # !skia_opencl
252 'sources': [
253 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
254 ],
255 }],
256 ],
257 },
258 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000259 'target_name': 'skpmaker',
260 'type': 'executable',
261 'sources': [
262 '../tools/skpmaker.cpp',
263 ],
264 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700265 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000266 '../src/core',
267 ],
268 'dependencies': [
269 'flags.gyp:flags',
270 'skia_lib.gyp:skia_lib',
271 ],
272 },
273 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000274 'target_name': 'skimagediff',
275 'type': 'executable',
276 'sources': [
277 '../tools/skdiff.cpp',
278 '../tools/skdiff.h',
279 '../tools/skdiff_html.cpp',
280 '../tools/skdiff_html.h',
281 '../tools/skdiff_image.cpp',
282 '../tools/skdiff_utils.cpp',
283 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000284 ],
285 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000286 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000287 ],
288 },
289 {
290 'target_name': 'skhello',
291 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000292 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700293 'flags.gyp:flags',
294 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000295 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000296 ],
borenet48087572015-04-02 12:16:36 -0700297 'sources': [
298 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000299 ],
300 },
301 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000302 'target_name': 'skpinfo',
303 'type': 'executable',
304 'sources': [
305 '../tools/skpinfo.cpp',
306 ],
307 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700308 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000309 '../src/core/',
310 ],
311 'dependencies': [
312 'flags.gyp:flags',
313 'skia_lib.gyp:skia_lib',
314 ],
315 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000316 {
robertphillips9c4909b2015-10-19 06:39:17 -0700317 'target_name': 'imgblur',
318 'type': 'executable',
319 'sources': [
320 '../tools/imgblur.cpp',
321 ],
322 'include_dirs': [
323 '../include/core',
324 ],
325 'dependencies': [
326 'flags.gyp:flags',
327 'flags.gyp:flags_common',
328 'skia_lib.gyp:skia_lib',
329 'tools.gyp:sk_tool_utils',
330 ],
331 },
332 {
robertphillips5ce341f2015-09-18 09:04:43 -0700333 'target_name': 'imgslice',
334 'type': 'executable',
335 'sources': [
336 '../tools/imgslice.cpp',
337 ],
338 'include_dirs': [
339 '../include/core',
340 ],
341 'dependencies': [
342 'flags.gyp:flags',
343 'skia_lib.gyp:skia_lib',
344 ],
345 },
346 {
mtklein60c04752015-07-08 10:06:01 -0700347 'target_name': 'flatten',
348 'type': 'executable',
349 'sources': [
350 '../tools/flatten.cpp',
351 ],
352 'dependencies': [
353 'skia_lib.gyp:skia_lib',
354 ],
355 },
356 {
fmalita2aafe6f2015-02-06 12:51:10 -0800357 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800358 'target_name': 'skp2svg',
359 'type': 'executable',
360 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800361 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800362 '../tools/LazyDecodeBitmap.cpp',
363 ],
364 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700365 '../include/private',
fmalita93957f42015-01-30 09:03:29 -0800366 '../src/core/',
367 '../src/lazy/',
368 '../tools/',
369 ],
370 'dependencies': [
371 'flags.gyp:flags',
372 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800373 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800374 'xml.gyp:xml',
375 ],
376 },
377 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000378 'target_name': 'gpuveto',
379 'type': 'executable',
380 'sources': [
381 '../tools/gpuveto.cpp',
382 '../tools/LazyDecodeBitmap.cpp',
383 ],
384 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700385 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000386 '../src/core/',
387 '../src/images',
388 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000389 ],
390 'dependencies': [
391 'flags.gyp:flags',
392 'skia_lib.gyp:skia_lib',
393 ],
394 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000395 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000396 'target_name': 'lua_app',
397 'type': 'executable',
398 'sources': [
399 '../tools/lua/lua_app.cpp',
400 '../src/utils/SkLua.cpp',
401 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000402 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700403 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000404 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
405 '../src/gpu/',
406 '../src/core/',
407 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000408 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000409 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000410 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000411 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000412 'pdf.gyp:pdf',
413 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000414 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000415 ],
416 },
417 {
reed@google.comdff7e112013-05-15 19:34:20 +0000418 'target_name': 'lua_pictures',
419 'type': 'executable',
420 'sources': [
421 '../tools/lua/lua_pictures.cpp',
422 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000423 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000424 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000425 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700426 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000427 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
428 '../src/gpu/',
429 '../src/core/',
430 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000431 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000432 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000433 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000434 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000435 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000436 'tools.gyp:picture_renderer',
437 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000438 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000439 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000440 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000441 ],
442 },
443 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000444 'target_name': 'render_pictures',
445 'type': 'executable',
446 'sources': [
447 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000448 ],
449 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700450 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000451 '../src/core',
452 '../src/images',
453 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000454 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000455 ],
456 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000457 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000458 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000459 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000460 'tools.gyp:picture_utils',
461 ],
462 },
463 {
reed@google.com006db0f2012-06-27 19:33:29 +0000464 'target_name': 'bench_pictures',
465 'type': 'executable',
466 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700467 '../bench/BenchLogger.cpp',
468 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000469 '../tools/PictureBenchmark.cpp',
470 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000471 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000472 ],
473 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700474 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000475 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000476 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000477 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000478 ],
479 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700480 'timer',
481 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000482 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000483 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000484 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000485 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700486 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000487 ],
scroggo3eb258d2014-07-17 06:58:28 -0700488 'conditions': [
489 ['skia_android_framework == 1', {
490 'libraries': [ '-lskia' ],
491 }],
492 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000493 },
494 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000495 'target_name': 'dump_record',
496 'type': 'executable',
497 'sources': [
498 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000499 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000500 '../tools/LazyDecodeBitmap.cpp',
501 ],
502 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700503 '../include/private',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000504 '../src/core/',
505 '../src/images',
506 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000507 ],
508 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700509 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000510 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000511 'skia_lib.gyp:skia_lib',
512 ],
513 },
514 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000515 'target_name': 'picture_renderer',
516 'type': 'static_library',
517 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000518 '../tools/image_expectations.h',
519 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000520 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000521 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000522 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000523 '../tools/PictureRenderingFlags.h',
524 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000525 '../tools/CopyTilesRenderer.h',
526 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000527 '../src/pipe/utils/SamplePipeControllers.h',
528 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000529 ],
530 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700531 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000532 '../src/core',
533 '../src/images',
534 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000535 '../src/pipe/utils/',
536 '../src/utils/',
537 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000538 'direct_dependent_settings': {
539 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000540 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000541 '../third_party/externals/jsoncpp-chromium/overrides/include/',
542 '../third_party/externals/jsoncpp/include/',
543 ],
544 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000545 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000546 'flags.gyp:flags',
547 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000548 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000549 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000550 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000551 'conditions': [
552 ['skia_gpu == 1',
553 {
554 'include_dirs' : [
555 '../src/gpu',
556 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000557 'dependencies': [
558 'gputest.gyp:skgputest',
559 ],
djsollene4545212014-11-13 11:12:41 -0800560 'export_dependent_settings': [
561 'gputest.gyp:skgputest',
562 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000563 },
564 ],
565 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000566 },
567 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000568 'target_name': 'render_pdfs',
569 'type': 'executable',
570 'sources': [
571 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000572 ],
573 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700574 '../include/private',
halcanary0bef17a2014-08-07 07:24:47 -0700575 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000576 '../src/pipe/utils/',
577 '../src/utils/',
578 ],
579 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700580 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000581 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000582 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000583 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700584 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000585 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000586 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000587 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000588 {
589 'dependencies': [
590 'tools.gyp:win_dbghelp',
591 ],
592 },
593 ],
594 # VS static libraries don't have a linker option. We must set a global
595 # project linker option, or add it to each executable.
596 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400597 'skia_arch_type == "x86_64"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000598 {
599 'msvs_settings': {
600 'VCLinkerTool': {
601 'AdditionalDependencies': [
602 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
603 ],
604 },
605 },
606 },
607 ],
608 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400609 'skia_arch_type == "x86"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000610 {
611 'msvs_settings': {
612 'VCLinkerTool': {
613 'AdditionalDependencies': [
614 '<(skia_win_debuggers_path)/DbgHelp.lib',
615 ],
616 },
617 },
618 },
619 ],
620 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000621 },
622 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000623 'target_name': 'picture_utils',
624 'type': 'static_library',
625 'sources': [
626 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000627 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000628 ],
629 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000630 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000631 ],
reed@google.come52d2912013-05-15 20:01:07 +0000632 'direct_dependent_settings': {
633 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700634 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000635 ],
636 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000637 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000638 {
639 'target_name': 'pinspect',
640 'type': 'executable',
641 'sources': [
642 '../tools/pinspect.cpp',
643 ],
644 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000645 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000646 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000647 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000648 ],
649 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000650 {
reeda816d952014-12-17 13:08:17 -0800651 'target_name': 'imgconv',
652 'type': 'executable',
653 'sources': [
654 '../tools/imgconv.cpp',
655 ],
656 'dependencies': [
657 'flags.gyp:flags',
658 'skia_lib.gyp:skia_lib',
659 ],
660 },
661 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000662 'target_name': 'filter',
663 'type': 'executable',
664 'include_dirs' : [
mtkleinfd8ed692015-07-28 09:54:52 -0700665 '../include/private',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000666 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000667 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000668 ],
669 'sources': [
670 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000671 '../src/utils/debugger/SkDrawCommand.h',
672 '../src/utils/debugger/SkDrawCommand.cpp',
673 '../src/utils/debugger/SkDebugCanvas.h',
674 '../src/utils/debugger/SkDebugCanvas.cpp',
675 '../src/utils/debugger/SkObjectParser.h',
676 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000677 ],
678 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000679 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000680 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000681 ],
682 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000683 {
684 'target_name': 'test_image_decoder',
685 'type': 'executable',
686 'sources': [
687 '../tools/test_image_decoder.cpp',
688 ],
689 'dependencies': [
690 'skia_lib.gyp:skia_lib',
691 ],
692 },
halcanary0d154ee2014-08-11 11:33:51 -0700693 {
mtkleinafb43792014-08-19 15:55:55 -0700694 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700695 'type': 'static_library',
696 'sources': [
697 '../tools/ProcStats.h',
698 '../tools/ProcStats.cpp',
699 ],
700 'direct_dependent_settings': {
701 'include_dirs': [ '../tools', ],
702 },
703 },
djsollen0b17d6c2014-11-13 12:52:35 -0800704 {
caryclark5ef194c2015-08-31 09:22:38 -0700705 'target_name': 'whitelist_typefaces',
706 'type': 'executable',
707 'sources': [
708 '../tools/whitelist_typefaces.cpp',
709 ],
710 'dependencies': [
711 'skia_lib.gyp:skia_lib',
712 ],
713 },
714 {
djsollen0b17d6c2014-11-13 12:52:35 -0800715 'target_name': 'test_public_includes',
716 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800717 # Ensure that our public headers don't have unused params so that clients
718 # (e.g. Android) that include us can build with these warnings enabled
719 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800720 'variables': {
721 'includes_to_test': [
722 '<(skia_include_path)/animator',
723 '<(skia_include_path)/c',
724 '<(skia_include_path)/config',
725 '<(skia_include_path)/core',
726 '<(skia_include_path)/effects',
727 '<(skia_include_path)/gpu',
728 '<(skia_include_path)/images',
729 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800730 '<(skia_include_path)/pipe',
731 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800732 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800733 '<(skia_include_path)/utils',
734 '<(skia_include_path)/views',
735 '<(skia_include_path)/xml',
736 ],
737 'paths_to_ignore': [
738 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800739 '<(skia_include_path)/ports/SkAtomics_std.h',
740 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800741 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700742 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800743 '<(skia_include_path)/ports/SkTypeface_mac.h',
744 '<(skia_include_path)/ports/SkTypeface_win.h',
745 '<(skia_include_path)/utils/ios',
746 '<(skia_include_path)/utils/mac',
747 '<(skia_include_path)/utils/win',
748 '<(skia_include_path)/utils/SkDebugUtils.h',
749 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800750 '<(skia_include_path)/views/animated',
751 '<(skia_include_path)/views/SkOSWindow_Android.h',
752 '<(skia_include_path)/views/SkOSWindow_iOS.h',
753 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800754 '<(skia_include_path)/views/SkOSWindow_SDL.h',
755 '<(skia_include_path)/views/SkOSWindow_Unix.h',
756 '<(skia_include_path)/views/SkOSWindow_Win.h',
757 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800758 ],
759 },
760 'include_dirs': [
761 '<@(includes_to_test)',
762 ],
763 'sources': [
764 # unused_param_test.cpp is generated by the action below.
765 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
766 ],
767 'actions': [
768 {
769 'action_name': 'generate_includes_cpp',
770 'inputs': [
771 '../tools/generate_includes_cpp.py',
772 '<@(includes_to_test)',
773 # This causes the gyp generator on mac to fail
774 #'<@(paths_to_ignore)',
775 ],
776 'outputs': [
777 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
778 ],
779 'action': ['python', '../tools/generate_includes_cpp.py',
780 '--ignore', '<(paths_to_ignore)',
781 '<@(_outputs)', '<@(includes_to_test)'],
782 },
783 ],
784 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000785 ],
786 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000787 ['skia_shared_lib',
788 {
789 'targets': [
790 {
791 'target_name': 'sklua',
792 'product_name': 'skia',
793 'product_prefix': '',
794 'product_dir': '<(PRODUCT_DIR)/',
795 'type': 'shared_library',
796 'sources': [
797 '../src/utils/SkLuaCanvas.cpp',
798 '../src/utils/SkLua.cpp',
799 ],
800 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700801 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000802 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
803 '../src/gpu/',
804 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000805 '../third_party/lua/src/',
806 ],
807 'dependencies': [
808 'lua.gyp:lua',
809 'pdf.gyp:pdf',
810 'skia_lib.gyp:skia_lib',
811 ],
812 'conditions': [
813 ['skia_os != "win"',
814 {
815 'ldflags': [
816 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
817 ],
818 },
819 ],
820 ],
821 },
822 ],
823 },
824 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000825 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000826 {
827 'targets': [
828 {
829 'target_name': 'win_dbghelp',
830 'type': 'static_library',
831 'defines': [
832 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
833 ],
834 'sources': [
835 '../tools/win_dbghelp.h',
836 '../tools/win_dbghelp.cpp',
837 ],
838 },
839 ],
840 },
841 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000842 ['skia_os == "win"',
843 {
844 'targets': [
845 {
846 'target_name': 'win_lcid',
847 'type': 'executable',
848 'sources': [
849 '../tools/win_lcid.cpp',
850 ],
851 },
852 ],
853 },
854 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400855 ['skia_os == "mac"',
856 {
857 'targets': [
858 {
859 'target_name': 'create_test_font',
860 'type': 'executable',
861 'sources': [
862 '../tools/create_test_font.cpp',
863 ],
864 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700865 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400866 '../src/core',
867 ],
868 'dependencies': [
869 'flags.gyp:flags',
870 'skia_lib.gyp:skia_lib',
871 'resources',
872 ],
873 },
874 ],
875 },
876 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000877 ],
878}