blob: accdd616815cf486997fd10b466d7b5e52d5409f [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',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000027 'lua_app',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000028 'lua_pictures',
reeda816d952014-12-17 13:08:17 -080029 'imgconv',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000030 'pinspect',
31 'render_pdfs',
32 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000033 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000034 'skhello',
fmalita93957f42015-01-30 09:03:29 -080035 'skp2svg',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000036 'skpdiff',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +000037 'skpinfo',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000038 'skpmaker',
robertphillips5ce341f2015-09-18 09:04:43 -070039 'imgslice',
halcanary@google.comfed30372013-10-04 12:46:45 +000040 'test_image_decoder',
djsollen0b17d6c2014-11-13 12:52:35 -080041 'test_public_includes',
caryclark5ef194c2015-08-31 09:22:38 -070042 'whitelist_typefaces',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000043 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000044 'conditions': [
45 ['skia_shared_lib',
46 {
47 'dependencies': [
48 'sklua', # This can only be built if skia is built as a shared library
49 ],
50 },
51 ],
52 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000053 },
mtklein9a0d6d62014-12-15 12:47:51 -080054 {
msaretta5783ae2015-09-08 15:35:32 -070055 'target_name': 'bitmap_region_decoder',
56 'type': 'static_library',
57 'sources': [
58 '../tools/SkBitmapRegionCanvas.cpp',
59 '../tools/SkBitmapRegionDecoderInterface.cpp',
60 '../tools/SkBitmapRegionSampler.cpp',
61 ],
62 'include_dirs': [
msarette6dd0042015-10-09 11:07:34 -070063 '../include/private',
64 '../src/codec',
msaretta5783ae2015-09-08 15:35:32 -070065 ],
66 'dependencies': [
67 'skia_lib.gyp:skia_lib',
68 ],
69 },
70 {
caryclark7da2e552015-05-12 08:36:48 -070071 'target_name': 'chrome_fuzz',
72 'type': 'executable',
73 'sources': [
74 '../tools/chrome_fuzz.cpp',
75 ],
76 'dependencies': [
77 'skia_lib.gyp:skia_lib',
78 ],
79 },
80 {
mtklein9ac68ee2014-06-20 11:29:20 -070081 'target_name': 'crash_handler',
82 'type': 'static_library',
83 'sources': [ '../tools/CrashHandler.cpp' ],
84 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
85 'direct_dependent_settings': {
86 'include_dirs': [ '../tools' ],
87 },
scroggoac928f22015-02-10 08:13:26 -080088 'conditions': [
89 [ 'skia_is_bot', {
90 'defines': [ 'SK_CRASH_HANDLER' ],
91 }],
92 ],
93
mtklein9ac68ee2014-06-20 11:29:20 -070094 'all_dependent_settings': {
95 'msvs_settings': {
96 'VCLinkerTool': {
97 'AdditionalDependencies': [ 'Dbghelp.lib' ],
98 }
99 },
100 }
101 },
102 {
103 'target_name': 'resources',
104 'type': 'static_library',
105 'sources': [ '../tools/Resources.cpp' ],
106 'dependencies': [
107 'flags.gyp:flags',
108 'skia_lib.gyp:skia_lib',
109 ],
110 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -0700111 'include_dirs': [ '../tools', ],
112 },
113 },
114 {
115 'target_name': 'sk_tool_utils',
116 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -0700117 'sources': [
118 '../tools/sk_tool_utils.cpp',
119 '../tools/sk_tool_utils_font.cpp',
120 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400121 'include_dirs': [
herb62a69c22015-09-29 11:47:45 -0700122 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400123 '../src/fonts',
robertphillips2f0dbc72015-08-20 05:15:06 -0700124 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400125 ],
tfarina20108912014-06-21 10:54:17 -0700126 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700127 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400128 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700129 'skia_lib.gyp:skia_lib',
130 ],
131 'direct_dependent_settings': {
132 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700133 },
134 },
135 {
136 'target_name' : 'timer',
137 'type': 'static_library',
138 'sources': [
139 '../tools/timer/Timer.cpp',
140 '../tools/timer/TimerData.cpp',
141 ],
142 'include_dirs': [
mtkleincd1f2da2015-07-28 08:55:14 -0700143 '../include/private',
mtklein9ac68ee2014-06-20 11:29:20 -0700144 '../src/core',
145 '../src/gpu',
146 ],
147 'direct_dependent_settings': {
148 'include_dirs': ['../tools/timer'],
149 },
150 'dependencies': [
151 'skia_lib.gyp:skia_lib',
152 'jsoncpp.gyp:jsoncpp',
153 ],
154 'conditions': [
155 ['skia_gpu == 1', {
156 'sources': [ '../tools/timer/GpuTimer.cpp' ],
157 }],
158 [ 'skia_os in ["mac", "ios"]', {
159 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
160 }],
161 [ 'skia_os == "win"', {
162 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
163 }],
164 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
165 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
166 }],
167 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
168 'link_settings': { 'libraries': [ '-lrt' ] },
169 }],
170 ],
171 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000172 {
173 'target_name': 'skdiff',
174 'type': 'executable',
175 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000176 '../tools/skdiff.cpp',
177 '../tools/skdiff.h',
178 '../tools/skdiff_html.cpp',
179 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000180 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000181 '../tools/skdiff_utils.cpp',
182 '../tools/skdiff_utils.h',
183 ],
184 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000185 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000186 ],
bungemanf3c15b72015-08-19 11:56:48 -0700187 'xcode_settings': {
188 'conditions': [
189 [ 'skia_osx_deployment_target==""', {
190 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed in env to ld.
191 }, {
192 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)',
193 }],
194 ],
195 'CLANG_CXX_LIBRARY': 'libc++',
196 },
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000197 },
198 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000199 'target_name': 'skpdiff',
200 'type': 'executable',
201 'sources': [
202 '../tools/skpdiff/skpdiff_main.cpp',
203 '../tools/skpdiff/SkDiffContext.cpp',
204 '../tools/skpdiff/SkImageDiffer.cpp',
205 '../tools/skpdiff/SkPMetric.cpp',
206 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000207 ],
208 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700209 '../include/private',
djsollen@google.comefc51b72013-11-12 18:29:17 +0000210 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700211 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000212 ],
213 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700214 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000215 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700216 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000217 ],
218 'cflags': [
219 '-O3',
220 ],
221 'conditions': [
222 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
223 'link_settings': {
224 'libraries': [
225 '-lrt',
borenet283714f2015-06-25 08:05:19 -0700226 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000227 ],
228 },
229 }],
230 ['skia_opencl', {
231 'sources': [
232 '../tools/skpdiff/SkCLImageDiffer.cpp',
233 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
234 ],
235 'conditions': [
236 [ 'skia_os == "mac"', {
237 'link_settings': {
238 'libraries': [
239 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
240 ]
241 }
242 }, {
243 'link_settings': {
244 'libraries': [
245 '-lOpenCL',
246 ],
247 },
248 }],
249 ],
250 }, { # !skia_opencl
251 'sources': [
252 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
253 ],
254 }],
255 ],
256 },
257 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000258 'target_name': 'skpmaker',
259 'type': 'executable',
260 'sources': [
261 '../tools/skpmaker.cpp',
262 ],
263 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700264 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000265 '../src/core',
266 ],
267 'dependencies': [
268 'flags.gyp:flags',
269 'skia_lib.gyp:skia_lib',
270 ],
271 },
272 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000273 'target_name': 'skimagediff',
274 'type': 'executable',
275 'sources': [
276 '../tools/skdiff.cpp',
277 '../tools/skdiff.h',
278 '../tools/skdiff_html.cpp',
279 '../tools/skdiff_html.h',
280 '../tools/skdiff_image.cpp',
281 '../tools/skdiff_utils.cpp',
282 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000283 ],
284 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000285 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000286 ],
287 },
288 {
289 'target_name': 'skhello',
290 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000291 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700292 'flags.gyp:flags',
293 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000294 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000295 ],
borenet48087572015-04-02 12:16:36 -0700296 'sources': [
297 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000298 ],
299 },
300 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000301 'target_name': 'skpinfo',
302 'type': 'executable',
303 'sources': [
304 '../tools/skpinfo.cpp',
305 ],
306 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700307 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000308 '../src/core/',
309 ],
310 'dependencies': [
311 'flags.gyp:flags',
312 'skia_lib.gyp:skia_lib',
313 ],
314 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000315 {
robertphillips5ce341f2015-09-18 09:04:43 -0700316 'target_name': 'imgslice',
317 'type': 'executable',
318 'sources': [
319 '../tools/imgslice.cpp',
320 ],
321 'include_dirs': [
322 '../include/core',
323 ],
324 'dependencies': [
325 'flags.gyp:flags',
326 'skia_lib.gyp:skia_lib',
327 ],
328 },
329 {
mtklein60c04752015-07-08 10:06:01 -0700330 'target_name': 'flatten',
331 'type': 'executable',
332 'sources': [
333 '../tools/flatten.cpp',
334 ],
335 'dependencies': [
336 'skia_lib.gyp:skia_lib',
337 ],
338 },
339 {
fmalita2aafe6f2015-02-06 12:51:10 -0800340 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800341 'target_name': 'skp2svg',
342 'type': 'executable',
343 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800344 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800345 '../tools/LazyDecodeBitmap.cpp',
346 ],
347 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700348 '../include/private',
fmalita93957f42015-01-30 09:03:29 -0800349 '../src/core/',
350 '../src/lazy/',
351 '../tools/',
352 ],
353 'dependencies': [
354 'flags.gyp:flags',
355 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800356 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800357 'xml.gyp:xml',
358 ],
359 },
360 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000361 'target_name': 'gpuveto',
362 'type': 'executable',
363 'sources': [
364 '../tools/gpuveto.cpp',
365 '../tools/LazyDecodeBitmap.cpp',
366 ],
367 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700368 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000369 '../src/core/',
370 '../src/images',
371 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000372 ],
373 'dependencies': [
374 'flags.gyp:flags',
375 'skia_lib.gyp:skia_lib',
376 ],
377 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000378 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000379 'target_name': 'lua_app',
380 'type': 'executable',
381 'sources': [
382 '../tools/lua/lua_app.cpp',
383 '../src/utils/SkLua.cpp',
384 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000385 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700386 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000387 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
388 '../src/gpu/',
389 '../src/core/',
390 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000391 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000392 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000393 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000394 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000395 'pdf.gyp:pdf',
396 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000397 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000398 ],
399 },
400 {
reed@google.comdff7e112013-05-15 19:34:20 +0000401 'target_name': 'lua_pictures',
402 'type': 'executable',
403 'sources': [
404 '../tools/lua/lua_pictures.cpp',
405 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000406 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000407 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000408 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700409 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000410 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
411 '../src/gpu/',
412 '../src/core/',
413 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000414 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000415 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000416 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000417 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000418 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000419 'tools.gyp:picture_renderer',
420 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000421 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000422 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000423 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000424 ],
425 },
426 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000427 'target_name': 'render_pictures',
428 'type': 'executable',
429 'sources': [
430 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000431 ],
432 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700433 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000434 '../src/core',
435 '../src/images',
436 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000437 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000438 ],
439 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000440 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000441 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000442 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000443 'tools.gyp:picture_utils',
444 ],
445 },
446 {
reed@google.com006db0f2012-06-27 19:33:29 +0000447 'target_name': 'bench_pictures',
448 'type': 'executable',
449 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700450 '../bench/BenchLogger.cpp',
451 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000452 '../tools/PictureBenchmark.cpp',
453 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000454 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000455 ],
456 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700457 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000458 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000459 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000460 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000461 ],
462 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700463 'timer',
464 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000465 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000466 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000467 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000468 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700469 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000470 ],
scroggo3eb258d2014-07-17 06:58:28 -0700471 'conditions': [
472 ['skia_android_framework == 1', {
473 'libraries': [ '-lskia' ],
474 }],
475 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000476 },
477 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000478 'target_name': 'dump_record',
479 'type': 'executable',
480 'sources': [
481 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000482 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000483 '../tools/LazyDecodeBitmap.cpp',
484 ],
485 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700486 '../include/private',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000487 '../src/core/',
488 '../src/images',
489 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000490 ],
491 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700492 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000493 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000494 'skia_lib.gyp:skia_lib',
495 ],
496 },
497 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000498 'target_name': 'picture_renderer',
499 'type': 'static_library',
500 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000501 '../tools/image_expectations.h',
502 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000503 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000504 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000505 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000506 '../tools/PictureRenderingFlags.h',
507 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000508 '../tools/CopyTilesRenderer.h',
509 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000510 '../src/pipe/utils/SamplePipeControllers.h',
511 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000512 ],
513 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700514 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000515 '../src/core',
516 '../src/images',
517 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000518 '../src/pipe/utils/',
519 '../src/utils/',
520 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000521 'direct_dependent_settings': {
522 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000523 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000524 '../third_party/externals/jsoncpp-chromium/overrides/include/',
525 '../third_party/externals/jsoncpp/include/',
526 ],
527 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000528 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000529 'flags.gyp:flags',
530 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000531 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000532 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000533 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000534 'conditions': [
535 ['skia_gpu == 1',
536 {
537 'include_dirs' : [
538 '../src/gpu',
539 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000540 'dependencies': [
541 'gputest.gyp:skgputest',
542 ],
djsollene4545212014-11-13 11:12:41 -0800543 'export_dependent_settings': [
544 'gputest.gyp:skgputest',
545 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000546 },
547 ],
548 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000549 },
550 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000551 'target_name': 'render_pdfs',
552 'type': 'executable',
553 'sources': [
554 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000555 ],
556 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700557 '../include/private',
halcanary0bef17a2014-08-07 07:24:47 -0700558 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000559 '../src/pipe/utils/',
560 '../src/utils/',
561 ],
562 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700563 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000564 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000565 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000566 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700567 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000568 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000569 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000570 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000571 {
572 'dependencies': [
573 'tools.gyp:win_dbghelp',
574 ],
575 },
576 ],
577 # VS static libraries don't have a linker option. We must set a global
578 # project linker option, or add it to each executable.
579 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400580 'skia_arch_type == "x86_64"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000581 {
582 'msvs_settings': {
583 'VCLinkerTool': {
584 'AdditionalDependencies': [
585 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
586 ],
587 },
588 },
589 },
590 ],
591 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400592 'skia_arch_type == "x86"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000593 {
594 'msvs_settings': {
595 'VCLinkerTool': {
596 'AdditionalDependencies': [
597 '<(skia_win_debuggers_path)/DbgHelp.lib',
598 ],
599 },
600 },
601 },
602 ],
603 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000604 },
605 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000606 'target_name': 'picture_utils',
607 'type': 'static_library',
608 'sources': [
609 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000610 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000611 ],
612 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000613 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000614 ],
reed@google.come52d2912013-05-15 20:01:07 +0000615 'direct_dependent_settings': {
616 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700617 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000618 ],
619 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000620 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000621 {
622 'target_name': 'pinspect',
623 'type': 'executable',
624 'sources': [
625 '../tools/pinspect.cpp',
626 ],
627 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000628 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000629 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000630 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000631 ],
632 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000633 {
reeda816d952014-12-17 13:08:17 -0800634 'target_name': 'imgconv',
635 'type': 'executable',
636 'sources': [
637 '../tools/imgconv.cpp',
638 ],
639 'dependencies': [
640 'flags.gyp:flags',
641 'skia_lib.gyp:skia_lib',
642 ],
643 },
644 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000645 'target_name': 'filter',
646 'type': 'executable',
647 'include_dirs' : [
mtkleinfd8ed692015-07-28 09:54:52 -0700648 '../include/private',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000649 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000650 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000651 ],
652 'sources': [
653 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000654 '../src/utils/debugger/SkDrawCommand.h',
655 '../src/utils/debugger/SkDrawCommand.cpp',
656 '../src/utils/debugger/SkDebugCanvas.h',
657 '../src/utils/debugger/SkDebugCanvas.cpp',
658 '../src/utils/debugger/SkObjectParser.h',
659 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000660 ],
661 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000662 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000663 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000664 ],
665 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000666 {
667 'target_name': 'test_image_decoder',
668 'type': 'executable',
669 'sources': [
670 '../tools/test_image_decoder.cpp',
671 ],
672 'dependencies': [
673 'skia_lib.gyp:skia_lib',
674 ],
675 },
halcanary0d154ee2014-08-11 11:33:51 -0700676 {
mtkleinafb43792014-08-19 15:55:55 -0700677 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700678 'type': 'static_library',
679 'sources': [
680 '../tools/ProcStats.h',
681 '../tools/ProcStats.cpp',
682 ],
683 'direct_dependent_settings': {
684 'include_dirs': [ '../tools', ],
685 },
686 },
djsollen0b17d6c2014-11-13 12:52:35 -0800687 {
caryclark5ef194c2015-08-31 09:22:38 -0700688 'target_name': 'whitelist_typefaces',
689 'type': 'executable',
690 'sources': [
691 '../tools/whitelist_typefaces.cpp',
692 ],
693 'dependencies': [
694 'skia_lib.gyp:skia_lib',
695 ],
696 },
697 {
djsollen0b17d6c2014-11-13 12:52:35 -0800698 'target_name': 'test_public_includes',
699 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800700 # Ensure that our public headers don't have unused params so that clients
701 # (e.g. Android) that include us can build with these warnings enabled
702 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800703 'variables': {
704 'includes_to_test': [
705 '<(skia_include_path)/animator',
706 '<(skia_include_path)/c',
707 '<(skia_include_path)/config',
708 '<(skia_include_path)/core',
709 '<(skia_include_path)/effects',
710 '<(skia_include_path)/gpu',
711 '<(skia_include_path)/images',
712 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800713 '<(skia_include_path)/pipe',
714 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800715 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800716 '<(skia_include_path)/utils',
717 '<(skia_include_path)/views',
718 '<(skia_include_path)/xml',
719 ],
720 'paths_to_ignore': [
721 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800722 '<(skia_include_path)/ports/SkAtomics_std.h',
723 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800724 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700725 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800726 '<(skia_include_path)/ports/SkTypeface_mac.h',
727 '<(skia_include_path)/ports/SkTypeface_win.h',
728 '<(skia_include_path)/utils/ios',
729 '<(skia_include_path)/utils/mac',
730 '<(skia_include_path)/utils/win',
731 '<(skia_include_path)/utils/SkDebugUtils.h',
732 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800733 '<(skia_include_path)/views/animated',
734 '<(skia_include_path)/views/SkOSWindow_Android.h',
735 '<(skia_include_path)/views/SkOSWindow_iOS.h',
736 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800737 '<(skia_include_path)/views/SkOSWindow_SDL.h',
738 '<(skia_include_path)/views/SkOSWindow_Unix.h',
739 '<(skia_include_path)/views/SkOSWindow_Win.h',
740 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800741 ],
742 },
743 'include_dirs': [
744 '<@(includes_to_test)',
745 ],
746 'sources': [
747 # unused_param_test.cpp is generated by the action below.
748 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
749 ],
750 'actions': [
751 {
752 'action_name': 'generate_includes_cpp',
753 'inputs': [
754 '../tools/generate_includes_cpp.py',
755 '<@(includes_to_test)',
756 # This causes the gyp generator on mac to fail
757 #'<@(paths_to_ignore)',
758 ],
759 'outputs': [
760 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
761 ],
762 'action': ['python', '../tools/generate_includes_cpp.py',
763 '--ignore', '<(paths_to_ignore)',
764 '<@(_outputs)', '<@(includes_to_test)'],
765 },
766 ],
767 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000768 ],
769 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000770 ['skia_shared_lib',
771 {
772 'targets': [
773 {
774 'target_name': 'sklua',
775 'product_name': 'skia',
776 'product_prefix': '',
777 'product_dir': '<(PRODUCT_DIR)/',
778 'type': 'shared_library',
779 'sources': [
780 '../src/utils/SkLuaCanvas.cpp',
781 '../src/utils/SkLua.cpp',
782 ],
783 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700784 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000785 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
786 '../src/gpu/',
787 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000788 '../third_party/lua/src/',
789 ],
790 'dependencies': [
791 'lua.gyp:lua',
792 'pdf.gyp:pdf',
793 'skia_lib.gyp:skia_lib',
794 ],
795 'conditions': [
796 ['skia_os != "win"',
797 {
798 'ldflags': [
799 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
800 ],
801 },
802 ],
803 ],
804 },
805 ],
806 },
807 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000808 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000809 {
810 'targets': [
811 {
812 'target_name': 'win_dbghelp',
813 'type': 'static_library',
814 'defines': [
815 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
816 ],
817 'sources': [
818 '../tools/win_dbghelp.h',
819 '../tools/win_dbghelp.cpp',
820 ],
821 },
822 ],
823 },
824 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000825 ['skia_os == "win"',
826 {
827 'targets': [
828 {
829 'target_name': 'win_lcid',
830 'type': 'executable',
831 'sources': [
832 '../tools/win_lcid.cpp',
833 ],
834 },
835 ],
836 },
837 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400838 ['skia_os == "mac"',
839 {
840 'targets': [
841 {
842 'target_name': 'create_test_font',
843 'type': 'executable',
844 'sources': [
845 '../tools/create_test_font.cpp',
846 ],
847 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700848 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400849 '../src/core',
850 ],
851 'dependencies': [
852 'flags.gyp:flags',
853 'skia_lib.gyp:skia_lib',
854 'resources',
855 ],
856 },
857 ],
858 },
859 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000860 ],
861}