blob: 855bfd748d8ee685b2c1bfbbf8983b73be388715 [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': [
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000272 '../src/core/',
273 ],
274 'dependencies': [
275 'flags.gyp:flags',
276 'skia_lib.gyp:skia_lib',
277 ],
278 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000279 {
fmalita2aafe6f2015-02-06 12:51:10 -0800280 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800281 'target_name': 'skp2svg',
282 'type': 'executable',
283 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800284 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800285 '../tools/LazyDecodeBitmap.cpp',
286 ],
287 'include_dirs': [
288 '../src/core/',
289 '../src/lazy/',
290 '../tools/',
291 ],
292 'dependencies': [
293 'flags.gyp:flags',
294 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800295 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800296 'xml.gyp:xml',
297 ],
298 },
299 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000300 'target_name': 'gpuveto',
301 'type': 'executable',
302 'sources': [
303 '../tools/gpuveto.cpp',
304 '../tools/LazyDecodeBitmap.cpp',
305 ],
306 'include_dirs': [
307 '../src/core/',
308 '../src/images',
309 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000310 ],
311 'dependencies': [
312 'flags.gyp:flags',
313 'skia_lib.gyp:skia_lib',
314 ],
315 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000316 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000317 'target_name': 'lua_app',
318 'type': 'executable',
319 'sources': [
320 '../tools/lua/lua_app.cpp',
321 '../src/utils/SkLua.cpp',
322 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000323 'include_dirs': [
324 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
325 '../src/gpu/',
326 '../src/core/',
327 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000328 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000329 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000330 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000331 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000332 'pdf.gyp:pdf',
333 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000334 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000335 ],
336 },
337 {
reed@google.comdff7e112013-05-15 19:34:20 +0000338 'target_name': 'lua_pictures',
339 'type': 'executable',
340 'sources': [
341 '../tools/lua/lua_pictures.cpp',
342 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000343 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000344 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000345 'include_dirs': [
346 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
347 '../src/gpu/',
348 '../src/core/',
349 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000350 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000351 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000352 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000353 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000354 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000355 'tools.gyp:picture_renderer',
356 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000357 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000358 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000359 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000360 ],
361 },
362 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000363 'target_name': 'render_pictures',
364 'type': 'executable',
365 'sources': [
366 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000367 ],
368 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000369 '../src/core',
370 '../src/images',
371 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000372 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000373 ],
374 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000375 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000376 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000377 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000378 'tools.gyp:picture_utils',
379 ],
380 },
381 {
reed@google.com006db0f2012-06-27 19:33:29 +0000382 'target_name': 'bench_pictures',
383 'type': 'executable',
384 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700385 '../bench/BenchLogger.cpp',
386 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000387 '../tools/PictureBenchmark.cpp',
388 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000389 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000390 ],
391 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000392 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000393 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000394 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000395 ],
396 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700397 'timer',
398 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000399 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000400 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000401 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000402 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700403 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000404 ],
scroggo3eb258d2014-07-17 06:58:28 -0700405 'conditions': [
406 ['skia_android_framework == 1', {
407 'libraries': [ '-lskia' ],
408 }],
409 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000410 },
411 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000412 'target_name': 'dump_record',
413 'type': 'executable',
414 'sources': [
415 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000416 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000417 '../tools/LazyDecodeBitmap.cpp',
418 ],
419 'include_dirs': [
420 '../src/core/',
421 '../src/images',
422 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000423 ],
424 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700425 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000426 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000427 'skia_lib.gyp:skia_lib',
428 ],
429 },
430 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000431 'target_name': 'picture_renderer',
432 'type': 'static_library',
433 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000434 '../tools/image_expectations.h',
435 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000436 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000437 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000438 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000439 '../tools/PictureRenderingFlags.h',
440 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000441 '../tools/CopyTilesRenderer.h',
442 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000443 '../src/pipe/utils/SamplePipeControllers.h',
444 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000445 ],
446 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000447 '../src/core',
448 '../src/images',
449 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000450 '../src/pipe/utils/',
451 '../src/utils/',
452 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000453 'direct_dependent_settings': {
454 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000455 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000456 '../third_party/externals/jsoncpp-chromium/overrides/include/',
457 '../third_party/externals/jsoncpp/include/',
458 ],
459 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000460 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000461 'flags.gyp:flags',
462 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000463 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000464 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000465 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000466 'conditions': [
467 ['skia_gpu == 1',
468 {
469 'include_dirs' : [
470 '../src/gpu',
471 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000472 'dependencies': [
473 'gputest.gyp:skgputest',
474 ],
djsollene4545212014-11-13 11:12:41 -0800475 'export_dependent_settings': [
476 'gputest.gyp:skgputest',
477 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000478 },
479 ],
480 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000481 },
482 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000483 'target_name': 'render_pdfs',
484 'type': 'executable',
485 'sources': [
486 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000487 ],
488 'include_dirs': [
halcanary0bef17a2014-08-07 07:24:47 -0700489 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000490 '../src/pipe/utils/',
491 '../src/utils/',
492 ],
493 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700494 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000495 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000496 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000497 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700498 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000499 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000500 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000501 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000502 {
503 'dependencies': [
504 'tools.gyp:win_dbghelp',
505 ],
506 },
507 ],
508 # VS static libraries don't have a linker option. We must set a global
509 # project linker option, or add it to each executable.
510 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000511 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000512 {
513 'msvs_settings': {
514 'VCLinkerTool': {
515 'AdditionalDependencies': [
516 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
517 ],
518 },
519 },
520 },
521 ],
522 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000523 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000524 {
525 'msvs_settings': {
526 'VCLinkerTool': {
527 'AdditionalDependencies': [
528 '<(skia_win_debuggers_path)/DbgHelp.lib',
529 ],
530 },
531 },
532 },
533 ],
534 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000535 },
536 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000537 'target_name': 'picture_utils',
538 'type': 'static_library',
539 'sources': [
540 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000541 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000542 ],
543 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000544 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000545 ],
reed@google.come52d2912013-05-15 20:01:07 +0000546 'direct_dependent_settings': {
547 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700548 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000549 ],
550 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000551 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000552 {
553 'target_name': 'pinspect',
554 'type': 'executable',
555 'sources': [
556 '../tools/pinspect.cpp',
557 ],
558 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000559 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000560 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000561 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000562 ],
563 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000564 {
reeda816d952014-12-17 13:08:17 -0800565 'target_name': 'imgconv',
566 'type': 'executable',
567 'sources': [
568 '../tools/imgconv.cpp',
569 ],
570 'dependencies': [
571 'flags.gyp:flags',
572 'skia_lib.gyp:skia_lib',
573 ],
574 },
575 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000576 'target_name': 'filter',
577 'type': 'executable',
578 'include_dirs' : [
579 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000580 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000581 ],
582 'sources': [
583 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000584 '../src/utils/debugger/SkDrawCommand.h',
585 '../src/utils/debugger/SkDrawCommand.cpp',
586 '../src/utils/debugger/SkDebugCanvas.h',
587 '../src/utils/debugger/SkDebugCanvas.cpp',
588 '../src/utils/debugger/SkObjectParser.h',
589 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000590 ],
591 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000592 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000593 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000594 ],
595 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000596 {
597 'target_name': 'test_image_decoder',
598 'type': 'executable',
599 'sources': [
600 '../tools/test_image_decoder.cpp',
601 ],
602 'dependencies': [
603 'skia_lib.gyp:skia_lib',
604 ],
605 },
halcanary0d154ee2014-08-11 11:33:51 -0700606 {
mtkleinafb43792014-08-19 15:55:55 -0700607 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700608 'type': 'static_library',
609 'sources': [
610 '../tools/ProcStats.h',
611 '../tools/ProcStats.cpp',
612 ],
613 'direct_dependent_settings': {
614 'include_dirs': [ '../tools', ],
615 },
616 },
djsollen0b17d6c2014-11-13 12:52:35 -0800617 {
618 'target_name': 'test_public_includes',
619 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800620 # Ensure that our public headers don't have unused params so that clients
621 # (e.g. Android) that include us can build with these warnings enabled
622 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800623 'variables': {
624 'includes_to_test': [
625 '<(skia_include_path)/animator',
626 '<(skia_include_path)/c',
627 '<(skia_include_path)/config',
628 '<(skia_include_path)/core',
629 '<(skia_include_path)/effects',
630 '<(skia_include_path)/gpu',
631 '<(skia_include_path)/images',
632 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800633 '<(skia_include_path)/pipe',
634 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800635 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800636 '<(skia_include_path)/utils',
637 '<(skia_include_path)/views',
638 '<(skia_include_path)/xml',
639 ],
640 'paths_to_ignore': [
641 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800642 '<(skia_include_path)/ports/SkAtomics_std.h',
643 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800644 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700645 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
mtkleina64c48f2015-01-21 13:13:31 -0800646 '<(skia_include_path)/ports/SkMutex_pthread.h',
647 '<(skia_include_path)/ports/SkMutex_win.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800648 '<(skia_include_path)/ports/SkTypeface_mac.h',
649 '<(skia_include_path)/ports/SkTypeface_win.h',
650 '<(skia_include_path)/utils/ios',
651 '<(skia_include_path)/utils/mac',
652 '<(skia_include_path)/utils/win',
653 '<(skia_include_path)/utils/SkDebugUtils.h',
654 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800655 '<(skia_include_path)/views/animated',
656 '<(skia_include_path)/views/SkOSWindow_Android.h',
657 '<(skia_include_path)/views/SkOSWindow_iOS.h',
658 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800659 '<(skia_include_path)/views/SkOSWindow_SDL.h',
660 '<(skia_include_path)/views/SkOSWindow_Unix.h',
661 '<(skia_include_path)/views/SkOSWindow_Win.h',
662 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800663 ],
664 },
665 'include_dirs': [
666 '<@(includes_to_test)',
667 ],
668 'sources': [
669 # unused_param_test.cpp is generated by the action below.
670 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
671 ],
672 'actions': [
673 {
674 'action_name': 'generate_includes_cpp',
675 'inputs': [
676 '../tools/generate_includes_cpp.py',
677 '<@(includes_to_test)',
678 # This causes the gyp generator on mac to fail
679 #'<@(paths_to_ignore)',
680 ],
681 'outputs': [
682 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
683 ],
684 'action': ['python', '../tools/generate_includes_cpp.py',
685 '--ignore', '<(paths_to_ignore)',
686 '<@(_outputs)', '<@(includes_to_test)'],
687 },
688 ],
689 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000690 ],
691 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000692 ['skia_shared_lib',
693 {
694 'targets': [
695 {
696 'target_name': 'sklua',
697 'product_name': 'skia',
698 'product_prefix': '',
699 'product_dir': '<(PRODUCT_DIR)/',
700 'type': 'shared_library',
701 'sources': [
702 '../src/utils/SkLuaCanvas.cpp',
703 '../src/utils/SkLua.cpp',
704 ],
705 'include_dirs': [
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000706 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
707 '../src/gpu/',
708 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000709 '../third_party/lua/src/',
710 ],
711 'dependencies': [
712 'lua.gyp:lua',
713 'pdf.gyp:pdf',
714 'skia_lib.gyp:skia_lib',
715 ],
716 'conditions': [
717 ['skia_os != "win"',
718 {
719 'ldflags': [
720 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
721 ],
722 },
723 ],
724 ],
725 },
726 ],
727 },
728 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000729 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000730 {
731 'targets': [
732 {
733 'target_name': 'win_dbghelp',
734 'type': 'static_library',
735 'defines': [
736 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
737 ],
738 'sources': [
739 '../tools/win_dbghelp.h',
740 '../tools/win_dbghelp.cpp',
741 ],
742 },
743 ],
744 },
745 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000746 ['skia_os == "win"',
747 {
748 'targets': [
749 {
750 'target_name': 'win_lcid',
751 'type': 'executable',
752 'sources': [
753 '../tools/win_lcid.cpp',
754 ],
755 },
756 ],
757 },
758 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400759 ['skia_os == "mac"',
760 {
761 'targets': [
762 {
763 'target_name': 'create_test_font',
764 'type': 'executable',
765 'sources': [
766 '../tools/create_test_font.cpp',
767 ],
768 'include_dirs': [
769 '../src/core',
770 ],
771 'dependencies': [
772 'flags.gyp:flags',
773 'skia_lib.gyp:skia_lib',
774 'resources',
775 ],
776 },
777 ],
778 },
779 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000780 ],
781}