blob: e30cb7b7a19faaeab32ac7f126063b029ec379ce [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': [
msaretta5783ae2015-09-08 15:35:32 -070020 'bitmap_region_decoder',
caryclark7da2e552015-05-12 08:36:48 -070021 'chrome_fuzz',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000022 'filter',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +000023 'gpuveto',
robertphillips9c4909b2015-10-19 06:39:17 -070024 'imgblur',
25 'imgconv',
26 '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',
30 'render_pdfs',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000031 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000032 'skhello',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000033 'skpdiff',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +000034 'skpinfo',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000035 'skpmaker',
halcanary@google.comfed30372013-10-04 12:46:45 +000036 'test_image_decoder',
djsollen0b17d6c2014-11-13 12:52:35 -080037 'test_public_includes',
caryclark5ef194c2015-08-31 09:22:38 -070038 'whitelist_typefaces',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000039 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000040 'conditions': [
41 ['skia_shared_lib',
42 {
43 'dependencies': [
44 'sklua', # This can only be built if skia is built as a shared library
45 ],
46 },
47 ],
48 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000049 },
mtklein9a0d6d62014-12-15 12:47:51 -080050 {
msaretta5783ae2015-09-08 15:35:32 -070051 'target_name': 'bitmap_region_decoder',
52 'type': 'static_library',
53 'sources': [
54 '../tools/SkBitmapRegionCanvas.cpp',
55 '../tools/SkBitmapRegionDecoderInterface.cpp',
56 '../tools/SkBitmapRegionSampler.cpp',
57 ],
58 'include_dirs': [
msarette6dd0042015-10-09 11:07:34 -070059 '../include/private',
60 '../src/codec',
msaretta5783ae2015-09-08 15:35:32 -070061 ],
62 'dependencies': [
63 'skia_lib.gyp:skia_lib',
64 ],
65 },
66 {
caryclark7da2e552015-05-12 08:36:48 -070067 'target_name': 'chrome_fuzz',
68 'type': 'executable',
69 'sources': [
70 '../tools/chrome_fuzz.cpp',
71 ],
72 'dependencies': [
73 'skia_lib.gyp:skia_lib',
74 ],
75 },
76 {
mtklein9ac68ee2014-06-20 11:29:20 -070077 'target_name': 'crash_handler',
78 'type': 'static_library',
79 'sources': [ '../tools/CrashHandler.cpp' ],
80 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
81 'direct_dependent_settings': {
82 'include_dirs': [ '../tools' ],
83 },
scroggoac928f22015-02-10 08:13:26 -080084 'conditions': [
85 [ 'skia_is_bot', {
86 'defines': [ 'SK_CRASH_HANDLER' ],
87 }],
88 ],
89
mtklein9ac68ee2014-06-20 11:29:20 -070090 'all_dependent_settings': {
91 'msvs_settings': {
92 'VCLinkerTool': {
93 'AdditionalDependencies': [ 'Dbghelp.lib' ],
94 }
95 },
96 }
97 },
98 {
99 'target_name': 'resources',
100 'type': 'static_library',
101 'sources': [ '../tools/Resources.cpp' ],
102 'dependencies': [
103 'flags.gyp:flags',
104 'skia_lib.gyp:skia_lib',
105 ],
106 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -0700107 'include_dirs': [ '../tools', ],
108 },
109 },
110 {
111 'target_name': 'sk_tool_utils',
112 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -0700113 'sources': [
114 '../tools/sk_tool_utils.cpp',
115 '../tools/sk_tool_utils_font.cpp',
116 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400117 'include_dirs': [
herb62a69c22015-09-29 11:47:45 -0700118 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400119 '../src/fonts',
robertphillips2f0dbc72015-08-20 05:15:06 -0700120 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400121 ],
tfarina20108912014-06-21 10:54:17 -0700122 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700123 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400124 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700125 'skia_lib.gyp:skia_lib',
126 ],
127 'direct_dependent_settings': {
128 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700129 },
130 },
131 {
132 'target_name' : 'timer',
133 'type': 'static_library',
134 'sources': [
135 '../tools/timer/Timer.cpp',
136 '../tools/timer/TimerData.cpp',
137 ],
138 'include_dirs': [
mtkleincd1f2da2015-07-28 08:55:14 -0700139 '../include/private',
mtklein9ac68ee2014-06-20 11:29:20 -0700140 '../src/core',
141 '../src/gpu',
142 ],
143 'direct_dependent_settings': {
144 'include_dirs': ['../tools/timer'],
145 },
146 'dependencies': [
147 'skia_lib.gyp:skia_lib',
148 'jsoncpp.gyp:jsoncpp',
149 ],
150 'conditions': [
151 ['skia_gpu == 1', {
152 'sources': [ '../tools/timer/GpuTimer.cpp' ],
153 }],
154 [ 'skia_os in ["mac", "ios"]', {
155 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
156 }],
157 [ 'skia_os == "win"', {
158 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
159 }],
160 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
161 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
162 }],
163 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
164 'link_settings': { 'libraries': [ '-lrt' ] },
165 }],
166 ],
167 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000168 {
169 'target_name': 'skdiff',
170 'type': 'executable',
171 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000172 '../tools/skdiff.cpp',
173 '../tools/skdiff.h',
174 '../tools/skdiff_html.cpp',
175 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000176 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000177 '../tools/skdiff_utils.cpp',
178 '../tools/skdiff_utils.h',
179 ],
180 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000181 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000182 ],
bungemanf3c15b72015-08-19 11:56:48 -0700183 'xcode_settings': {
184 'conditions': [
185 [ 'skia_osx_deployment_target==""', {
186 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed in env to ld.
187 }, {
188 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)',
189 }],
190 ],
191 'CLANG_CXX_LIBRARY': 'libc++',
192 },
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000193 },
194 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000195 'target_name': 'skpdiff',
196 'type': 'executable',
197 'sources': [
198 '../tools/skpdiff/skpdiff_main.cpp',
199 '../tools/skpdiff/SkDiffContext.cpp',
200 '../tools/skpdiff/SkImageDiffer.cpp',
201 '../tools/skpdiff/SkPMetric.cpp',
202 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000203 ],
204 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700205 '../include/private',
djsollen@google.comefc51b72013-11-12 18:29:17 +0000206 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700207 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000208 ],
209 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700210 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000211 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700212 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000213 ],
214 'cflags': [
215 '-O3',
216 ],
217 'conditions': [
218 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
219 'link_settings': {
220 'libraries': [
221 '-lrt',
borenet283714f2015-06-25 08:05:19 -0700222 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000223 ],
224 },
225 }],
226 ['skia_opencl', {
227 'sources': [
228 '../tools/skpdiff/SkCLImageDiffer.cpp',
229 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
230 ],
231 'conditions': [
232 [ 'skia_os == "mac"', {
233 'link_settings': {
234 'libraries': [
235 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
236 ]
237 }
238 }, {
239 'link_settings': {
240 'libraries': [
241 '-lOpenCL',
242 ],
243 },
244 }],
245 ],
246 }, { # !skia_opencl
247 'sources': [
248 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
249 ],
250 }],
251 ],
252 },
253 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000254 'target_name': 'skpmaker',
255 'type': 'executable',
256 'sources': [
257 '../tools/skpmaker.cpp',
258 ],
259 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700260 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000261 '../src/core',
262 ],
263 'dependencies': [
264 'flags.gyp:flags',
265 'skia_lib.gyp:skia_lib',
266 ],
267 },
268 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000269 'target_name': 'skimagediff',
270 'type': 'executable',
271 'sources': [
272 '../tools/skdiff.cpp',
273 '../tools/skdiff.h',
274 '../tools/skdiff_html.cpp',
275 '../tools/skdiff_html.h',
276 '../tools/skdiff_image.cpp',
277 '../tools/skdiff_utils.cpp',
278 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000279 ],
280 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000281 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000282 ],
283 },
284 {
285 'target_name': 'skhello',
286 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000287 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700288 'flags.gyp:flags',
289 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000290 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000291 ],
borenet48087572015-04-02 12:16:36 -0700292 'sources': [
293 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000294 ],
295 },
296 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000297 'target_name': 'skpinfo',
298 'type': 'executable',
299 'sources': [
300 '../tools/skpinfo.cpp',
301 ],
302 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700303 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000304 '../src/core/',
305 ],
306 'dependencies': [
307 'flags.gyp:flags',
308 'skia_lib.gyp:skia_lib',
309 ],
310 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000311 {
robertphillips9c4909b2015-10-19 06:39:17 -0700312 'target_name': 'imgblur',
313 'type': 'executable',
314 'sources': [
315 '../tools/imgblur.cpp',
316 ],
317 'include_dirs': [
318 '../include/core',
319 ],
320 'dependencies': [
321 'flags.gyp:flags',
322 'flags.gyp:flags_common',
323 'skia_lib.gyp:skia_lib',
324 'tools.gyp:sk_tool_utils',
325 ],
326 },
327 {
robertphillips5ce341f2015-09-18 09:04:43 -0700328 'target_name': 'imgslice',
329 'type': 'executable',
330 'sources': [
331 '../tools/imgslice.cpp',
332 ],
333 'include_dirs': [
334 '../include/core',
335 ],
336 'dependencies': [
337 'flags.gyp:flags',
338 'skia_lib.gyp:skia_lib',
339 ],
340 },
341 {
mtklein0c768a22015-10-20 14:29:10 -0700342 'target_name': 'lazy_decode_bitmap',
343 'type': 'static_library',
344 'sources': [ '../tools/LazyDecodeBitmap.cpp' ],
345 'include_dirs': [
346 '../include/private',
347 '../src/core',
348 '../src/lazy',
349 ],
350 'dependencies': [
351 'flags.gyp:flags',
352 'skia_lib.gyp:skia_lib'
353 ],
fmalita93957f42015-01-30 09:03:29 -0800354 },
355 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000356 'target_name': 'gpuveto',
357 'type': 'executable',
358 'sources': [
359 '../tools/gpuveto.cpp',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000360 ],
361 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700362 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000363 '../src/core/',
364 '../src/images',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000365 ],
366 'dependencies': [
mtklein0c768a22015-10-20 14:29:10 -0700367 'lazy_decode_bitmap',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000368 'flags.gyp:flags',
369 'skia_lib.gyp:skia_lib',
370 ],
371 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000372 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000373 'target_name': 'lua_app',
374 'type': 'executable',
375 'sources': [
376 '../tools/lua/lua_app.cpp',
377 '../src/utils/SkLua.cpp',
378 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000379 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700380 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000381 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
382 '../src/gpu/',
383 '../src/core/',
384 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000385 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000386 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000387 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000388 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000389 'pdf.gyp:pdf',
390 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000391 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000392 ],
393 },
394 {
reed@google.comdff7e112013-05-15 19:34:20 +0000395 'target_name': 'lua_pictures',
396 'type': 'executable',
397 'sources': [
398 '../tools/lua/lua_pictures.cpp',
399 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000400 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000401 ],
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 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000408 'dependencies': [
mtklein0c768a22015-10-20 14:29:10 -0700409 'lazy_decode_bitmap',
reed@google.comdff7e112013-05-15 19:34:20 +0000410 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000411 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000412 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000413 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000414 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000415 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000416 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000417 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000418 ],
419 },
420 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000421 'target_name': 'picture_renderer',
422 'type': 'static_library',
423 'sources': [
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000424 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000425 '../tools/PictureRenderer.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000426 ],
427 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700428 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000429 '../src/core',
430 '../src/images',
431 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000432 '../src/pipe/utils/',
433 '../src/utils/',
434 ],
435 'dependencies': [
mtklein0c768a22015-10-20 14:29:10 -0700436 'lazy_decode_bitmap',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000437 'flags.gyp:flags',
438 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000439 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000440 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000441 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000442 'conditions': [
443 ['skia_gpu == 1',
444 {
445 'include_dirs' : [
446 '../src/gpu',
447 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000448 'dependencies': [
449 'gputest.gyp:skgputest',
450 ],
djsollene4545212014-11-13 11:12:41 -0800451 'export_dependent_settings': [
452 'gputest.gyp:skgputest',
453 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000454 },
455 ],
456 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000457 },
458 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000459 'target_name': 'render_pdfs',
460 'type': 'executable',
461 'sources': [
462 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000463 ],
464 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700465 '../include/private',
halcanary0bef17a2014-08-07 07:24:47 -0700466 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000467 '../src/pipe/utils/',
468 '../src/utils/',
469 ],
470 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700471 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000472 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000473 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000474 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700475 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000476 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000477 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000478 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000479 {
480 'dependencies': [
481 'tools.gyp:win_dbghelp',
482 ],
483 },
484 ],
485 # VS static libraries don't have a linker option. We must set a global
486 # project linker option, or add it to each executable.
487 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400488 'skia_arch_type == "x86_64"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000489 {
490 'msvs_settings': {
491 'VCLinkerTool': {
492 'AdditionalDependencies': [
493 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
494 ],
495 },
496 },
497 },
498 ],
499 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400500 'skia_arch_type == "x86"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000501 {
502 'msvs_settings': {
503 'VCLinkerTool': {
504 'AdditionalDependencies': [
505 '<(skia_win_debuggers_path)/DbgHelp.lib',
506 ],
507 },
508 },
509 },
510 ],
511 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000512 },
513 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000514 'target_name': 'picture_utils',
515 'type': 'static_library',
516 'sources': [
517 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000518 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000519 ],
520 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000521 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000522 ],
reed@google.come52d2912013-05-15 20:01:07 +0000523 'direct_dependent_settings': {
524 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700525 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000526 ],
527 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000528 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000529 {
530 'target_name': 'pinspect',
531 'type': 'executable',
532 'sources': [
533 '../tools/pinspect.cpp',
534 ],
535 'dependencies': [
mtklein0c768a22015-10-20 14:29:10 -0700536 'lazy_decode_bitmap',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000537 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000538 'skia_lib.gyp:skia_lib',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000539 ],
540 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000541 {
reeda816d952014-12-17 13:08:17 -0800542 'target_name': 'imgconv',
543 'type': 'executable',
544 'sources': [
545 '../tools/imgconv.cpp',
546 ],
547 'dependencies': [
548 'flags.gyp:flags',
549 'skia_lib.gyp:skia_lib',
550 ],
551 },
552 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000553 'target_name': 'filter',
554 'type': 'executable',
555 'include_dirs' : [
mtkleinfd8ed692015-07-28 09:54:52 -0700556 '../include/private',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000557 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000558 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000559 ],
560 'sources': [
561 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000562 '../src/utils/debugger/SkDrawCommand.h',
563 '../src/utils/debugger/SkDrawCommand.cpp',
564 '../src/utils/debugger/SkDebugCanvas.h',
565 '../src/utils/debugger/SkDebugCanvas.cpp',
566 '../src/utils/debugger/SkObjectParser.h',
567 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000568 ],
569 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000570 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000571 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000572 ],
573 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000574 {
575 'target_name': 'test_image_decoder',
576 'type': 'executable',
577 'sources': [
578 '../tools/test_image_decoder.cpp',
579 ],
580 'dependencies': [
581 'skia_lib.gyp:skia_lib',
582 ],
583 },
halcanary0d154ee2014-08-11 11:33:51 -0700584 {
mtkleinafb43792014-08-19 15:55:55 -0700585 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700586 'type': 'static_library',
587 'sources': [
588 '../tools/ProcStats.h',
589 '../tools/ProcStats.cpp',
590 ],
591 'direct_dependent_settings': {
592 'include_dirs': [ '../tools', ],
593 },
594 },
djsollen0b17d6c2014-11-13 12:52:35 -0800595 {
caryclark5ef194c2015-08-31 09:22:38 -0700596 'target_name': 'whitelist_typefaces',
597 'type': 'executable',
598 'sources': [
599 '../tools/whitelist_typefaces.cpp',
600 ],
601 'dependencies': [
602 'skia_lib.gyp:skia_lib',
603 ],
604 },
605 {
djsollen0b17d6c2014-11-13 12:52:35 -0800606 'target_name': 'test_public_includes',
607 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800608 # Ensure that our public headers don't have unused params so that clients
609 # (e.g. Android) that include us can build with these warnings enabled
610 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800611 'variables': {
612 'includes_to_test': [
613 '<(skia_include_path)/animator',
614 '<(skia_include_path)/c',
615 '<(skia_include_path)/config',
616 '<(skia_include_path)/core',
617 '<(skia_include_path)/effects',
618 '<(skia_include_path)/gpu',
619 '<(skia_include_path)/images',
620 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800621 '<(skia_include_path)/pipe',
622 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800623 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800624 '<(skia_include_path)/utils',
625 '<(skia_include_path)/views',
626 '<(skia_include_path)/xml',
627 ],
628 'paths_to_ignore': [
629 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800630 '<(skia_include_path)/ports/SkAtomics_std.h',
631 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800632 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700633 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800634 '<(skia_include_path)/ports/SkTypeface_mac.h',
635 '<(skia_include_path)/ports/SkTypeface_win.h',
636 '<(skia_include_path)/utils/ios',
637 '<(skia_include_path)/utils/mac',
638 '<(skia_include_path)/utils/win',
639 '<(skia_include_path)/utils/SkDebugUtils.h',
640 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800641 '<(skia_include_path)/views/animated',
642 '<(skia_include_path)/views/SkOSWindow_Android.h',
643 '<(skia_include_path)/views/SkOSWindow_iOS.h',
644 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800645 '<(skia_include_path)/views/SkOSWindow_SDL.h',
646 '<(skia_include_path)/views/SkOSWindow_Unix.h',
647 '<(skia_include_path)/views/SkOSWindow_Win.h',
648 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800649 ],
650 },
651 'include_dirs': [
652 '<@(includes_to_test)',
653 ],
654 'sources': [
655 # unused_param_test.cpp is generated by the action below.
656 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
657 ],
658 'actions': [
659 {
660 'action_name': 'generate_includes_cpp',
661 'inputs': [
662 '../tools/generate_includes_cpp.py',
663 '<@(includes_to_test)',
664 # This causes the gyp generator on mac to fail
665 #'<@(paths_to_ignore)',
666 ],
667 'outputs': [
668 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
669 ],
670 'action': ['python', '../tools/generate_includes_cpp.py',
671 '--ignore', '<(paths_to_ignore)',
672 '<@(_outputs)', '<@(includes_to_test)'],
673 },
674 ],
675 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000676 ],
677 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000678 ['skia_shared_lib',
679 {
680 'targets': [
681 {
682 'target_name': 'sklua',
683 'product_name': 'skia',
684 'product_prefix': '',
685 'product_dir': '<(PRODUCT_DIR)/',
686 'type': 'shared_library',
687 'sources': [
688 '../src/utils/SkLuaCanvas.cpp',
689 '../src/utils/SkLua.cpp',
690 ],
691 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700692 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000693 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
694 '../src/gpu/',
695 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000696 '../third_party/lua/src/',
697 ],
698 'dependencies': [
699 'lua.gyp:lua',
700 'pdf.gyp:pdf',
701 'skia_lib.gyp:skia_lib',
702 ],
703 'conditions': [
704 ['skia_os != "win"',
705 {
706 'ldflags': [
707 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
708 ],
709 },
710 ],
711 ],
712 },
713 ],
714 },
715 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000716 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000717 {
718 'targets': [
719 {
720 'target_name': 'win_dbghelp',
721 'type': 'static_library',
722 'defines': [
723 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
724 ],
725 'sources': [
726 '../tools/win_dbghelp.h',
727 '../tools/win_dbghelp.cpp',
728 ],
729 },
730 ],
731 },
732 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000733 ['skia_os == "win"',
734 {
735 'targets': [
736 {
737 'target_name': 'win_lcid',
738 'type': 'executable',
739 'sources': [
740 '../tools/win_lcid.cpp',
741 ],
742 },
743 ],
744 },
745 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400746 ['skia_os == "mac"',
747 {
748 'targets': [
749 {
750 'target_name': 'create_test_font',
751 'type': 'executable',
752 'sources': [
753 '../tools/create_test_font.cpp',
754 ],
755 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700756 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400757 '../src/core',
758 ],
759 'dependencies': [
760 'flags.gyp:flags',
761 'skia_lib.gyp:skia_lib',
762 'resources',
763 ],
764 },
765 ],
766 },
767 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000768 ],
769}