blob: 2f250376f9af9fa16513509b99c720dee7eedb97 [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',
caryclark7da2e552015-05-12 08:36:48 -070021 'chrome_fuzz',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +000022 'dump_record',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000023 'filter',
mtklein60c04752015-07-08 10:06:01 -070024 'flatten',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +000025 'gpuveto',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000026 'lua_app',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000027 'lua_pictures',
reeda816d952014-12-17 13:08:17 -080028 'imgconv',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000029 'pinspect',
30 'render_pdfs',
31 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000032 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000033 'skhello',
fmalita93957f42015-01-30 09:03:29 -080034 'skp2svg',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000035 'skpdiff',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +000036 'skpinfo',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000037 'skpmaker',
halcanary@google.comfed30372013-10-04 12:46:45 +000038 'test_image_decoder',
djsollen0b17d6c2014-11-13 12:52:35 -080039 'test_public_includes',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000040 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000041 'conditions': [
42 ['skia_shared_lib',
43 {
44 'dependencies': [
45 'sklua', # This can only be built if skia is built as a shared library
46 ],
47 },
48 ],
49 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000050 },
mtklein9a0d6d62014-12-15 12:47:51 -080051 {
caryclark7da2e552015-05-12 08:36:48 -070052 'target_name': 'chrome_fuzz',
53 'type': 'executable',
54 'sources': [
55 '../tools/chrome_fuzz.cpp',
56 ],
57 'dependencies': [
58 'skia_lib.gyp:skia_lib',
59 ],
60 },
61 {
mtklein9ac68ee2014-06-20 11:29:20 -070062 'target_name': 'crash_handler',
63 'type': 'static_library',
64 'sources': [ '../tools/CrashHandler.cpp' ],
65 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
66 'direct_dependent_settings': {
67 'include_dirs': [ '../tools' ],
68 },
scroggoac928f22015-02-10 08:13:26 -080069 'conditions': [
70 [ 'skia_is_bot', {
71 'defines': [ 'SK_CRASH_HANDLER' ],
72 }],
73 ],
74
mtklein9ac68ee2014-06-20 11:29:20 -070075 'all_dependent_settings': {
76 'msvs_settings': {
77 'VCLinkerTool': {
78 'AdditionalDependencies': [ 'Dbghelp.lib' ],
79 }
80 },
81 }
82 },
83 {
84 'target_name': 'resources',
85 'type': 'static_library',
86 'sources': [ '../tools/Resources.cpp' ],
87 'dependencies': [
88 'flags.gyp:flags',
89 'skia_lib.gyp:skia_lib',
90 ],
91 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -070092 'include_dirs': [ '../tools', ],
93 },
94 },
95 {
96 'target_name': 'sk_tool_utils',
97 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -070098 'sources': [
99 '../tools/sk_tool_utils.cpp',
100 '../tools/sk_tool_utils_font.cpp',
101 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400102 'include_dirs': [
103 '../src/fonts',
robertphillips45b59ed2015-08-19 10:35:14 -0700104 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400105 ],
tfarina20108912014-06-21 10:54:17 -0700106 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700107 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400108 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700109 'skia_lib.gyp:skia_lib',
110 ],
111 'direct_dependent_settings': {
112 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700113 },
114 },
115 {
116 'target_name' : 'timer',
117 'type': 'static_library',
118 'sources': [
119 '../tools/timer/Timer.cpp',
120 '../tools/timer/TimerData.cpp',
121 ],
122 'include_dirs': [
mtkleincd1f2da2015-07-28 08:55:14 -0700123 '../include/private',
mtklein9ac68ee2014-06-20 11:29:20 -0700124 '../src/core',
125 '../src/gpu',
126 ],
127 'direct_dependent_settings': {
128 'include_dirs': ['../tools/timer'],
129 },
130 'dependencies': [
131 'skia_lib.gyp:skia_lib',
132 'jsoncpp.gyp:jsoncpp',
133 ],
134 'conditions': [
135 ['skia_gpu == 1', {
136 'sources': [ '../tools/timer/GpuTimer.cpp' ],
137 }],
138 [ 'skia_os in ["mac", "ios"]', {
139 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
140 }],
141 [ 'skia_os == "win"', {
142 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
143 }],
144 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
145 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
146 }],
147 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
148 'link_settings': { 'libraries': [ '-lrt' ] },
149 }],
150 ],
151 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000152 {
153 'target_name': 'skdiff',
154 'type': 'executable',
155 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000156 '../tools/skdiff.cpp',
157 '../tools/skdiff.h',
158 '../tools/skdiff_html.cpp',
159 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000160 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000161 '../tools/skdiff_utils.cpp',
162 '../tools/skdiff_utils.h',
163 ],
164 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000165 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000166 ],
167 },
168 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000169 'target_name': 'skpdiff',
170 'type': 'executable',
171 'sources': [
172 '../tools/skpdiff/skpdiff_main.cpp',
173 '../tools/skpdiff/SkDiffContext.cpp',
174 '../tools/skpdiff/SkImageDiffer.cpp',
175 '../tools/skpdiff/SkPMetric.cpp',
176 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000177 ],
178 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700179 '../include/private',
djsollen@google.comefc51b72013-11-12 18:29:17 +0000180 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700181 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000182 ],
183 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700184 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000185 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700186 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000187 ],
188 'cflags': [
189 '-O3',
190 ],
191 'conditions': [
192 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
193 'link_settings': {
194 'libraries': [
195 '-lrt',
borenet283714f2015-06-25 08:05:19 -0700196 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000197 ],
198 },
199 }],
200 ['skia_opencl', {
201 'sources': [
202 '../tools/skpdiff/SkCLImageDiffer.cpp',
203 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
204 ],
205 'conditions': [
206 [ 'skia_os == "mac"', {
207 'link_settings': {
208 'libraries': [
209 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
210 ]
211 }
212 }, {
213 'link_settings': {
214 'libraries': [
215 '-lOpenCL',
216 ],
217 },
218 }],
219 ],
220 }, { # !skia_opencl
221 'sources': [
222 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
223 ],
224 }],
225 ],
226 },
227 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000228 'target_name': 'skpmaker',
229 'type': 'executable',
230 'sources': [
231 '../tools/skpmaker.cpp',
232 ],
233 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700234 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000235 '../src/core',
236 ],
237 'dependencies': [
238 'flags.gyp:flags',
239 'skia_lib.gyp:skia_lib',
240 ],
241 },
242 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000243 'target_name': 'skimagediff',
244 'type': 'executable',
245 'sources': [
246 '../tools/skdiff.cpp',
247 '../tools/skdiff.h',
248 '../tools/skdiff_html.cpp',
249 '../tools/skdiff_html.h',
250 '../tools/skdiff_image.cpp',
251 '../tools/skdiff_utils.cpp',
252 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000253 ],
254 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000255 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000256 ],
257 },
258 {
259 'target_name': 'skhello',
260 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000261 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700262 'flags.gyp:flags',
263 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000264 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000265 ],
borenet48087572015-04-02 12:16:36 -0700266 'sources': [
267 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000268 ],
269 },
270 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000271 'target_name': 'skpinfo',
272 'type': 'executable',
273 'sources': [
274 '../tools/skpinfo.cpp',
275 ],
276 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700277 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000278 '../src/core/',
279 ],
280 'dependencies': [
281 'flags.gyp:flags',
282 'skia_lib.gyp:skia_lib',
283 ],
284 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000285 {
mtklein60c04752015-07-08 10:06:01 -0700286 'target_name': 'flatten',
287 'type': 'executable',
288 'sources': [
289 '../tools/flatten.cpp',
290 ],
291 'dependencies': [
292 'skia_lib.gyp:skia_lib',
293 ],
294 },
295 {
fmalita2aafe6f2015-02-06 12:51:10 -0800296 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800297 'target_name': 'skp2svg',
298 'type': 'executable',
299 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800300 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800301 '../tools/LazyDecodeBitmap.cpp',
302 ],
303 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700304 '../include/private',
fmalita93957f42015-01-30 09:03:29 -0800305 '../src/core/',
306 '../src/lazy/',
307 '../tools/',
308 ],
309 'dependencies': [
310 'flags.gyp:flags',
311 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800312 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800313 'xml.gyp:xml',
314 ],
315 },
316 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000317 'target_name': 'gpuveto',
318 'type': 'executable',
319 'sources': [
320 '../tools/gpuveto.cpp',
321 '../tools/LazyDecodeBitmap.cpp',
322 ],
323 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700324 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000325 '../src/core/',
326 '../src/images',
327 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000328 ],
329 'dependencies': [
330 'flags.gyp:flags',
331 'skia_lib.gyp:skia_lib',
332 ],
333 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000334 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000335 'target_name': 'lua_app',
336 'type': 'executable',
337 'sources': [
338 '../tools/lua/lua_app.cpp',
339 '../src/utils/SkLua.cpp',
340 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000341 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700342 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000343 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
344 '../src/gpu/',
345 '../src/core/',
346 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000347 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000348 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000349 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000350 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000351 'pdf.gyp:pdf',
352 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000353 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000354 ],
355 },
356 {
reed@google.comdff7e112013-05-15 19:34:20 +0000357 'target_name': 'lua_pictures',
358 'type': 'executable',
359 'sources': [
360 '../tools/lua/lua_pictures.cpp',
361 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000362 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000363 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000364 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700365 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000366 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
367 '../src/gpu/',
368 '../src/core/',
369 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000370 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000371 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000372 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000373 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000374 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000375 'tools.gyp:picture_renderer',
376 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000377 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000378 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000379 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000380 ],
381 },
382 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000383 'target_name': 'render_pictures',
384 'type': 'executable',
385 'sources': [
386 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000387 ],
388 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700389 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000390 '../src/core',
391 '../src/images',
392 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000393 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000394 ],
395 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000396 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000397 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000398 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000399 'tools.gyp:picture_utils',
400 ],
401 },
402 {
reed@google.com006db0f2012-06-27 19:33:29 +0000403 'target_name': 'bench_pictures',
404 'type': 'executable',
405 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700406 '../bench/BenchLogger.cpp',
407 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000408 '../tools/PictureBenchmark.cpp',
409 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000410 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000411 ],
412 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700413 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000414 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000415 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000416 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000417 ],
418 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700419 'timer',
420 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000421 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000422 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000423 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000424 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700425 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000426 ],
scroggo3eb258d2014-07-17 06:58:28 -0700427 'conditions': [
428 ['skia_android_framework == 1', {
429 'libraries': [ '-lskia' ],
430 }],
431 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000432 },
433 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000434 'target_name': 'dump_record',
435 'type': 'executable',
436 'sources': [
437 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000438 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000439 '../tools/LazyDecodeBitmap.cpp',
440 ],
441 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700442 '../include/private',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000443 '../src/core/',
444 '../src/images',
445 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000446 ],
447 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700448 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000449 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000450 'skia_lib.gyp:skia_lib',
451 ],
452 },
453 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000454 'target_name': 'picture_renderer',
455 'type': 'static_library',
456 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000457 '../tools/image_expectations.h',
458 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000459 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000460 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000461 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000462 '../tools/PictureRenderingFlags.h',
463 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000464 '../tools/CopyTilesRenderer.h',
465 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000466 '../src/pipe/utils/SamplePipeControllers.h',
467 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000468 ],
469 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700470 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000471 '../src/core',
472 '../src/images',
473 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000474 '../src/pipe/utils/',
475 '../src/utils/',
476 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000477 'direct_dependent_settings': {
478 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000479 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000480 '../third_party/externals/jsoncpp-chromium/overrides/include/',
481 '../third_party/externals/jsoncpp/include/',
482 ],
483 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000484 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000485 'flags.gyp:flags',
486 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000487 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000488 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000489 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000490 'conditions': [
491 ['skia_gpu == 1',
492 {
493 'include_dirs' : [
494 '../src/gpu',
495 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000496 'dependencies': [
497 'gputest.gyp:skgputest',
498 ],
djsollene4545212014-11-13 11:12:41 -0800499 'export_dependent_settings': [
500 'gputest.gyp:skgputest',
501 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000502 },
503 ],
504 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000505 },
506 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000507 'target_name': 'render_pdfs',
508 'type': 'executable',
509 'sources': [
510 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000511 ],
512 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700513 '../include/private',
halcanary0bef17a2014-08-07 07:24:47 -0700514 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000515 '../src/pipe/utils/',
516 '../src/utils/',
517 ],
518 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700519 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000520 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000521 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000522 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700523 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000524 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000525 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000526 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000527 {
528 'dependencies': [
529 'tools.gyp:win_dbghelp',
530 ],
531 },
532 ],
533 # VS static libraries don't have a linker option. We must set a global
534 # project linker option, or add it to each executable.
535 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400536 'skia_arch_type == "x86_64"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000537 {
538 'msvs_settings': {
539 'VCLinkerTool': {
540 'AdditionalDependencies': [
541 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
542 ],
543 },
544 },
545 },
546 ],
547 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400548 'skia_arch_type == "x86"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000549 {
550 'msvs_settings': {
551 'VCLinkerTool': {
552 'AdditionalDependencies': [
553 '<(skia_win_debuggers_path)/DbgHelp.lib',
554 ],
555 },
556 },
557 },
558 ],
559 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000560 },
561 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000562 'target_name': 'picture_utils',
563 'type': 'static_library',
564 'sources': [
565 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000566 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000567 ],
568 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000569 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000570 ],
reed@google.come52d2912013-05-15 20:01:07 +0000571 'direct_dependent_settings': {
572 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700573 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000574 ],
575 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000576 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000577 {
578 'target_name': 'pinspect',
579 'type': 'executable',
580 'sources': [
581 '../tools/pinspect.cpp',
582 ],
583 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000584 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000585 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000586 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000587 ],
588 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000589 {
reeda816d952014-12-17 13:08:17 -0800590 'target_name': 'imgconv',
591 'type': 'executable',
592 'sources': [
593 '../tools/imgconv.cpp',
594 ],
595 'dependencies': [
596 'flags.gyp:flags',
597 'skia_lib.gyp:skia_lib',
598 ],
599 },
600 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000601 'target_name': 'filter',
602 'type': 'executable',
603 'include_dirs' : [
mtkleinfd8ed692015-07-28 09:54:52 -0700604 '../include/private',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000605 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000606 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000607 ],
608 'sources': [
609 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000610 '../src/utils/debugger/SkDrawCommand.h',
611 '../src/utils/debugger/SkDrawCommand.cpp',
612 '../src/utils/debugger/SkDebugCanvas.h',
613 '../src/utils/debugger/SkDebugCanvas.cpp',
614 '../src/utils/debugger/SkObjectParser.h',
615 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000616 ],
617 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000618 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000619 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000620 ],
621 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000622 {
623 'target_name': 'test_image_decoder',
624 'type': 'executable',
625 'sources': [
626 '../tools/test_image_decoder.cpp',
627 ],
628 'dependencies': [
629 'skia_lib.gyp:skia_lib',
630 ],
631 },
halcanary0d154ee2014-08-11 11:33:51 -0700632 {
mtkleinafb43792014-08-19 15:55:55 -0700633 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700634 'type': 'static_library',
635 'sources': [
636 '../tools/ProcStats.h',
637 '../tools/ProcStats.cpp',
638 ],
639 'direct_dependent_settings': {
640 'include_dirs': [ '../tools', ],
641 },
642 },
djsollen0b17d6c2014-11-13 12:52:35 -0800643 {
644 'target_name': 'test_public_includes',
645 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800646 # Ensure that our public headers don't have unused params so that clients
647 # (e.g. Android) that include us can build with these warnings enabled
648 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800649 'variables': {
650 'includes_to_test': [
651 '<(skia_include_path)/animator',
652 '<(skia_include_path)/c',
653 '<(skia_include_path)/config',
654 '<(skia_include_path)/core',
655 '<(skia_include_path)/effects',
656 '<(skia_include_path)/gpu',
657 '<(skia_include_path)/images',
658 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800659 '<(skia_include_path)/pipe',
660 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800661 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800662 '<(skia_include_path)/utils',
663 '<(skia_include_path)/views',
664 '<(skia_include_path)/xml',
665 ],
666 'paths_to_ignore': [
667 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800668 '<(skia_include_path)/ports/SkAtomics_std.h',
669 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800670 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700671 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
mtkleina64c48f2015-01-21 13:13:31 -0800672 '<(skia_include_path)/ports/SkMutex_pthread.h',
673 '<(skia_include_path)/ports/SkMutex_win.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800674 '<(skia_include_path)/ports/SkTypeface_mac.h',
675 '<(skia_include_path)/ports/SkTypeface_win.h',
676 '<(skia_include_path)/utils/ios',
677 '<(skia_include_path)/utils/mac',
678 '<(skia_include_path)/utils/win',
679 '<(skia_include_path)/utils/SkDebugUtils.h',
680 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800681 '<(skia_include_path)/views/animated',
682 '<(skia_include_path)/views/SkOSWindow_Android.h',
683 '<(skia_include_path)/views/SkOSWindow_iOS.h',
684 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800685 '<(skia_include_path)/views/SkOSWindow_SDL.h',
686 '<(skia_include_path)/views/SkOSWindow_Unix.h',
687 '<(skia_include_path)/views/SkOSWindow_Win.h',
688 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800689 ],
690 },
691 'include_dirs': [
692 '<@(includes_to_test)',
693 ],
694 'sources': [
695 # unused_param_test.cpp is generated by the action below.
696 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
697 ],
698 'actions': [
699 {
700 'action_name': 'generate_includes_cpp',
701 'inputs': [
702 '../tools/generate_includes_cpp.py',
703 '<@(includes_to_test)',
704 # This causes the gyp generator on mac to fail
705 #'<@(paths_to_ignore)',
706 ],
707 'outputs': [
708 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
709 ],
710 'action': ['python', '../tools/generate_includes_cpp.py',
711 '--ignore', '<(paths_to_ignore)',
712 '<@(_outputs)', '<@(includes_to_test)'],
713 },
714 ],
715 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000716 ],
717 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000718 ['skia_shared_lib',
719 {
720 'targets': [
721 {
722 'target_name': 'sklua',
723 'product_name': 'skia',
724 'product_prefix': '',
725 'product_dir': '<(PRODUCT_DIR)/',
726 'type': 'shared_library',
727 'sources': [
728 '../src/utils/SkLuaCanvas.cpp',
729 '../src/utils/SkLua.cpp',
730 ],
731 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700732 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000733 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
734 '../src/gpu/',
735 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000736 '../third_party/lua/src/',
737 ],
738 'dependencies': [
739 'lua.gyp:lua',
740 'pdf.gyp:pdf',
741 'skia_lib.gyp:skia_lib',
742 ],
743 'conditions': [
744 ['skia_os != "win"',
745 {
746 'ldflags': [
747 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
748 ],
749 },
750 ],
751 ],
752 },
753 ],
754 },
755 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000756 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000757 {
758 'targets': [
759 {
760 'target_name': 'win_dbghelp',
761 'type': 'static_library',
762 'defines': [
763 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
764 ],
765 'sources': [
766 '../tools/win_dbghelp.h',
767 '../tools/win_dbghelp.cpp',
768 ],
769 },
770 ],
771 },
772 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000773 ['skia_os == "win"',
774 {
775 'targets': [
776 {
777 'target_name': 'win_lcid',
778 'type': 'executable',
779 'sources': [
780 '../tools/win_lcid.cpp',
781 ],
782 },
783 ],
784 },
785 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400786 ['skia_os == "mac"',
787 {
788 'targets': [
789 {
790 'target_name': 'create_test_font',
791 'type': 'executable',
792 'sources': [
793 '../tools/create_test_font.cpp',
794 ],
795 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700796 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400797 '../src/core',
798 ],
799 'dependencies': [
800 'flags.gyp:flags',
801 'skia_lib.gyp:skia_lib',
802 'resources',
803 ],
804 },
805 ],
806 },
807 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000808 ],
809}