blob: 52d7e4527374b93ed3ac9a970b97a80acc56a9bb [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': [
63 '../include/private'
64 ],
65 'dependencies': [
66 'skia_lib.gyp:skia_lib',
67 ],
68 },
69 {
caryclark7da2e552015-05-12 08:36:48 -070070 'target_name': 'chrome_fuzz',
71 'type': 'executable',
72 'sources': [
73 '../tools/chrome_fuzz.cpp',
74 ],
75 'dependencies': [
76 'skia_lib.gyp:skia_lib',
77 ],
78 },
79 {
mtklein9ac68ee2014-06-20 11:29:20 -070080 'target_name': 'crash_handler',
81 'type': 'static_library',
82 'sources': [ '../tools/CrashHandler.cpp' ],
83 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
84 'direct_dependent_settings': {
85 'include_dirs': [ '../tools' ],
86 },
scroggoac928f22015-02-10 08:13:26 -080087 'conditions': [
88 [ 'skia_is_bot', {
89 'defines': [ 'SK_CRASH_HANDLER' ],
90 }],
91 ],
92
mtklein9ac68ee2014-06-20 11:29:20 -070093 'all_dependent_settings': {
94 'msvs_settings': {
95 'VCLinkerTool': {
96 'AdditionalDependencies': [ 'Dbghelp.lib' ],
97 }
98 },
99 }
100 },
101 {
102 'target_name': 'resources',
103 'type': 'static_library',
104 'sources': [ '../tools/Resources.cpp' ],
105 'dependencies': [
106 'flags.gyp:flags',
107 'skia_lib.gyp:skia_lib',
108 ],
109 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -0700110 'include_dirs': [ '../tools', ],
111 },
112 },
113 {
114 'target_name': 'sk_tool_utils',
115 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -0700116 'sources': [
117 '../tools/sk_tool_utils.cpp',
118 '../tools/sk_tool_utils_font.cpp',
119 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400120 'include_dirs': [
herb62a69c22015-09-29 11:47:45 -0700121 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400122 '../src/fonts',
robertphillips2f0dbc72015-08-20 05:15:06 -0700123 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400124 ],
tfarina20108912014-06-21 10:54:17 -0700125 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700126 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400127 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700128 'skia_lib.gyp:skia_lib',
129 ],
130 'direct_dependent_settings': {
131 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700132 },
133 },
134 {
135 'target_name' : 'timer',
136 'type': 'static_library',
137 'sources': [
138 '../tools/timer/Timer.cpp',
139 '../tools/timer/TimerData.cpp',
140 ],
141 'include_dirs': [
mtkleincd1f2da2015-07-28 08:55:14 -0700142 '../include/private',
mtklein9ac68ee2014-06-20 11:29:20 -0700143 '../src/core',
144 '../src/gpu',
145 ],
146 'direct_dependent_settings': {
147 'include_dirs': ['../tools/timer'],
148 },
149 'dependencies': [
150 'skia_lib.gyp:skia_lib',
151 'jsoncpp.gyp:jsoncpp',
152 ],
153 'conditions': [
154 ['skia_gpu == 1', {
155 'sources': [ '../tools/timer/GpuTimer.cpp' ],
156 }],
157 [ 'skia_os in ["mac", "ios"]', {
158 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
159 }],
160 [ 'skia_os == "win"', {
161 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
162 }],
163 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
164 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
165 }],
166 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
167 'link_settings': { 'libraries': [ '-lrt' ] },
168 }],
169 ],
170 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000171 {
172 'target_name': 'skdiff',
173 'type': 'executable',
174 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000175 '../tools/skdiff.cpp',
176 '../tools/skdiff.h',
177 '../tools/skdiff_html.cpp',
178 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000179 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000180 '../tools/skdiff_utils.cpp',
181 '../tools/skdiff_utils.h',
182 ],
183 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000184 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000185 ],
bungemanf3c15b72015-08-19 11:56:48 -0700186 'xcode_settings': {
187 'conditions': [
188 [ 'skia_osx_deployment_target==""', {
189 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed in env to ld.
190 }, {
191 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)',
192 }],
193 ],
194 'CLANG_CXX_LIBRARY': 'libc++',
195 },
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000196 },
197 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000198 'target_name': 'skpdiff',
199 'type': 'executable',
200 'sources': [
201 '../tools/skpdiff/skpdiff_main.cpp',
202 '../tools/skpdiff/SkDiffContext.cpp',
203 '../tools/skpdiff/SkImageDiffer.cpp',
204 '../tools/skpdiff/SkPMetric.cpp',
205 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000206 ],
207 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700208 '../include/private',
djsollen@google.comefc51b72013-11-12 18:29:17 +0000209 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700210 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000211 ],
212 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700213 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000214 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700215 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000216 ],
217 'cflags': [
218 '-O3',
219 ],
220 'conditions': [
221 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
222 'link_settings': {
223 'libraries': [
224 '-lrt',
borenet283714f2015-06-25 08:05:19 -0700225 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000226 ],
227 },
228 }],
229 ['skia_opencl', {
230 'sources': [
231 '../tools/skpdiff/SkCLImageDiffer.cpp',
232 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
233 ],
234 'conditions': [
235 [ 'skia_os == "mac"', {
236 'link_settings': {
237 'libraries': [
238 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
239 ]
240 }
241 }, {
242 'link_settings': {
243 'libraries': [
244 '-lOpenCL',
245 ],
246 },
247 }],
248 ],
249 }, { # !skia_opencl
250 'sources': [
251 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
252 ],
253 }],
254 ],
255 },
256 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000257 'target_name': 'skpmaker',
258 'type': 'executable',
259 'sources': [
260 '../tools/skpmaker.cpp',
261 ],
262 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700263 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000264 '../src/core',
265 ],
266 'dependencies': [
267 'flags.gyp:flags',
268 'skia_lib.gyp:skia_lib',
269 ],
270 },
271 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000272 'target_name': 'skimagediff',
273 'type': 'executable',
274 'sources': [
275 '../tools/skdiff.cpp',
276 '../tools/skdiff.h',
277 '../tools/skdiff_html.cpp',
278 '../tools/skdiff_html.h',
279 '../tools/skdiff_image.cpp',
280 '../tools/skdiff_utils.cpp',
281 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000282 ],
283 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000284 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000285 ],
286 },
287 {
288 'target_name': 'skhello',
289 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000290 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700291 'flags.gyp:flags',
292 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000293 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000294 ],
borenet48087572015-04-02 12:16:36 -0700295 'sources': [
296 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000297 ],
298 },
299 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000300 'target_name': 'skpinfo',
301 'type': 'executable',
302 'sources': [
303 '../tools/skpinfo.cpp',
304 ],
305 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700306 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000307 '../src/core/',
308 ],
309 'dependencies': [
310 'flags.gyp:flags',
311 'skia_lib.gyp:skia_lib',
312 ],
313 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000314 {
robertphillips5ce341f2015-09-18 09:04:43 -0700315 'target_name': 'imgslice',
316 'type': 'executable',
317 'sources': [
318 '../tools/imgslice.cpp',
319 ],
320 'include_dirs': [
321 '../include/core',
322 ],
323 'dependencies': [
324 'flags.gyp:flags',
325 'skia_lib.gyp:skia_lib',
326 ],
327 },
328 {
mtklein60c04752015-07-08 10:06:01 -0700329 'target_name': 'flatten',
330 'type': 'executable',
331 'sources': [
332 '../tools/flatten.cpp',
333 ],
334 'dependencies': [
335 'skia_lib.gyp:skia_lib',
336 ],
337 },
338 {
fmalita2aafe6f2015-02-06 12:51:10 -0800339 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800340 'target_name': 'skp2svg',
341 'type': 'executable',
342 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800343 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800344 '../tools/LazyDecodeBitmap.cpp',
345 ],
346 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700347 '../include/private',
fmalita93957f42015-01-30 09:03:29 -0800348 '../src/core/',
349 '../src/lazy/',
350 '../tools/',
351 ],
352 'dependencies': [
353 'flags.gyp:flags',
354 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800355 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800356 'xml.gyp:xml',
357 ],
358 },
359 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000360 'target_name': 'gpuveto',
361 'type': 'executable',
362 'sources': [
363 '../tools/gpuveto.cpp',
364 '../tools/LazyDecodeBitmap.cpp',
365 ],
366 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700367 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000368 '../src/core/',
369 '../src/images',
370 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000371 ],
372 'dependencies': [
373 'flags.gyp:flags',
374 'skia_lib.gyp:skia_lib',
375 ],
376 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000377 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000378 'target_name': 'lua_app',
379 'type': 'executable',
380 'sources': [
381 '../tools/lua/lua_app.cpp',
382 '../src/utils/SkLua.cpp',
383 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000384 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700385 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000386 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
387 '../src/gpu/',
388 '../src/core/',
389 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000390 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000391 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000392 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000393 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000394 'pdf.gyp:pdf',
395 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000396 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000397 ],
398 },
399 {
reed@google.comdff7e112013-05-15 19:34:20 +0000400 'target_name': 'lua_pictures',
401 'type': 'executable',
402 'sources': [
403 '../tools/lua/lua_pictures.cpp',
404 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000405 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000406 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000407 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700408 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000409 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
410 '../src/gpu/',
411 '../src/core/',
412 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000413 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000414 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000415 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000416 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000417 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000418 'tools.gyp:picture_renderer',
419 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000420 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000421 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000422 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000423 ],
424 },
425 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000426 'target_name': 'render_pictures',
427 'type': 'executable',
428 'sources': [
429 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000430 ],
431 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700432 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000433 '../src/core',
434 '../src/images',
435 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000436 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000437 ],
438 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000439 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000440 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000441 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000442 'tools.gyp:picture_utils',
443 ],
444 },
445 {
reed@google.com006db0f2012-06-27 19:33:29 +0000446 'target_name': 'bench_pictures',
447 'type': 'executable',
448 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700449 '../bench/BenchLogger.cpp',
450 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000451 '../tools/PictureBenchmark.cpp',
452 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000453 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000454 ],
455 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700456 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000457 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000458 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000459 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000460 ],
461 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700462 'timer',
463 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000464 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000465 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000466 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000467 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700468 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000469 ],
scroggo3eb258d2014-07-17 06:58:28 -0700470 'conditions': [
471 ['skia_android_framework == 1', {
472 'libraries': [ '-lskia' ],
473 }],
474 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000475 },
476 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000477 'target_name': 'dump_record',
478 'type': 'executable',
479 'sources': [
480 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000481 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000482 '../tools/LazyDecodeBitmap.cpp',
483 ],
484 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700485 '../include/private',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000486 '../src/core/',
487 '../src/images',
488 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000489 ],
490 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700491 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000492 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000493 'skia_lib.gyp:skia_lib',
494 ],
495 },
496 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000497 'target_name': 'picture_renderer',
498 'type': 'static_library',
499 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000500 '../tools/image_expectations.h',
501 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000502 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000503 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000504 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000505 '../tools/PictureRenderingFlags.h',
506 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000507 '../tools/CopyTilesRenderer.h',
508 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000509 '../src/pipe/utils/SamplePipeControllers.h',
510 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000511 ],
512 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700513 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000514 '../src/core',
515 '../src/images',
516 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000517 '../src/pipe/utils/',
518 '../src/utils/',
519 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000520 'direct_dependent_settings': {
521 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000522 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000523 '../third_party/externals/jsoncpp-chromium/overrides/include/',
524 '../third_party/externals/jsoncpp/include/',
525 ],
526 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000527 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000528 'flags.gyp:flags',
529 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000530 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000531 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000532 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000533 'conditions': [
534 ['skia_gpu == 1',
535 {
536 'include_dirs' : [
537 '../src/gpu',
538 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000539 'dependencies': [
540 'gputest.gyp:skgputest',
541 ],
djsollene4545212014-11-13 11:12:41 -0800542 'export_dependent_settings': [
543 'gputest.gyp:skgputest',
544 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000545 },
546 ],
547 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000548 },
549 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000550 'target_name': 'render_pdfs',
551 'type': 'executable',
552 'sources': [
553 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000554 ],
555 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700556 '../include/private',
halcanary0bef17a2014-08-07 07:24:47 -0700557 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000558 '../src/pipe/utils/',
559 '../src/utils/',
560 ],
561 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700562 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000563 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000564 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000565 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700566 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000567 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000568 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000569 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000570 {
571 'dependencies': [
572 'tools.gyp:win_dbghelp',
573 ],
574 },
575 ],
576 # VS static libraries don't have a linker option. We must set a global
577 # project linker option, or add it to each executable.
578 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400579 'skia_arch_type == "x86_64"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000580 {
581 'msvs_settings': {
582 'VCLinkerTool': {
583 'AdditionalDependencies': [
584 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
585 ],
586 },
587 },
588 },
589 ],
590 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400591 'skia_arch_type == "x86"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000592 {
593 'msvs_settings': {
594 'VCLinkerTool': {
595 'AdditionalDependencies': [
596 '<(skia_win_debuggers_path)/DbgHelp.lib',
597 ],
598 },
599 },
600 },
601 ],
602 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000603 },
604 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000605 'target_name': 'picture_utils',
606 'type': 'static_library',
607 'sources': [
608 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000609 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000610 ],
611 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000612 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000613 ],
reed@google.come52d2912013-05-15 20:01:07 +0000614 'direct_dependent_settings': {
615 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700616 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000617 ],
618 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000619 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000620 {
621 'target_name': 'pinspect',
622 'type': 'executable',
623 'sources': [
624 '../tools/pinspect.cpp',
625 ],
626 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000627 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000628 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000629 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000630 ],
631 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000632 {
reeda816d952014-12-17 13:08:17 -0800633 'target_name': 'imgconv',
634 'type': 'executable',
635 'sources': [
636 '../tools/imgconv.cpp',
637 ],
638 'dependencies': [
639 'flags.gyp:flags',
640 'skia_lib.gyp:skia_lib',
641 ],
642 },
643 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000644 'target_name': 'filter',
645 'type': 'executable',
646 'include_dirs' : [
mtkleinfd8ed692015-07-28 09:54:52 -0700647 '../include/private',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000648 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000649 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000650 ],
651 'sources': [
652 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000653 '../src/utils/debugger/SkDrawCommand.h',
654 '../src/utils/debugger/SkDrawCommand.cpp',
655 '../src/utils/debugger/SkDebugCanvas.h',
656 '../src/utils/debugger/SkDebugCanvas.cpp',
657 '../src/utils/debugger/SkObjectParser.h',
658 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000659 ],
660 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000661 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000662 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000663 ],
664 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000665 {
666 'target_name': 'test_image_decoder',
667 'type': 'executable',
668 'sources': [
669 '../tools/test_image_decoder.cpp',
670 ],
671 'dependencies': [
672 'skia_lib.gyp:skia_lib',
673 ],
674 },
halcanary0d154ee2014-08-11 11:33:51 -0700675 {
mtkleinafb43792014-08-19 15:55:55 -0700676 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700677 'type': 'static_library',
678 'sources': [
679 '../tools/ProcStats.h',
680 '../tools/ProcStats.cpp',
681 ],
682 'direct_dependent_settings': {
683 'include_dirs': [ '../tools', ],
684 },
685 },
djsollen0b17d6c2014-11-13 12:52:35 -0800686 {
caryclark5ef194c2015-08-31 09:22:38 -0700687 'target_name': 'whitelist_typefaces',
688 'type': 'executable',
689 'sources': [
690 '../tools/whitelist_typefaces.cpp',
691 ],
692 'dependencies': [
693 'skia_lib.gyp:skia_lib',
694 ],
695 },
696 {
djsollen0b17d6c2014-11-13 12:52:35 -0800697 'target_name': 'test_public_includes',
698 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800699 # Ensure that our public headers don't have unused params so that clients
700 # (e.g. Android) that include us can build with these warnings enabled
701 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800702 'variables': {
703 'includes_to_test': [
704 '<(skia_include_path)/animator',
705 '<(skia_include_path)/c',
706 '<(skia_include_path)/config',
707 '<(skia_include_path)/core',
708 '<(skia_include_path)/effects',
709 '<(skia_include_path)/gpu',
710 '<(skia_include_path)/images',
711 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800712 '<(skia_include_path)/pipe',
713 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800714 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800715 '<(skia_include_path)/utils',
716 '<(skia_include_path)/views',
717 '<(skia_include_path)/xml',
718 ],
719 'paths_to_ignore': [
720 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800721 '<(skia_include_path)/ports/SkAtomics_std.h',
722 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800723 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700724 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800725 '<(skia_include_path)/ports/SkTypeface_mac.h',
726 '<(skia_include_path)/ports/SkTypeface_win.h',
727 '<(skia_include_path)/utils/ios',
728 '<(skia_include_path)/utils/mac',
729 '<(skia_include_path)/utils/win',
730 '<(skia_include_path)/utils/SkDebugUtils.h',
731 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800732 '<(skia_include_path)/views/animated',
733 '<(skia_include_path)/views/SkOSWindow_Android.h',
734 '<(skia_include_path)/views/SkOSWindow_iOS.h',
735 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800736 '<(skia_include_path)/views/SkOSWindow_SDL.h',
737 '<(skia_include_path)/views/SkOSWindow_Unix.h',
738 '<(skia_include_path)/views/SkOSWindow_Win.h',
739 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800740 ],
741 },
742 'include_dirs': [
743 '<@(includes_to_test)',
744 ],
745 'sources': [
746 # unused_param_test.cpp is generated by the action below.
747 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
748 ],
749 'actions': [
750 {
751 'action_name': 'generate_includes_cpp',
752 'inputs': [
753 '../tools/generate_includes_cpp.py',
754 '<@(includes_to_test)',
755 # This causes the gyp generator on mac to fail
756 #'<@(paths_to_ignore)',
757 ],
758 'outputs': [
759 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
760 ],
761 'action': ['python', '../tools/generate_includes_cpp.py',
762 '--ignore', '<(paths_to_ignore)',
763 '<@(_outputs)', '<@(includes_to_test)'],
764 },
765 ],
766 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000767 ],
768 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000769 ['skia_shared_lib',
770 {
771 'targets': [
772 {
773 'target_name': 'sklua',
774 'product_name': 'skia',
775 'product_prefix': '',
776 'product_dir': '<(PRODUCT_DIR)/',
777 'type': 'shared_library',
778 'sources': [
779 '../src/utils/SkLuaCanvas.cpp',
780 '../src/utils/SkLua.cpp',
781 ],
782 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700783 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000784 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
785 '../src/gpu/',
786 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000787 '../third_party/lua/src/',
788 ],
789 'dependencies': [
790 'lua.gyp:lua',
791 'pdf.gyp:pdf',
792 'skia_lib.gyp:skia_lib',
793 ],
794 'conditions': [
795 ['skia_os != "win"',
796 {
797 'ldflags': [
798 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
799 ],
800 },
801 ],
802 ],
803 },
804 ],
805 },
806 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000807 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000808 {
809 'targets': [
810 {
811 'target_name': 'win_dbghelp',
812 'type': 'static_library',
813 'defines': [
814 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
815 ],
816 'sources': [
817 '../tools/win_dbghelp.h',
818 '../tools/win_dbghelp.cpp',
819 ],
820 },
821 ],
822 },
823 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000824 ['skia_os == "win"',
825 {
826 'targets': [
827 {
828 'target_name': 'win_lcid',
829 'type': 'executable',
830 'sources': [
831 '../tools/win_lcid.cpp',
832 ],
833 },
834 ],
835 },
836 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400837 ['skia_os == "mac"',
838 {
839 'targets': [
840 {
841 'target_name': 'create_test_font',
842 'type': 'executable',
843 'sources': [
844 '../tools/create_test_font.cpp',
845 ],
846 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700847 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400848 '../src/core',
849 ],
850 'dependencies': [
851 'flags.gyp:flags',
852 'skia_lib.gyp:skia_lib',
853 'resources',
854 ],
855 },
856 ],
857 },
858 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000859 ],
860}