blob: a01d668ba7634c174e04550cddc873ddfbc8b8c6 [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': [
122 '../src/core',
123 '../src/gpu',
124 ],
125 'direct_dependent_settings': {
126 'include_dirs': ['../tools/timer'],
127 },
128 'dependencies': [
129 'skia_lib.gyp:skia_lib',
130 'jsoncpp.gyp:jsoncpp',
131 ],
132 'conditions': [
133 ['skia_gpu == 1', {
134 'sources': [ '../tools/timer/GpuTimer.cpp' ],
135 }],
136 [ 'skia_os in ["mac", "ios"]', {
137 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
138 }],
139 [ 'skia_os == "win"', {
140 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
141 }],
142 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
143 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
144 }],
145 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
146 'link_settings': { 'libraries': [ '-lrt' ] },
147 }],
148 ],
149 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000150 {
151 'target_name': 'skdiff',
152 'type': 'executable',
153 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000154 '../tools/skdiff.cpp',
155 '../tools/skdiff.h',
156 '../tools/skdiff_html.cpp',
157 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000158 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000159 '../tools/skdiff_utils.cpp',
160 '../tools/skdiff_utils.h',
161 ],
162 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000163 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000164 ],
165 },
166 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000167 'target_name': 'skpdiff',
168 'type': 'executable',
169 'sources': [
170 '../tools/skpdiff/skpdiff_main.cpp',
171 '../tools/skpdiff/SkDiffContext.cpp',
172 '../tools/skpdiff/SkImageDiffer.cpp',
173 '../tools/skpdiff/SkPMetric.cpp',
174 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000175 ],
176 'include_dirs': [
djsollen@google.comefc51b72013-11-12 18:29:17 +0000177 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700178 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000179 ],
180 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700181 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000182 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700183 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000184 ],
185 'cflags': [
186 '-O3',
187 ],
188 'conditions': [
189 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
190 'link_settings': {
191 'libraries': [
192 '-lrt',
borenet283714f2015-06-25 08:05:19 -0700193 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000194 ],
195 },
196 }],
197 ['skia_opencl', {
198 'sources': [
199 '../tools/skpdiff/SkCLImageDiffer.cpp',
200 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
201 ],
202 'conditions': [
203 [ 'skia_os == "mac"', {
204 'link_settings': {
205 'libraries': [
206 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
207 ]
208 }
209 }, {
210 'link_settings': {
211 'libraries': [
212 '-lOpenCL',
213 ],
214 },
215 }],
216 ],
217 }, { # !skia_opencl
218 'sources': [
219 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
220 ],
221 }],
222 ],
223 },
224 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000225 'target_name': 'skpmaker',
226 'type': 'executable',
227 'sources': [
228 '../tools/skpmaker.cpp',
229 ],
230 'include_dirs': [
231 '../src/core',
232 ],
233 'dependencies': [
234 'flags.gyp:flags',
235 'skia_lib.gyp:skia_lib',
236 ],
237 },
238 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000239 'target_name': 'skimagediff',
240 'type': 'executable',
241 'sources': [
242 '../tools/skdiff.cpp',
243 '../tools/skdiff.h',
244 '../tools/skdiff_html.cpp',
245 '../tools/skdiff_html.h',
246 '../tools/skdiff_image.cpp',
247 '../tools/skdiff_utils.cpp',
248 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000249 ],
250 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000251 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000252 ],
253 },
254 {
255 'target_name': 'skhello',
256 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000257 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700258 'flags.gyp:flags',
259 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000260 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000261 ],
borenet48087572015-04-02 12:16:36 -0700262 'sources': [
263 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000264 ],
265 },
266 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000267 'target_name': 'skpinfo',
268 'type': 'executable',
269 'sources': [
270 '../tools/skpinfo.cpp',
271 ],
272 'include_dirs': [
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000273 '../src/core/',
274 ],
275 'dependencies': [
276 'flags.gyp:flags',
277 'skia_lib.gyp:skia_lib',
278 ],
279 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000280 {
mtklein60c04752015-07-08 10:06:01 -0700281 'target_name': 'flatten',
282 'type': 'executable',
283 'sources': [
284 '../tools/flatten.cpp',
285 ],
286 'dependencies': [
287 'skia_lib.gyp:skia_lib',
288 ],
289 },
290 {
fmalita2aafe6f2015-02-06 12:51:10 -0800291 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800292 'target_name': 'skp2svg',
293 'type': 'executable',
294 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800295 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800296 '../tools/LazyDecodeBitmap.cpp',
297 ],
298 'include_dirs': [
299 '../src/core/',
300 '../src/lazy/',
301 '../tools/',
302 ],
303 'dependencies': [
304 'flags.gyp:flags',
305 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800306 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800307 'xml.gyp:xml',
308 ],
309 },
310 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000311 'target_name': 'gpuveto',
312 'type': 'executable',
313 'sources': [
314 '../tools/gpuveto.cpp',
315 '../tools/LazyDecodeBitmap.cpp',
316 ],
317 'include_dirs': [
318 '../src/core/',
319 '../src/images',
320 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000321 ],
322 'dependencies': [
323 'flags.gyp:flags',
324 'skia_lib.gyp:skia_lib',
325 ],
326 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000327 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000328 'target_name': 'lua_app',
329 'type': 'executable',
330 'sources': [
331 '../tools/lua/lua_app.cpp',
332 '../src/utils/SkLua.cpp',
333 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000334 'include_dirs': [
335 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
336 '../src/gpu/',
337 '../src/core/',
338 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000339 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000340 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000341 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000342 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000343 'pdf.gyp:pdf',
344 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000345 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000346 ],
347 },
348 {
reed@google.comdff7e112013-05-15 19:34:20 +0000349 'target_name': 'lua_pictures',
350 'type': 'executable',
351 'sources': [
352 '../tools/lua/lua_pictures.cpp',
353 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000354 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000355 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000356 'include_dirs': [
357 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
358 '../src/gpu/',
359 '../src/core/',
360 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000361 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000362 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000363 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000364 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000365 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000366 'tools.gyp:picture_renderer',
367 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000368 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000369 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000370 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000371 ],
372 },
373 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000374 'target_name': 'render_pictures',
375 'type': 'executable',
376 'sources': [
377 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000378 ],
379 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000380 '../src/core',
381 '../src/images',
382 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000383 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000384 ],
385 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000386 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000387 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000388 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000389 'tools.gyp:picture_utils',
390 ],
391 },
392 {
reed@google.com006db0f2012-06-27 19:33:29 +0000393 'target_name': 'bench_pictures',
394 'type': 'executable',
395 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700396 '../bench/BenchLogger.cpp',
397 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000398 '../tools/PictureBenchmark.cpp',
399 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000400 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000401 ],
402 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000403 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000404 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000405 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000406 ],
407 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700408 'timer',
409 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000410 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000411 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000412 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000413 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700414 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000415 ],
scroggo3eb258d2014-07-17 06:58:28 -0700416 'conditions': [
417 ['skia_android_framework == 1', {
418 'libraries': [ '-lskia' ],
419 }],
420 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000421 },
422 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000423 'target_name': 'dump_record',
424 'type': 'executable',
425 'sources': [
426 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000427 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000428 '../tools/LazyDecodeBitmap.cpp',
429 ],
430 'include_dirs': [
431 '../src/core/',
432 '../src/images',
433 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000434 ],
435 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700436 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000437 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000438 'skia_lib.gyp:skia_lib',
439 ],
440 },
441 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000442 'target_name': 'picture_renderer',
443 'type': 'static_library',
444 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000445 '../tools/image_expectations.h',
446 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000447 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000448 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000449 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000450 '../tools/PictureRenderingFlags.h',
451 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000452 '../tools/CopyTilesRenderer.h',
453 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000454 '../src/pipe/utils/SamplePipeControllers.h',
455 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000456 ],
457 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000458 '../src/core',
459 '../src/images',
460 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000461 '../src/pipe/utils/',
462 '../src/utils/',
463 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000464 'direct_dependent_settings': {
465 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000466 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000467 '../third_party/externals/jsoncpp-chromium/overrides/include/',
468 '../third_party/externals/jsoncpp/include/',
469 ],
470 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000471 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000472 'flags.gyp:flags',
473 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000474 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000475 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000476 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000477 'conditions': [
478 ['skia_gpu == 1',
479 {
480 'include_dirs' : [
481 '../src/gpu',
482 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000483 'dependencies': [
484 'gputest.gyp:skgputest',
485 ],
djsollene4545212014-11-13 11:12:41 -0800486 'export_dependent_settings': [
487 'gputest.gyp:skgputest',
488 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000489 },
490 ],
491 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000492 },
493 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000494 'target_name': 'render_pdfs',
495 'type': 'executable',
496 'sources': [
497 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000498 ],
499 'include_dirs': [
halcanary0bef17a2014-08-07 07:24:47 -0700500 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000501 '../src/pipe/utils/',
502 '../src/utils/',
503 ],
504 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700505 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000506 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000507 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000508 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700509 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000510 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000511 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000512 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000513 {
514 'dependencies': [
515 'tools.gyp:win_dbghelp',
516 ],
517 },
518 ],
519 # VS static libraries don't have a linker option. We must set a global
520 # project linker option, or add it to each executable.
521 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000522 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000523 {
524 'msvs_settings': {
525 'VCLinkerTool': {
526 'AdditionalDependencies': [
527 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
528 ],
529 },
530 },
531 },
532 ],
533 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000534 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000535 {
536 'msvs_settings': {
537 'VCLinkerTool': {
538 'AdditionalDependencies': [
539 '<(skia_win_debuggers_path)/DbgHelp.lib',
540 ],
541 },
542 },
543 },
544 ],
545 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000546 },
547 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000548 'target_name': 'picture_utils',
549 'type': 'static_library',
550 'sources': [
551 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000552 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000553 ],
554 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000555 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000556 ],
reed@google.come52d2912013-05-15 20:01:07 +0000557 'direct_dependent_settings': {
558 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700559 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000560 ],
561 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000562 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000563 {
564 'target_name': 'pinspect',
565 'type': 'executable',
566 'sources': [
567 '../tools/pinspect.cpp',
568 ],
569 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000570 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000571 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000572 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000573 ],
574 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000575 {
reeda816d952014-12-17 13:08:17 -0800576 'target_name': 'imgconv',
577 'type': 'executable',
578 'sources': [
579 '../tools/imgconv.cpp',
580 ],
581 'dependencies': [
582 'flags.gyp:flags',
583 'skia_lib.gyp:skia_lib',
584 ],
585 },
586 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000587 'target_name': 'filter',
588 'type': 'executable',
589 'include_dirs' : [
590 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000591 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000592 ],
593 'sources': [
594 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000595 '../src/utils/debugger/SkDrawCommand.h',
596 '../src/utils/debugger/SkDrawCommand.cpp',
597 '../src/utils/debugger/SkDebugCanvas.h',
598 '../src/utils/debugger/SkDebugCanvas.cpp',
599 '../src/utils/debugger/SkObjectParser.h',
600 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000601 ],
602 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000603 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000604 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000605 ],
606 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000607 {
608 'target_name': 'test_image_decoder',
609 'type': 'executable',
610 'sources': [
611 '../tools/test_image_decoder.cpp',
612 ],
613 'dependencies': [
614 'skia_lib.gyp:skia_lib',
615 ],
616 },
halcanary0d154ee2014-08-11 11:33:51 -0700617 {
mtkleinafb43792014-08-19 15:55:55 -0700618 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700619 'type': 'static_library',
620 'sources': [
621 '../tools/ProcStats.h',
622 '../tools/ProcStats.cpp',
623 ],
624 'direct_dependent_settings': {
625 'include_dirs': [ '../tools', ],
626 },
627 },
djsollen0b17d6c2014-11-13 12:52:35 -0800628 {
629 'target_name': 'test_public_includes',
630 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800631 # Ensure that our public headers don't have unused params so that clients
632 # (e.g. Android) that include us can build with these warnings enabled
633 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800634 'variables': {
635 'includes_to_test': [
636 '<(skia_include_path)/animator',
637 '<(skia_include_path)/c',
638 '<(skia_include_path)/config',
639 '<(skia_include_path)/core',
640 '<(skia_include_path)/effects',
641 '<(skia_include_path)/gpu',
642 '<(skia_include_path)/images',
643 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800644 '<(skia_include_path)/pipe',
645 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800646 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800647 '<(skia_include_path)/utils',
648 '<(skia_include_path)/views',
649 '<(skia_include_path)/xml',
650 ],
651 'paths_to_ignore': [
652 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800653 '<(skia_include_path)/ports/SkAtomics_std.h',
654 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800655 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700656 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
mtkleina64c48f2015-01-21 13:13:31 -0800657 '<(skia_include_path)/ports/SkMutex_pthread.h',
658 '<(skia_include_path)/ports/SkMutex_win.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800659 '<(skia_include_path)/ports/SkTypeface_mac.h',
660 '<(skia_include_path)/ports/SkTypeface_win.h',
661 '<(skia_include_path)/utils/ios',
662 '<(skia_include_path)/utils/mac',
663 '<(skia_include_path)/utils/win',
664 '<(skia_include_path)/utils/SkDebugUtils.h',
665 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800666 '<(skia_include_path)/views/animated',
667 '<(skia_include_path)/views/SkOSWindow_Android.h',
668 '<(skia_include_path)/views/SkOSWindow_iOS.h',
669 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800670 '<(skia_include_path)/views/SkOSWindow_SDL.h',
671 '<(skia_include_path)/views/SkOSWindow_Unix.h',
672 '<(skia_include_path)/views/SkOSWindow_Win.h',
673 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800674 ],
675 },
676 'include_dirs': [
677 '<@(includes_to_test)',
678 ],
679 'sources': [
680 # unused_param_test.cpp is generated by the action below.
681 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
682 ],
683 'actions': [
684 {
685 'action_name': 'generate_includes_cpp',
686 'inputs': [
687 '../tools/generate_includes_cpp.py',
688 '<@(includes_to_test)',
689 # This causes the gyp generator on mac to fail
690 #'<@(paths_to_ignore)',
691 ],
692 'outputs': [
693 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
694 ],
695 'action': ['python', '../tools/generate_includes_cpp.py',
696 '--ignore', '<(paths_to_ignore)',
697 '<@(_outputs)', '<@(includes_to_test)'],
698 },
699 ],
700 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000701 ],
702 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000703 ['skia_shared_lib',
704 {
705 'targets': [
706 {
707 'target_name': 'sklua',
708 'product_name': 'skia',
709 'product_prefix': '',
710 'product_dir': '<(PRODUCT_DIR)/',
711 'type': 'shared_library',
712 'sources': [
713 '../src/utils/SkLuaCanvas.cpp',
714 '../src/utils/SkLua.cpp',
715 ],
716 'include_dirs': [
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000717 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
718 '../src/gpu/',
719 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000720 '../third_party/lua/src/',
721 ],
722 'dependencies': [
723 'lua.gyp:lua',
724 'pdf.gyp:pdf',
725 'skia_lib.gyp:skia_lib',
726 ],
727 'conditions': [
728 ['skia_os != "win"',
729 {
730 'ldflags': [
731 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
732 ],
733 },
734 ],
735 ],
736 },
737 ],
738 },
739 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000740 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000741 {
742 'targets': [
743 {
744 'target_name': 'win_dbghelp',
745 'type': 'static_library',
746 'defines': [
747 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
748 ],
749 'sources': [
750 '../tools/win_dbghelp.h',
751 '../tools/win_dbghelp.cpp',
752 ],
753 },
754 ],
755 },
756 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000757 ['skia_os == "win"',
758 {
759 'targets': [
760 {
761 'target_name': 'win_lcid',
762 'type': 'executable',
763 'sources': [
764 '../tools/win_lcid.cpp',
765 ],
766 },
767 ],
768 },
769 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400770 ['skia_os == "mac"',
771 {
772 'targets': [
773 {
774 'target_name': 'create_test_font',
775 'type': 'executable',
776 'sources': [
777 '../tools/create_test_font.cpp',
778 ],
779 'include_dirs': [
780 '../src/core',
781 ],
782 'dependencies': [
783 'flags.gyp:flags',
784 'skia_lib.gyp:skia_lib',
785 'resources',
786 ],
787 },
788 ],
789 },
790 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000791 ],
792}