blob: 5f4830b46da21842d1b7b2161f17160bebd55ba2 [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',
104 ],
tfarina20108912014-06-21 10:54:17 -0700105 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700106 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400107 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700108 'skia_lib.gyp:skia_lib',
109 ],
110 'direct_dependent_settings': {
111 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700112 },
113 },
114 {
115 'target_name' : 'timer',
116 'type': 'static_library',
117 'sources': [
118 '../tools/timer/Timer.cpp',
119 '../tools/timer/TimerData.cpp',
120 ],
121 'include_dirs': [
mtkleincd1f2da2015-07-28 08:55:14 -0700122 '../include/private',
mtklein9ac68ee2014-06-20 11:29:20 -0700123 '../src/core',
124 '../src/gpu',
125 ],
126 'direct_dependent_settings': {
127 'include_dirs': ['../tools/timer'],
128 },
129 'dependencies': [
130 'skia_lib.gyp:skia_lib',
131 'jsoncpp.gyp:jsoncpp',
132 ],
133 'conditions': [
134 ['skia_gpu == 1', {
135 'sources': [ '../tools/timer/GpuTimer.cpp' ],
136 }],
137 [ 'skia_os in ["mac", "ios"]', {
138 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
139 }],
140 [ 'skia_os == "win"', {
141 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
142 }],
143 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
144 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
145 }],
146 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
147 'link_settings': { 'libraries': [ '-lrt' ] },
148 }],
149 ],
150 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000151 {
152 'target_name': 'skdiff',
153 'type': 'executable',
154 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000155 '../tools/skdiff.cpp',
156 '../tools/skdiff.h',
157 '../tools/skdiff_html.cpp',
158 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000159 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000160 '../tools/skdiff_utils.cpp',
161 '../tools/skdiff_utils.h',
162 ],
163 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000164 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000165 ],
166 },
167 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000168 'target_name': 'skpdiff',
169 'type': 'executable',
170 'sources': [
171 '../tools/skpdiff/skpdiff_main.cpp',
172 '../tools/skpdiff/SkDiffContext.cpp',
173 '../tools/skpdiff/SkImageDiffer.cpp',
174 '../tools/skpdiff/SkPMetric.cpp',
175 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000176 ],
177 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700178 '../include/private',
djsollen@google.comefc51b72013-11-12 18:29:17 +0000179 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700180 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000181 ],
182 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700183 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000184 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700185 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000186 ],
187 'cflags': [
188 '-O3',
189 ],
190 'conditions': [
191 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
192 'link_settings': {
193 'libraries': [
194 '-lrt',
borenet283714f2015-06-25 08:05:19 -0700195 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000196 ],
197 },
198 }],
199 ['skia_opencl', {
200 'sources': [
201 '../tools/skpdiff/SkCLImageDiffer.cpp',
202 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
203 ],
204 'conditions': [
205 [ 'skia_os == "mac"', {
206 'link_settings': {
207 'libraries': [
208 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
209 ]
210 }
211 }, {
212 'link_settings': {
213 'libraries': [
214 '-lOpenCL',
215 ],
216 },
217 }],
218 ],
219 }, { # !skia_opencl
220 'sources': [
221 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
222 ],
223 }],
224 ],
225 },
226 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000227 'target_name': 'skpmaker',
228 'type': 'executable',
229 'sources': [
230 '../tools/skpmaker.cpp',
231 ],
232 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700233 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000234 '../src/core',
235 ],
236 'dependencies': [
237 'flags.gyp:flags',
238 'skia_lib.gyp:skia_lib',
239 ],
240 },
241 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000242 'target_name': 'skimagediff',
243 'type': 'executable',
244 'sources': [
245 '../tools/skdiff.cpp',
246 '../tools/skdiff.h',
247 '../tools/skdiff_html.cpp',
248 '../tools/skdiff_html.h',
249 '../tools/skdiff_image.cpp',
250 '../tools/skdiff_utils.cpp',
251 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000252 ],
253 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000254 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000255 ],
256 },
257 {
258 'target_name': 'skhello',
259 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000260 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700261 'flags.gyp:flags',
262 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000263 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000264 ],
borenet48087572015-04-02 12:16:36 -0700265 'sources': [
266 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000267 ],
268 },
269 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000270 'target_name': 'skpinfo',
271 'type': 'executable',
272 'sources': [
273 '../tools/skpinfo.cpp',
274 ],
275 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700276 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000277 '../src/core/',
278 ],
279 'dependencies': [
280 'flags.gyp:flags',
281 'skia_lib.gyp:skia_lib',
282 ],
283 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000284 {
mtklein60c04752015-07-08 10:06:01 -0700285 'target_name': 'flatten',
286 'type': 'executable',
287 'sources': [
288 '../tools/flatten.cpp',
289 ],
290 'dependencies': [
291 'skia_lib.gyp:skia_lib',
292 ],
293 },
294 {
fmalita2aafe6f2015-02-06 12:51:10 -0800295 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800296 'target_name': 'skp2svg',
297 'type': 'executable',
298 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800299 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800300 '../tools/LazyDecodeBitmap.cpp',
301 ],
302 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700303 '../include/private',
fmalita93957f42015-01-30 09:03:29 -0800304 '../src/core/',
305 '../src/lazy/',
306 '../tools/',
307 ],
308 'dependencies': [
309 'flags.gyp:flags',
310 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800311 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800312 'xml.gyp:xml',
313 ],
314 },
315 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000316 'target_name': 'gpuveto',
317 'type': 'executable',
318 'sources': [
319 '../tools/gpuveto.cpp',
320 '../tools/LazyDecodeBitmap.cpp',
321 ],
322 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700323 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000324 '../src/core/',
325 '../src/images',
326 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000327 ],
328 'dependencies': [
329 'flags.gyp:flags',
330 'skia_lib.gyp:skia_lib',
331 ],
332 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000333 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000334 'target_name': 'lua_app',
335 'type': 'executable',
336 'sources': [
337 '../tools/lua/lua_app.cpp',
338 '../src/utils/SkLua.cpp',
339 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000340 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700341 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000342 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
343 '../src/gpu/',
344 '../src/core/',
345 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000346 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000347 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000348 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000349 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000350 'pdf.gyp:pdf',
351 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000352 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000353 ],
354 },
355 {
reed@google.comdff7e112013-05-15 19:34:20 +0000356 'target_name': 'lua_pictures',
357 'type': 'executable',
358 'sources': [
359 '../tools/lua/lua_pictures.cpp',
360 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000361 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000362 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000363 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700364 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000365 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
366 '../src/gpu/',
367 '../src/core/',
368 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000369 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000370 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000371 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000372 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000373 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000374 'tools.gyp:picture_renderer',
375 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000376 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000377 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000378 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000379 ],
380 },
381 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000382 'target_name': 'render_pictures',
383 'type': 'executable',
384 'sources': [
385 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000386 ],
387 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700388 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000389 '../src/core',
390 '../src/images',
391 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000392 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000393 ],
394 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000395 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000396 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000397 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000398 'tools.gyp:picture_utils',
399 ],
400 },
401 {
reed@google.com006db0f2012-06-27 19:33:29 +0000402 'target_name': 'bench_pictures',
403 'type': 'executable',
404 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700405 '../bench/BenchLogger.cpp',
406 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000407 '../tools/PictureBenchmark.cpp',
408 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000409 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000410 ],
411 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700412 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000413 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000414 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000415 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000416 ],
417 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700418 'timer',
419 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000420 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000421 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000422 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000423 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700424 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000425 ],
scroggo3eb258d2014-07-17 06:58:28 -0700426 'conditions': [
427 ['skia_android_framework == 1', {
428 'libraries': [ '-lskia' ],
429 }],
430 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000431 },
432 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000433 'target_name': 'dump_record',
434 'type': 'executable',
435 'sources': [
436 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000437 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000438 '../tools/LazyDecodeBitmap.cpp',
439 ],
440 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700441 '../include/private',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000442 '../src/core/',
443 '../src/images',
444 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000445 ],
446 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700447 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000448 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000449 'skia_lib.gyp:skia_lib',
450 ],
451 },
452 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000453 'target_name': 'picture_renderer',
454 'type': 'static_library',
455 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000456 '../tools/image_expectations.h',
457 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000458 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000459 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000460 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000461 '../tools/PictureRenderingFlags.h',
462 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000463 '../tools/CopyTilesRenderer.h',
464 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000465 '../src/pipe/utils/SamplePipeControllers.h',
466 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000467 ],
468 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700469 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000470 '../src/core',
471 '../src/images',
472 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000473 '../src/pipe/utils/',
474 '../src/utils/',
475 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000476 'direct_dependent_settings': {
477 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000478 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000479 '../third_party/externals/jsoncpp-chromium/overrides/include/',
480 '../third_party/externals/jsoncpp/include/',
481 ],
482 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000483 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000484 'flags.gyp:flags',
485 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000486 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000487 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000488 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000489 'conditions': [
490 ['skia_gpu == 1',
491 {
492 'include_dirs' : [
493 '../src/gpu',
494 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000495 'dependencies': [
496 'gputest.gyp:skgputest',
497 ],
djsollene4545212014-11-13 11:12:41 -0800498 'export_dependent_settings': [
499 'gputest.gyp:skgputest',
500 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000501 },
502 ],
503 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000504 },
505 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000506 'target_name': 'render_pdfs',
507 'type': 'executable',
508 'sources': [
509 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000510 ],
511 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700512 '../include/private',
halcanary0bef17a2014-08-07 07:24:47 -0700513 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000514 '../src/pipe/utils/',
515 '../src/utils/',
516 ],
517 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700518 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000519 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000520 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000521 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700522 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000523 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000524 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000525 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000526 {
527 'dependencies': [
528 'tools.gyp:win_dbghelp',
529 ],
530 },
531 ],
532 # VS static libraries don't have a linker option. We must set a global
533 # project linker option, or add it to each executable.
534 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400535 'skia_arch_type == "x86_64"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000536 {
537 'msvs_settings': {
538 'VCLinkerTool': {
539 'AdditionalDependencies': [
540 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
541 ],
542 },
543 },
544 },
545 ],
546 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400547 'skia_arch_type == "x86"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000548 {
549 'msvs_settings': {
550 'VCLinkerTool': {
551 'AdditionalDependencies': [
552 '<(skia_win_debuggers_path)/DbgHelp.lib',
553 ],
554 },
555 },
556 },
557 ],
558 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000559 },
560 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000561 'target_name': 'picture_utils',
562 'type': 'static_library',
563 'sources': [
564 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000565 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000566 ],
567 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000568 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000569 ],
reed@google.come52d2912013-05-15 20:01:07 +0000570 'direct_dependent_settings': {
571 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700572 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000573 ],
574 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000575 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000576 {
577 'target_name': 'pinspect',
578 'type': 'executable',
579 'sources': [
580 '../tools/pinspect.cpp',
581 ],
582 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000583 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000584 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000585 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000586 ],
587 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000588 {
reeda816d952014-12-17 13:08:17 -0800589 'target_name': 'imgconv',
590 'type': 'executable',
591 'sources': [
592 '../tools/imgconv.cpp',
593 ],
594 'dependencies': [
595 'flags.gyp:flags',
596 'skia_lib.gyp:skia_lib',
597 ],
598 },
599 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000600 'target_name': 'filter',
601 'type': 'executable',
602 'include_dirs' : [
mtkleinfd8ed692015-07-28 09:54:52 -0700603 '../include/private',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000604 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000605 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000606 ],
607 'sources': [
608 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000609 '../src/utils/debugger/SkDrawCommand.h',
610 '../src/utils/debugger/SkDrawCommand.cpp',
611 '../src/utils/debugger/SkDebugCanvas.h',
612 '../src/utils/debugger/SkDebugCanvas.cpp',
613 '../src/utils/debugger/SkObjectParser.h',
614 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000615 ],
616 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000617 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000618 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000619 ],
620 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000621 {
622 'target_name': 'test_image_decoder',
623 'type': 'executable',
624 'sources': [
625 '../tools/test_image_decoder.cpp',
626 ],
627 'dependencies': [
628 'skia_lib.gyp:skia_lib',
629 ],
630 },
halcanary0d154ee2014-08-11 11:33:51 -0700631 {
mtkleinafb43792014-08-19 15:55:55 -0700632 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700633 'type': 'static_library',
634 'sources': [
635 '../tools/ProcStats.h',
636 '../tools/ProcStats.cpp',
637 ],
638 'direct_dependent_settings': {
639 'include_dirs': [ '../tools', ],
640 },
641 },
djsollen0b17d6c2014-11-13 12:52:35 -0800642 {
643 'target_name': 'test_public_includes',
644 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800645 # Ensure that our public headers don't have unused params so that clients
646 # (e.g. Android) that include us can build with these warnings enabled
647 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800648 'variables': {
649 'includes_to_test': [
650 '<(skia_include_path)/animator',
651 '<(skia_include_path)/c',
652 '<(skia_include_path)/config',
653 '<(skia_include_path)/core',
654 '<(skia_include_path)/effects',
655 '<(skia_include_path)/gpu',
656 '<(skia_include_path)/images',
657 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800658 '<(skia_include_path)/pipe',
659 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800660 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800661 '<(skia_include_path)/utils',
662 '<(skia_include_path)/views',
663 '<(skia_include_path)/xml',
664 ],
665 'paths_to_ignore': [
666 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800667 '<(skia_include_path)/ports/SkAtomics_std.h',
668 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800669 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700670 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
mtkleina64c48f2015-01-21 13:13:31 -0800671 '<(skia_include_path)/ports/SkMutex_pthread.h',
672 '<(skia_include_path)/ports/SkMutex_win.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800673 '<(skia_include_path)/ports/SkTypeface_mac.h',
674 '<(skia_include_path)/ports/SkTypeface_win.h',
675 '<(skia_include_path)/utils/ios',
676 '<(skia_include_path)/utils/mac',
677 '<(skia_include_path)/utils/win',
678 '<(skia_include_path)/utils/SkDebugUtils.h',
679 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800680 '<(skia_include_path)/views/animated',
681 '<(skia_include_path)/views/SkOSWindow_Android.h',
682 '<(skia_include_path)/views/SkOSWindow_iOS.h',
683 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800684 '<(skia_include_path)/views/SkOSWindow_SDL.h',
685 '<(skia_include_path)/views/SkOSWindow_Unix.h',
686 '<(skia_include_path)/views/SkOSWindow_Win.h',
687 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800688 ],
689 },
690 'include_dirs': [
691 '<@(includes_to_test)',
692 ],
693 'sources': [
694 # unused_param_test.cpp is generated by the action below.
695 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
696 ],
697 'actions': [
698 {
699 'action_name': 'generate_includes_cpp',
700 'inputs': [
701 '../tools/generate_includes_cpp.py',
702 '<@(includes_to_test)',
703 # This causes the gyp generator on mac to fail
704 #'<@(paths_to_ignore)',
705 ],
706 'outputs': [
707 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
708 ],
709 'action': ['python', '../tools/generate_includes_cpp.py',
710 '--ignore', '<(paths_to_ignore)',
711 '<@(_outputs)', '<@(includes_to_test)'],
712 },
713 ],
714 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000715 ],
716 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000717 ['skia_shared_lib',
718 {
719 'targets': [
720 {
721 'target_name': 'sklua',
722 'product_name': 'skia',
723 'product_prefix': '',
724 'product_dir': '<(PRODUCT_DIR)/',
725 'type': 'shared_library',
726 'sources': [
727 '../src/utils/SkLuaCanvas.cpp',
728 '../src/utils/SkLua.cpp',
729 ],
730 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700731 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000732 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
733 '../src/gpu/',
734 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000735 '../third_party/lua/src/',
736 ],
737 'dependencies': [
738 'lua.gyp:lua',
739 'pdf.gyp:pdf',
740 'skia_lib.gyp:skia_lib',
741 ],
742 'conditions': [
743 ['skia_os != "win"',
744 {
745 'ldflags': [
746 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
747 ],
748 },
749 ],
750 ],
751 },
752 ],
753 },
754 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000755 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000756 {
757 'targets': [
758 {
759 'target_name': 'win_dbghelp',
760 'type': 'static_library',
761 'defines': [
762 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
763 ],
764 'sources': [
765 '../tools/win_dbghelp.h',
766 '../tools/win_dbghelp.cpp',
767 ],
768 },
769 ],
770 },
771 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000772 ['skia_os == "win"',
773 {
774 'targets': [
775 {
776 'target_name': 'win_lcid',
777 'type': 'executable',
778 'sources': [
779 '../tools/win_lcid.cpp',
780 ],
781 },
782 ],
783 },
784 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400785 ['skia_os == "mac"',
786 {
787 'targets': [
788 {
789 'target_name': 'create_test_font',
790 'type': 'executable',
791 'sources': [
792 '../tools/create_test_font.cpp',
793 ],
794 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700795 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400796 '../src/core',
797 ],
798 'dependencies': [
799 'flags.gyp:flags',
800 'skia_lib.gyp:skia_lib',
801 'resources',
802 ],
803 },
804 ],
805 },
806 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000807 ],
808}