blob: 9b772be56c7966524d17727459c620d8d73e8a1f [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',
borenet283714f2015-06-25 08:05:19 -0700192 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000193 ],
194 },
195 }],
196 ['skia_opencl', {
197 'sources': [
198 '../tools/skpdiff/SkCLImageDiffer.cpp',
199 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
200 ],
201 'conditions': [
202 [ 'skia_os == "mac"', {
203 'link_settings': {
204 'libraries': [
205 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
206 ]
207 }
208 }, {
209 'link_settings': {
210 'libraries': [
211 '-lOpenCL',
212 ],
213 },
214 }],
215 ],
216 }, { # !skia_opencl
217 'sources': [
218 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
219 ],
220 }],
221 ],
222 },
223 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000224 'target_name': 'skpmaker',
225 'type': 'executable',
226 'sources': [
227 '../tools/skpmaker.cpp',
228 ],
229 'include_dirs': [
230 '../src/core',
231 ],
232 'dependencies': [
233 'flags.gyp:flags',
234 'skia_lib.gyp:skia_lib',
235 ],
236 },
237 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000238 'target_name': 'skimagediff',
239 'type': 'executable',
240 'sources': [
241 '../tools/skdiff.cpp',
242 '../tools/skdiff.h',
243 '../tools/skdiff_html.cpp',
244 '../tools/skdiff_html.h',
245 '../tools/skdiff_image.cpp',
246 '../tools/skdiff_utils.cpp',
247 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000248 ],
249 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000250 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000251 ],
252 },
253 {
254 'target_name': 'skhello',
255 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000256 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700257 'flags.gyp:flags',
258 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000259 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000260 ],
borenet48087572015-04-02 12:16:36 -0700261 'sources': [
262 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000263 ],
264 },
265 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000266 'target_name': 'skpinfo',
267 'type': 'executable',
268 'sources': [
269 '../tools/skpinfo.cpp',
270 ],
271 'include_dirs': [
mtkleina89f5512015-07-01 08:41:14 -0700272 '../include/private',
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 {
fmalita2aafe6f2015-02-06 12:51:10 -0800281 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800282 'target_name': 'skp2svg',
283 'type': 'executable',
284 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800285 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800286 '../tools/LazyDecodeBitmap.cpp',
287 ],
288 'include_dirs': [
289 '../src/core/',
290 '../src/lazy/',
291 '../tools/',
292 ],
293 'dependencies': [
294 'flags.gyp:flags',
295 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800296 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800297 'xml.gyp:xml',
298 ],
299 },
300 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000301 'target_name': 'gpuveto',
302 'type': 'executable',
303 'sources': [
304 '../tools/gpuveto.cpp',
305 '../tools/LazyDecodeBitmap.cpp',
306 ],
307 'include_dirs': [
308 '../src/core/',
309 '../src/images',
310 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000311 ],
312 'dependencies': [
313 'flags.gyp:flags',
314 'skia_lib.gyp:skia_lib',
315 ],
316 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000317 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000318 'target_name': 'lua_app',
319 'type': 'executable',
320 'sources': [
321 '../tools/lua/lua_app.cpp',
322 '../src/utils/SkLua.cpp',
323 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000324 'include_dirs': [
325 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
326 '../src/gpu/',
327 '../src/core/',
328 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000329 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000330 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000331 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000332 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000333 'pdf.gyp:pdf',
334 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000335 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000336 ],
337 },
338 {
reed@google.comdff7e112013-05-15 19:34:20 +0000339 'target_name': 'lua_pictures',
340 'type': 'executable',
341 'sources': [
342 '../tools/lua/lua_pictures.cpp',
343 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000344 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000345 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000346 'include_dirs': [
347 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
348 '../src/gpu/',
349 '../src/core/',
350 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000351 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000352 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000353 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000354 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000355 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000356 'tools.gyp:picture_renderer',
357 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000358 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000359 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000360 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000361 ],
362 },
363 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000364 'target_name': 'render_pictures',
365 'type': 'executable',
366 'sources': [
367 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000368 ],
369 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000370 '../src/core',
371 '../src/images',
372 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000373 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000374 ],
375 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000376 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000377 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000378 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000379 'tools.gyp:picture_utils',
380 ],
381 },
382 {
reed@google.com006db0f2012-06-27 19:33:29 +0000383 'target_name': 'bench_pictures',
384 'type': 'executable',
385 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700386 '../bench/BenchLogger.cpp',
387 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000388 '../tools/PictureBenchmark.cpp',
389 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000390 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000391 ],
392 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000393 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000394 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000395 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000396 ],
397 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700398 'timer',
399 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000400 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000401 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000402 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000403 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700404 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000405 ],
scroggo3eb258d2014-07-17 06:58:28 -0700406 'conditions': [
407 ['skia_android_framework == 1', {
408 'libraries': [ '-lskia' ],
409 }],
410 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000411 },
412 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000413 'target_name': 'dump_record',
414 'type': 'executable',
415 'sources': [
416 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000417 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000418 '../tools/LazyDecodeBitmap.cpp',
419 ],
420 'include_dirs': [
mtkleina89f5512015-07-01 08:41:14 -0700421 '../include/private',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000422 '../src/core/',
423 '../src/images',
424 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000425 ],
426 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700427 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000428 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000429 'skia_lib.gyp:skia_lib',
430 ],
431 },
432 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000433 'target_name': 'picture_renderer',
434 'type': 'static_library',
435 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000436 '../tools/image_expectations.h',
437 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000438 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000439 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000440 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000441 '../tools/PictureRenderingFlags.h',
442 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000443 '../tools/CopyTilesRenderer.h',
444 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000445 '../src/pipe/utils/SamplePipeControllers.h',
446 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000447 ],
448 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000449 '../src/core',
450 '../src/images',
451 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000452 '../src/pipe/utils/',
453 '../src/utils/',
454 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000455 'direct_dependent_settings': {
456 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000457 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000458 '../third_party/externals/jsoncpp-chromium/overrides/include/',
459 '../third_party/externals/jsoncpp/include/',
460 ],
461 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000462 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000463 'flags.gyp:flags',
464 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000465 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000466 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000467 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000468 'conditions': [
469 ['skia_gpu == 1',
470 {
471 'include_dirs' : [
472 '../src/gpu',
473 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000474 'dependencies': [
475 'gputest.gyp:skgputest',
476 ],
djsollene4545212014-11-13 11:12:41 -0800477 'export_dependent_settings': [
478 'gputest.gyp:skgputest',
479 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000480 },
481 ],
482 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000483 },
484 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000485 'target_name': 'render_pdfs',
486 'type': 'executable',
487 'sources': [
488 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000489 ],
490 'include_dirs': [
halcanary0bef17a2014-08-07 07:24:47 -0700491 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000492 '../src/pipe/utils/',
493 '../src/utils/',
494 ],
495 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700496 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000497 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000498 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000499 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700500 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000501 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000502 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000503 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000504 {
505 'dependencies': [
506 'tools.gyp:win_dbghelp',
507 ],
508 },
509 ],
510 # VS static libraries don't have a linker option. We must set a global
511 # project linker option, or add it to each executable.
512 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000513 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000514 {
515 'msvs_settings': {
516 'VCLinkerTool': {
517 'AdditionalDependencies': [
518 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
519 ],
520 },
521 },
522 },
523 ],
524 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000525 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000526 {
527 'msvs_settings': {
528 'VCLinkerTool': {
529 'AdditionalDependencies': [
530 '<(skia_win_debuggers_path)/DbgHelp.lib',
531 ],
532 },
533 },
534 },
535 ],
536 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000537 },
538 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000539 'target_name': 'picture_utils',
540 'type': 'static_library',
541 'sources': [
542 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000543 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000544 ],
545 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000546 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000547 ],
reed@google.come52d2912013-05-15 20:01:07 +0000548 'direct_dependent_settings': {
549 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700550 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000551 ],
552 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000553 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000554 {
555 'target_name': 'pinspect',
556 'type': 'executable',
557 'sources': [
558 '../tools/pinspect.cpp',
559 ],
560 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000561 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000562 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000563 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000564 ],
565 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000566 {
reeda816d952014-12-17 13:08:17 -0800567 'target_name': 'imgconv',
568 'type': 'executable',
569 'sources': [
570 '../tools/imgconv.cpp',
571 ],
572 'dependencies': [
573 'flags.gyp:flags',
574 'skia_lib.gyp:skia_lib',
575 ],
576 },
577 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000578 'target_name': 'filter',
579 'type': 'executable',
580 'include_dirs' : [
mtkleina89f5512015-07-01 08:41:14 -0700581 '../include/private',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000582 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000583 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000584 ],
585 'sources': [
586 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000587 '../src/utils/debugger/SkDrawCommand.h',
588 '../src/utils/debugger/SkDrawCommand.cpp',
589 '../src/utils/debugger/SkDebugCanvas.h',
590 '../src/utils/debugger/SkDebugCanvas.cpp',
591 '../src/utils/debugger/SkObjectParser.h',
592 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000593 ],
594 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000595 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000596 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000597 ],
598 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000599 {
600 'target_name': 'test_image_decoder',
601 'type': 'executable',
602 'sources': [
603 '../tools/test_image_decoder.cpp',
604 ],
605 'dependencies': [
606 'skia_lib.gyp:skia_lib',
607 ],
608 },
halcanary0d154ee2014-08-11 11:33:51 -0700609 {
mtkleinafb43792014-08-19 15:55:55 -0700610 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700611 'type': 'static_library',
612 'sources': [
613 '../tools/ProcStats.h',
614 '../tools/ProcStats.cpp',
615 ],
616 'direct_dependent_settings': {
617 'include_dirs': [ '../tools', ],
618 },
619 },
djsollen0b17d6c2014-11-13 12:52:35 -0800620 {
621 'target_name': 'test_public_includes',
622 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800623 # Ensure that our public headers don't have unused params so that clients
624 # (e.g. Android) that include us can build with these warnings enabled
625 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800626 'variables': {
627 'includes_to_test': [
628 '<(skia_include_path)/animator',
629 '<(skia_include_path)/c',
630 '<(skia_include_path)/config',
631 '<(skia_include_path)/core',
632 '<(skia_include_path)/effects',
633 '<(skia_include_path)/gpu',
634 '<(skia_include_path)/images',
635 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800636 '<(skia_include_path)/pipe',
637 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800638 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800639 '<(skia_include_path)/utils',
640 '<(skia_include_path)/views',
641 '<(skia_include_path)/xml',
642 ],
643 'paths_to_ignore': [
644 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800645 '<(skia_include_path)/ports/SkAtomics_std.h',
646 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800647 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700648 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
mtkleina64c48f2015-01-21 13:13:31 -0800649 '<(skia_include_path)/ports/SkMutex_pthread.h',
650 '<(skia_include_path)/ports/SkMutex_win.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800651 '<(skia_include_path)/ports/SkTypeface_mac.h',
652 '<(skia_include_path)/ports/SkTypeface_win.h',
653 '<(skia_include_path)/utils/ios',
654 '<(skia_include_path)/utils/mac',
655 '<(skia_include_path)/utils/win',
656 '<(skia_include_path)/utils/SkDebugUtils.h',
657 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800658 '<(skia_include_path)/views/animated',
659 '<(skia_include_path)/views/SkOSWindow_Android.h',
660 '<(skia_include_path)/views/SkOSWindow_iOS.h',
661 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800662 '<(skia_include_path)/views/SkOSWindow_SDL.h',
663 '<(skia_include_path)/views/SkOSWindow_Unix.h',
664 '<(skia_include_path)/views/SkOSWindow_Win.h',
665 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800666 ],
667 },
668 'include_dirs': [
669 '<@(includes_to_test)',
670 ],
671 'sources': [
672 # unused_param_test.cpp is generated by the action below.
673 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
674 ],
675 'actions': [
676 {
677 'action_name': 'generate_includes_cpp',
678 'inputs': [
679 '../tools/generate_includes_cpp.py',
680 '<@(includes_to_test)',
681 # This causes the gyp generator on mac to fail
682 #'<@(paths_to_ignore)',
683 ],
684 'outputs': [
685 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
686 ],
687 'action': ['python', '../tools/generate_includes_cpp.py',
688 '--ignore', '<(paths_to_ignore)',
689 '<@(_outputs)', '<@(includes_to_test)'],
690 },
691 ],
692 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000693 ],
694 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000695 ['skia_shared_lib',
696 {
697 'targets': [
698 {
699 'target_name': 'sklua',
700 'product_name': 'skia',
701 'product_prefix': '',
702 'product_dir': '<(PRODUCT_DIR)/',
703 'type': 'shared_library',
704 'sources': [
705 '../src/utils/SkLuaCanvas.cpp',
706 '../src/utils/SkLua.cpp',
707 ],
708 'include_dirs': [
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000709 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
710 '../src/gpu/',
711 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000712 '../third_party/lua/src/',
713 ],
714 'dependencies': [
715 'lua.gyp:lua',
716 'pdf.gyp:pdf',
717 'skia_lib.gyp:skia_lib',
718 ],
719 'conditions': [
720 ['skia_os != "win"',
721 {
722 'ldflags': [
723 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
724 ],
725 },
726 ],
727 ],
728 },
729 ],
730 },
731 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000732 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000733 {
734 'targets': [
735 {
736 'target_name': 'win_dbghelp',
737 'type': 'static_library',
738 'defines': [
739 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
740 ],
741 'sources': [
742 '../tools/win_dbghelp.h',
743 '../tools/win_dbghelp.cpp',
744 ],
745 },
746 ],
747 },
748 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000749 ['skia_os == "win"',
750 {
751 'targets': [
752 {
753 'target_name': 'win_lcid',
754 'type': 'executable',
755 'sources': [
756 '../tools/win_lcid.cpp',
757 ],
758 },
759 ],
760 },
761 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400762 ['skia_os == "mac"',
763 {
764 'targets': [
765 {
766 'target_name': 'create_test_font',
767 'type': 'executable',
768 'sources': [
769 '../tools/create_test_font.cpp',
770 ],
771 'include_dirs': [
772 '../src/core',
773 ],
774 'dependencies': [
775 'flags.gyp:flags',
776 'skia_lib.gyp:skia_lib',
777 'resources',
778 ],
779 },
780 ],
781 },
782 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000783 ],
784}