blob: 3ecdf7ba97d40939625e0c48911d292f58744cd0 [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',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +000024 'gpuveto',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000025 'lua_app',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000026 'lua_pictures',
reeda816d952014-12-17 13:08:17 -080027 'imgconv',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000028 'pinspect',
29 'render_pdfs',
30 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000031 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000032 'skhello',
fmalita93957f42015-01-30 09:03:29 -080033 'skp2svg',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000034 'skpdiff',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +000035 'skpinfo',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000036 'skpmaker',
halcanary@google.comfed30372013-10-04 12:46:45 +000037 'test_image_decoder',
djsollen0b17d6c2014-11-13 12:52:35 -080038 'test_public_includes',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000039 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000040 'conditions': [
41 ['skia_shared_lib',
42 {
43 'dependencies': [
44 'sklua', # This can only be built if skia is built as a shared library
45 ],
46 },
47 ],
48 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000049 },
mtklein9a0d6d62014-12-15 12:47:51 -080050 {
caryclark7da2e552015-05-12 08:36:48 -070051 'target_name': 'chrome_fuzz',
52 'type': 'executable',
53 'sources': [
54 '../tools/chrome_fuzz.cpp',
55 ],
56 'dependencies': [
57 'skia_lib.gyp:skia_lib',
58 ],
59 },
60 {
mtklein9ac68ee2014-06-20 11:29:20 -070061 'target_name': 'crash_handler',
62 'type': 'static_library',
63 'sources': [ '../tools/CrashHandler.cpp' ],
64 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
65 'direct_dependent_settings': {
66 'include_dirs': [ '../tools' ],
67 },
scroggoac928f22015-02-10 08:13:26 -080068 'conditions': [
69 [ 'skia_is_bot', {
70 'defines': [ 'SK_CRASH_HANDLER' ],
71 }],
72 ],
73
mtklein9ac68ee2014-06-20 11:29:20 -070074 'all_dependent_settings': {
75 'msvs_settings': {
76 'VCLinkerTool': {
77 'AdditionalDependencies': [ 'Dbghelp.lib' ],
78 }
79 },
80 }
81 },
82 {
83 'target_name': 'resources',
84 'type': 'static_library',
85 'sources': [ '../tools/Resources.cpp' ],
86 'dependencies': [
87 'flags.gyp:flags',
88 'skia_lib.gyp:skia_lib',
89 ],
90 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -070091 'include_dirs': [ '../tools', ],
92 },
93 },
94 {
95 'target_name': 'sk_tool_utils',
96 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -070097 'sources': [
98 '../tools/sk_tool_utils.cpp',
99 '../tools/sk_tool_utils_font.cpp',
100 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400101 'include_dirs': [
102 '../src/fonts',
103 ],
tfarina20108912014-06-21 10:54:17 -0700104 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700105 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400106 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700107 'skia_lib.gyp:skia_lib',
108 ],
109 'direct_dependent_settings': {
110 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700111 },
112 },
113 {
114 'target_name' : 'timer',
115 'type': 'static_library',
116 'sources': [
117 '../tools/timer/Timer.cpp',
118 '../tools/timer/TimerData.cpp',
119 ],
120 'include_dirs': [
121 '../src/core',
122 '../src/gpu',
123 ],
124 'direct_dependent_settings': {
125 'include_dirs': ['../tools/timer'],
126 },
127 'dependencies': [
128 'skia_lib.gyp:skia_lib',
129 'jsoncpp.gyp:jsoncpp',
130 ],
131 'conditions': [
132 ['skia_gpu == 1', {
133 'sources': [ '../tools/timer/GpuTimer.cpp' ],
134 }],
135 [ 'skia_os in ["mac", "ios"]', {
136 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
137 }],
138 [ 'skia_os == "win"', {
139 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
140 }],
141 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
142 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
143 }],
144 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
145 'link_settings': { 'libraries': [ '-lrt' ] },
146 }],
147 ],
148 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000149 {
150 'target_name': 'skdiff',
151 'type': 'executable',
152 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000153 '../tools/skdiff.cpp',
154 '../tools/skdiff.h',
155 '../tools/skdiff_html.cpp',
156 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000157 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000158 '../tools/skdiff_utils.cpp',
159 '../tools/skdiff_utils.h',
160 ],
161 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000162 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000163 ],
164 },
165 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000166 'target_name': 'skpdiff',
167 'type': 'executable',
168 'sources': [
169 '../tools/skpdiff/skpdiff_main.cpp',
170 '../tools/skpdiff/SkDiffContext.cpp',
171 '../tools/skpdiff/SkImageDiffer.cpp',
172 '../tools/skpdiff/SkPMetric.cpp',
173 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000174 ],
175 'include_dirs': [
djsollen@google.comefc51b72013-11-12 18:29:17 +0000176 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700177 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000178 ],
179 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700180 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000181 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700182 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000183 ],
184 'cflags': [
185 '-O3',
186 ],
187 'conditions': [
188 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
189 'link_settings': {
190 'libraries': [
191 '-lrt',
192 ],
193 },
194 }],
195 ['skia_opencl', {
196 'sources': [
197 '../tools/skpdiff/SkCLImageDiffer.cpp',
198 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
199 ],
200 'conditions': [
201 [ 'skia_os == "mac"', {
202 'link_settings': {
203 'libraries': [
204 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
205 ]
206 }
207 }, {
208 'link_settings': {
209 'libraries': [
210 '-lOpenCL',
211 ],
212 },
213 }],
214 ],
215 }, { # !skia_opencl
216 'sources': [
217 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
218 ],
219 }],
220 ],
221 },
222 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000223 'target_name': 'skpmaker',
224 'type': 'executable',
225 'sources': [
226 '../tools/skpmaker.cpp',
227 ],
228 'include_dirs': [
229 '../src/core',
230 ],
231 'dependencies': [
232 'flags.gyp:flags',
233 'skia_lib.gyp:skia_lib',
234 ],
235 },
236 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000237 'target_name': 'skimagediff',
238 'type': 'executable',
239 'sources': [
240 '../tools/skdiff.cpp',
241 '../tools/skdiff.h',
242 '../tools/skdiff_html.cpp',
243 '../tools/skdiff_html.h',
244 '../tools/skdiff_image.cpp',
245 '../tools/skdiff_utils.cpp',
246 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000247 ],
248 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000249 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000250 ],
251 },
252 {
253 'target_name': 'skhello',
254 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000255 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700256 'flags.gyp:flags',
257 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000258 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000259 ],
borenet48087572015-04-02 12:16:36 -0700260 'sources': [
261 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000262 ],
263 },
264 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000265 'target_name': 'skpinfo',
266 'type': 'executable',
267 'sources': [
268 '../tools/skpinfo.cpp',
269 ],
270 'include_dirs': [
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000271 '../src/core/',
272 ],
273 'dependencies': [
274 'flags.gyp:flags',
275 'skia_lib.gyp:skia_lib',
276 ],
277 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000278 {
fmalita2aafe6f2015-02-06 12:51:10 -0800279 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800280 'target_name': 'skp2svg',
281 'type': 'executable',
282 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800283 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800284 '../tools/LazyDecodeBitmap.cpp',
285 ],
286 'include_dirs': [
287 '../src/core/',
288 '../src/lazy/',
289 '../tools/',
290 ],
291 'dependencies': [
292 'flags.gyp:flags',
293 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800294 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800295 'xml.gyp:xml',
296 ],
297 },
298 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000299 'target_name': 'gpuveto',
300 'type': 'executable',
301 'sources': [
302 '../tools/gpuveto.cpp',
303 '../tools/LazyDecodeBitmap.cpp',
304 ],
305 'include_dirs': [
306 '../src/core/',
307 '../src/images',
308 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000309 ],
310 'dependencies': [
311 'flags.gyp:flags',
312 'skia_lib.gyp:skia_lib',
313 ],
314 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000315 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000316 'target_name': 'lua_app',
317 'type': 'executable',
318 'sources': [
319 '../tools/lua/lua_app.cpp',
320 '../src/utils/SkLua.cpp',
321 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000322 'include_dirs': [
323 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
324 '../src/gpu/',
325 '../src/core/',
326 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000327 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000328 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000329 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000330 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000331 'pdf.gyp:pdf',
332 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000333 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000334 ],
335 },
336 {
reed@google.comdff7e112013-05-15 19:34:20 +0000337 'target_name': 'lua_pictures',
338 'type': 'executable',
339 'sources': [
340 '../tools/lua/lua_pictures.cpp',
341 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000342 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000343 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000344 'include_dirs': [
345 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
346 '../src/gpu/',
347 '../src/core/',
348 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000349 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000350 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000351 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000352 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000353 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000354 'tools.gyp:picture_renderer',
355 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000356 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000357 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000358 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000359 ],
360 },
361 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000362 'target_name': 'render_pictures',
363 'type': 'executable',
364 'sources': [
365 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000366 ],
367 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000368 '../src/core',
369 '../src/images',
370 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000371 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000372 ],
373 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000374 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000375 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000376 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000377 'tools.gyp:picture_utils',
378 ],
379 },
380 {
reed@google.com006db0f2012-06-27 19:33:29 +0000381 'target_name': 'bench_pictures',
382 'type': 'executable',
383 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700384 '../bench/BenchLogger.cpp',
385 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000386 '../tools/PictureBenchmark.cpp',
387 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000388 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000389 ],
390 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000391 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000392 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000393 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000394 ],
395 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700396 'timer',
397 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000398 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000399 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000400 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000401 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700402 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000403 ],
scroggo3eb258d2014-07-17 06:58:28 -0700404 'conditions': [
405 ['skia_android_framework == 1', {
406 'libraries': [ '-lskia' ],
407 }],
408 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000409 },
410 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000411 'target_name': 'dump_record',
412 'type': 'executable',
413 'sources': [
414 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000415 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000416 '../tools/LazyDecodeBitmap.cpp',
417 ],
418 'include_dirs': [
419 '../src/core/',
420 '../src/images',
421 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000422 ],
423 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700424 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000425 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000426 'skia_lib.gyp:skia_lib',
427 ],
428 },
429 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000430 'target_name': 'picture_renderer',
431 'type': 'static_library',
432 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000433 '../tools/image_expectations.h',
434 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000435 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000436 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000437 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000438 '../tools/PictureRenderingFlags.h',
439 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000440 '../tools/CopyTilesRenderer.h',
441 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000442 '../src/pipe/utils/SamplePipeControllers.h',
443 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000444 ],
445 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000446 '../src/core',
447 '../src/images',
448 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000449 '../src/pipe/utils/',
450 '../src/utils/',
451 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000452 'direct_dependent_settings': {
453 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000454 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000455 '../third_party/externals/jsoncpp-chromium/overrides/include/',
456 '../third_party/externals/jsoncpp/include/',
457 ],
458 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000459 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000460 'flags.gyp:flags',
461 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000462 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000463 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000464 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000465 'conditions': [
466 ['skia_gpu == 1',
467 {
468 'include_dirs' : [
469 '../src/gpu',
470 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000471 'dependencies': [
472 'gputest.gyp:skgputest',
473 ],
djsollene4545212014-11-13 11:12:41 -0800474 'export_dependent_settings': [
475 'gputest.gyp:skgputest',
476 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000477 },
478 ],
479 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000480 },
481 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000482 'target_name': 'render_pdfs',
483 'type': 'executable',
484 'sources': [
485 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000486 ],
487 'include_dirs': [
halcanary0bef17a2014-08-07 07:24:47 -0700488 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000489 '../src/pipe/utils/',
490 '../src/utils/',
491 ],
492 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700493 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000494 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000495 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000496 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700497 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000498 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000499 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000500 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000501 {
502 'dependencies': [
503 'tools.gyp:win_dbghelp',
504 ],
505 },
506 ],
507 # VS static libraries don't have a linker option. We must set a global
508 # project linker option, or add it to each executable.
509 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000510 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000511 {
512 'msvs_settings': {
513 'VCLinkerTool': {
514 'AdditionalDependencies': [
515 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
516 ],
517 },
518 },
519 },
520 ],
521 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000522 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000523 {
524 'msvs_settings': {
525 'VCLinkerTool': {
526 'AdditionalDependencies': [
527 '<(skia_win_debuggers_path)/DbgHelp.lib',
528 ],
529 },
530 },
531 },
532 ],
533 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000534 },
535 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000536 'target_name': 'picture_utils',
537 'type': 'static_library',
538 'sources': [
539 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000540 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000541 ],
542 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000543 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000544 ],
reed@google.come52d2912013-05-15 20:01:07 +0000545 'direct_dependent_settings': {
546 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700547 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000548 ],
549 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000550 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000551 {
552 'target_name': 'pinspect',
553 'type': 'executable',
554 'sources': [
555 '../tools/pinspect.cpp',
556 ],
557 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000558 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000559 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000560 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000561 ],
562 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000563 {
reeda816d952014-12-17 13:08:17 -0800564 'target_name': 'imgconv',
565 'type': 'executable',
566 'sources': [
567 '../tools/imgconv.cpp',
568 ],
569 'dependencies': [
570 'flags.gyp:flags',
571 'skia_lib.gyp:skia_lib',
572 ],
573 },
574 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000575 'target_name': 'filter',
576 'type': 'executable',
577 'include_dirs' : [
578 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000579 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000580 ],
581 'sources': [
582 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000583 '../src/utils/debugger/SkDrawCommand.h',
584 '../src/utils/debugger/SkDrawCommand.cpp',
585 '../src/utils/debugger/SkDebugCanvas.h',
586 '../src/utils/debugger/SkDebugCanvas.cpp',
587 '../src/utils/debugger/SkObjectParser.h',
588 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000589 ],
590 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000591 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000592 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000593 ],
594 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000595 {
596 'target_name': 'test_image_decoder',
597 'type': 'executable',
598 'sources': [
599 '../tools/test_image_decoder.cpp',
600 ],
601 'dependencies': [
602 'skia_lib.gyp:skia_lib',
603 ],
604 },
halcanary0d154ee2014-08-11 11:33:51 -0700605 {
mtkleinafb43792014-08-19 15:55:55 -0700606 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700607 'type': 'static_library',
608 'sources': [
609 '../tools/ProcStats.h',
610 '../tools/ProcStats.cpp',
611 ],
612 'direct_dependent_settings': {
613 'include_dirs': [ '../tools', ],
614 },
615 },
djsollen0b17d6c2014-11-13 12:52:35 -0800616 {
617 'target_name': 'test_public_includes',
618 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800619 # Ensure that our public headers don't have unused params so that clients
620 # (e.g. Android) that include us can build with these warnings enabled
621 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800622 'variables': {
623 'includes_to_test': [
624 '<(skia_include_path)/animator',
625 '<(skia_include_path)/c',
626 '<(skia_include_path)/config',
627 '<(skia_include_path)/core',
628 '<(skia_include_path)/effects',
629 '<(skia_include_path)/gpu',
630 '<(skia_include_path)/images',
631 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800632 '<(skia_include_path)/pipe',
633 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800634 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800635 '<(skia_include_path)/utils',
636 '<(skia_include_path)/views',
637 '<(skia_include_path)/xml',
638 ],
639 'paths_to_ignore': [
640 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800641 '<(skia_include_path)/ports/SkAtomics_std.h',
642 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800643 '<(skia_include_path)/ports/SkAtomics_sync.h',
mtkleina64c48f2015-01-21 13:13:31 -0800644 '<(skia_include_path)/ports/SkMutex_pthread.h',
645 '<(skia_include_path)/ports/SkMutex_win.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800646 '<(skia_include_path)/ports/SkTypeface_mac.h',
647 '<(skia_include_path)/ports/SkTypeface_win.h',
648 '<(skia_include_path)/utils/ios',
649 '<(skia_include_path)/utils/mac',
650 '<(skia_include_path)/utils/win',
651 '<(skia_include_path)/utils/SkDebugUtils.h',
652 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800653 '<(skia_include_path)/views/animated',
654 '<(skia_include_path)/views/SkOSWindow_Android.h',
655 '<(skia_include_path)/views/SkOSWindow_iOS.h',
656 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800657 '<(skia_include_path)/views/SkOSWindow_SDL.h',
658 '<(skia_include_path)/views/SkOSWindow_Unix.h',
659 '<(skia_include_path)/views/SkOSWindow_Win.h',
660 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800661 ],
662 },
663 'include_dirs': [
664 '<@(includes_to_test)',
665 ],
666 'sources': [
667 # unused_param_test.cpp is generated by the action below.
668 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
669 ],
670 'actions': [
671 {
672 'action_name': 'generate_includes_cpp',
673 'inputs': [
674 '../tools/generate_includes_cpp.py',
675 '<@(includes_to_test)',
676 # This causes the gyp generator on mac to fail
677 #'<@(paths_to_ignore)',
678 ],
679 'outputs': [
680 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
681 ],
682 'action': ['python', '../tools/generate_includes_cpp.py',
683 '--ignore', '<(paths_to_ignore)',
684 '<@(_outputs)', '<@(includes_to_test)'],
685 },
686 ],
687 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000688 ],
689 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000690 ['skia_shared_lib',
691 {
692 'targets': [
693 {
694 'target_name': 'sklua',
695 'product_name': 'skia',
696 'product_prefix': '',
697 'product_dir': '<(PRODUCT_DIR)/',
698 'type': 'shared_library',
699 'sources': [
700 '../src/utils/SkLuaCanvas.cpp',
701 '../src/utils/SkLua.cpp',
702 ],
703 'include_dirs': [
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000704 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
705 '../src/gpu/',
706 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000707 '../third_party/lua/src/',
708 ],
709 'dependencies': [
710 'lua.gyp:lua',
711 'pdf.gyp:pdf',
712 'skia_lib.gyp:skia_lib',
713 ],
714 'conditions': [
715 ['skia_os != "win"',
716 {
717 'ldflags': [
718 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
719 ],
720 },
721 ],
722 ],
723 },
724 ],
725 },
726 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000727 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000728 {
729 'targets': [
730 {
731 'target_name': 'win_dbghelp',
732 'type': 'static_library',
733 'defines': [
734 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
735 ],
736 'sources': [
737 '../tools/win_dbghelp.h',
738 '../tools/win_dbghelp.cpp',
739 ],
740 },
741 ],
742 },
743 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000744 ['skia_os == "win"',
745 {
746 'targets': [
747 {
748 'target_name': 'win_lcid',
749 'type': 'executable',
750 'sources': [
751 '../tools/win_lcid.cpp',
752 ],
753 },
754 ],
755 },
756 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400757 ['skia_os == "mac"',
758 {
759 'targets': [
760 {
761 'target_name': 'create_test_font',
762 'type': 'executable',
763 'sources': [
764 '../tools/create_test_font.cpp',
765 ],
766 'include_dirs': [
767 '../src/core',
768 ],
769 'dependencies': [
770 'flags.gyp:flags',
771 'skia_lib.gyp:skia_lib',
772 'resources',
773 ],
774 },
775 ],
776 },
777 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000778 ],
779}