blob: 463fa732a78d012549cbb5f1ab2de1aeb577036b [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',
caryclark5ef194c2015-08-31 09:22:38 -070040 'whitelist_typefaces',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000041 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000042 'conditions': [
43 ['skia_shared_lib',
44 {
45 'dependencies': [
46 'sklua', # This can only be built if skia is built as a shared library
47 ],
48 },
49 ],
50 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000051 },
mtklein9a0d6d62014-12-15 12:47:51 -080052 {
caryclark7da2e552015-05-12 08:36:48 -070053 'target_name': 'chrome_fuzz',
54 'type': 'executable',
55 'sources': [
56 '../tools/chrome_fuzz.cpp',
57 ],
58 'dependencies': [
59 'skia_lib.gyp:skia_lib',
60 ],
61 },
62 {
mtklein9ac68ee2014-06-20 11:29:20 -070063 'target_name': 'crash_handler',
64 'type': 'static_library',
65 'sources': [ '../tools/CrashHandler.cpp' ],
66 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
67 'direct_dependent_settings': {
68 'include_dirs': [ '../tools' ],
69 },
scroggoac928f22015-02-10 08:13:26 -080070 'conditions': [
71 [ 'skia_is_bot', {
72 'defines': [ 'SK_CRASH_HANDLER' ],
73 }],
74 ],
75
mtklein9ac68ee2014-06-20 11:29:20 -070076 'all_dependent_settings': {
77 'msvs_settings': {
78 'VCLinkerTool': {
79 'AdditionalDependencies': [ 'Dbghelp.lib' ],
80 }
81 },
82 }
83 },
84 {
85 'target_name': 'resources',
86 'type': 'static_library',
87 'sources': [ '../tools/Resources.cpp' ],
88 'dependencies': [
89 'flags.gyp:flags',
90 'skia_lib.gyp:skia_lib',
91 ],
92 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -070093 'include_dirs': [ '../tools', ],
94 },
95 },
96 {
97 'target_name': 'sk_tool_utils',
98 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -070099 'sources': [
100 '../tools/sk_tool_utils.cpp',
101 '../tools/sk_tool_utils_font.cpp',
102 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400103 'include_dirs': [
104 '../src/fonts',
robertphillips2f0dbc72015-08-20 05:15:06 -0700105 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400106 ],
tfarina20108912014-06-21 10:54:17 -0700107 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700108 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400109 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700110 'skia_lib.gyp:skia_lib',
111 ],
112 'direct_dependent_settings': {
113 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700114 },
115 },
116 {
117 'target_name' : 'timer',
118 'type': 'static_library',
119 'sources': [
120 '../tools/timer/Timer.cpp',
121 '../tools/timer/TimerData.cpp',
122 ],
123 'include_dirs': [
mtkleincd1f2da2015-07-28 08:55:14 -0700124 '../include/private',
mtklein9ac68ee2014-06-20 11:29:20 -0700125 '../src/core',
126 '../src/gpu',
127 ],
128 'direct_dependent_settings': {
129 'include_dirs': ['../tools/timer'],
130 },
131 'dependencies': [
132 'skia_lib.gyp:skia_lib',
133 'jsoncpp.gyp:jsoncpp',
134 ],
135 'conditions': [
136 ['skia_gpu == 1', {
137 'sources': [ '../tools/timer/GpuTimer.cpp' ],
138 }],
139 [ 'skia_os in ["mac", "ios"]', {
140 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
141 }],
142 [ 'skia_os == "win"', {
143 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
144 }],
145 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
146 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
147 }],
148 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
149 'link_settings': { 'libraries': [ '-lrt' ] },
150 }],
151 ],
152 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000153 {
154 'target_name': 'skdiff',
155 'type': 'executable',
156 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000157 '../tools/skdiff.cpp',
158 '../tools/skdiff.h',
159 '../tools/skdiff_html.cpp',
160 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000161 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000162 '../tools/skdiff_utils.cpp',
163 '../tools/skdiff_utils.h',
164 ],
165 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000166 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000167 ],
bungemanf3c15b72015-08-19 11:56:48 -0700168 'xcode_settings': {
169 'conditions': [
170 [ 'skia_osx_deployment_target==""', {
171 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed in env to ld.
172 }, {
173 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)',
174 }],
175 ],
176 'CLANG_CXX_LIBRARY': 'libc++',
177 },
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000178 },
179 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000180 'target_name': 'skpdiff',
181 'type': 'executable',
182 'sources': [
183 '../tools/skpdiff/skpdiff_main.cpp',
184 '../tools/skpdiff/SkDiffContext.cpp',
185 '../tools/skpdiff/SkImageDiffer.cpp',
186 '../tools/skpdiff/SkPMetric.cpp',
187 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000188 ],
189 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700190 '../include/private',
djsollen@google.comefc51b72013-11-12 18:29:17 +0000191 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700192 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000193 ],
194 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700195 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000196 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700197 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000198 ],
199 'cflags': [
200 '-O3',
201 ],
202 'conditions': [
203 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
204 'link_settings': {
205 'libraries': [
206 '-lrt',
borenet283714f2015-06-25 08:05:19 -0700207 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000208 ],
209 },
210 }],
211 ['skia_opencl', {
212 'sources': [
213 '../tools/skpdiff/SkCLImageDiffer.cpp',
214 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
215 ],
216 'conditions': [
217 [ 'skia_os == "mac"', {
218 'link_settings': {
219 'libraries': [
220 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
221 ]
222 }
223 }, {
224 'link_settings': {
225 'libraries': [
226 '-lOpenCL',
227 ],
228 },
229 }],
230 ],
231 }, { # !skia_opencl
232 'sources': [
233 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
234 ],
235 }],
236 ],
237 },
238 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000239 'target_name': 'skpmaker',
240 'type': 'executable',
241 'sources': [
242 '../tools/skpmaker.cpp',
243 ],
244 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700245 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000246 '../src/core',
247 ],
248 'dependencies': [
249 'flags.gyp:flags',
250 'skia_lib.gyp:skia_lib',
251 ],
252 },
253 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000254 'target_name': 'skimagediff',
255 'type': 'executable',
256 'sources': [
257 '../tools/skdiff.cpp',
258 '../tools/skdiff.h',
259 '../tools/skdiff_html.cpp',
260 '../tools/skdiff_html.h',
261 '../tools/skdiff_image.cpp',
262 '../tools/skdiff_utils.cpp',
263 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000264 ],
265 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000266 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000267 ],
268 },
269 {
270 'target_name': 'skhello',
271 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000272 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700273 'flags.gyp:flags',
274 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000275 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000276 ],
borenet48087572015-04-02 12:16:36 -0700277 'sources': [
278 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000279 ],
280 },
281 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000282 'target_name': 'skpinfo',
283 'type': 'executable',
284 'sources': [
285 '../tools/skpinfo.cpp',
286 ],
287 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700288 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000289 '../src/core/',
290 ],
291 'dependencies': [
292 'flags.gyp:flags',
293 'skia_lib.gyp:skia_lib',
294 ],
295 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000296 {
mtklein60c04752015-07-08 10:06:01 -0700297 'target_name': 'flatten',
298 'type': 'executable',
299 'sources': [
300 '../tools/flatten.cpp',
301 ],
302 'dependencies': [
303 'skia_lib.gyp:skia_lib',
304 ],
305 },
306 {
fmalita2aafe6f2015-02-06 12:51:10 -0800307 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800308 'target_name': 'skp2svg',
309 'type': 'executable',
310 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800311 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800312 '../tools/LazyDecodeBitmap.cpp',
313 ],
314 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700315 '../include/private',
fmalita93957f42015-01-30 09:03:29 -0800316 '../src/core/',
317 '../src/lazy/',
318 '../tools/',
319 ],
320 'dependencies': [
321 'flags.gyp:flags',
322 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800323 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800324 'xml.gyp:xml',
325 ],
326 },
327 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000328 'target_name': 'gpuveto',
329 'type': 'executable',
330 'sources': [
331 '../tools/gpuveto.cpp',
332 '../tools/LazyDecodeBitmap.cpp',
333 ],
334 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700335 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000336 '../src/core/',
337 '../src/images',
338 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000339 ],
340 'dependencies': [
341 'flags.gyp:flags',
342 'skia_lib.gyp:skia_lib',
343 ],
344 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000345 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000346 'target_name': 'lua_app',
347 'type': 'executable',
348 'sources': [
349 '../tools/lua/lua_app.cpp',
350 '../src/utils/SkLua.cpp',
351 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000352 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700353 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000354 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
355 '../src/gpu/',
356 '../src/core/',
357 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000358 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000359 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000360 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000361 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000362 'pdf.gyp:pdf',
363 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000364 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000365 ],
366 },
367 {
reed@google.comdff7e112013-05-15 19:34:20 +0000368 'target_name': 'lua_pictures',
369 'type': 'executable',
370 'sources': [
371 '../tools/lua/lua_pictures.cpp',
372 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000373 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000374 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000375 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700376 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000377 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
378 '../src/gpu/',
379 '../src/core/',
380 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000381 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000382 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000383 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000384 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000385 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000386 'tools.gyp:picture_renderer',
387 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000388 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000389 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000390 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000391 ],
392 },
393 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000394 'target_name': 'render_pictures',
395 'type': 'executable',
396 'sources': [
397 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000398 ],
399 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700400 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000401 '../src/core',
402 '../src/images',
403 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000404 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000405 ],
406 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000407 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000408 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000409 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000410 'tools.gyp:picture_utils',
411 ],
412 },
413 {
reed@google.com006db0f2012-06-27 19:33:29 +0000414 'target_name': 'bench_pictures',
415 'type': 'executable',
416 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700417 '../bench/BenchLogger.cpp',
418 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000419 '../tools/PictureBenchmark.cpp',
420 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000421 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000422 ],
423 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700424 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000425 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000426 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000427 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000428 ],
429 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700430 'timer',
431 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000432 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000433 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000434 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000435 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700436 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000437 ],
scroggo3eb258d2014-07-17 06:58:28 -0700438 'conditions': [
439 ['skia_android_framework == 1', {
440 'libraries': [ '-lskia' ],
441 }],
442 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000443 },
444 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000445 'target_name': 'dump_record',
446 'type': 'executable',
447 'sources': [
448 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000449 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000450 '../tools/LazyDecodeBitmap.cpp',
451 ],
452 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700453 '../include/private',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000454 '../src/core/',
455 '../src/images',
456 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000457 ],
458 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700459 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000460 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000461 'skia_lib.gyp:skia_lib',
462 ],
463 },
464 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000465 'target_name': 'picture_renderer',
466 'type': 'static_library',
467 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000468 '../tools/image_expectations.h',
469 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000470 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000471 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000472 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000473 '../tools/PictureRenderingFlags.h',
474 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000475 '../tools/CopyTilesRenderer.h',
476 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000477 '../src/pipe/utils/SamplePipeControllers.h',
478 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000479 ],
480 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700481 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000482 '../src/core',
483 '../src/images',
484 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000485 '../src/pipe/utils/',
486 '../src/utils/',
487 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000488 'direct_dependent_settings': {
489 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000490 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000491 '../third_party/externals/jsoncpp-chromium/overrides/include/',
492 '../third_party/externals/jsoncpp/include/',
493 ],
494 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000495 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000496 'flags.gyp:flags',
497 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000498 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000499 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000500 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000501 'conditions': [
502 ['skia_gpu == 1',
503 {
504 'include_dirs' : [
505 '../src/gpu',
506 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000507 'dependencies': [
508 'gputest.gyp:skgputest',
509 ],
djsollene4545212014-11-13 11:12:41 -0800510 'export_dependent_settings': [
511 'gputest.gyp:skgputest',
512 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000513 },
514 ],
515 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000516 },
517 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000518 'target_name': 'render_pdfs',
519 'type': 'executable',
520 'sources': [
521 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000522 ],
523 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700524 '../include/private',
halcanary0bef17a2014-08-07 07:24:47 -0700525 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000526 '../src/pipe/utils/',
527 '../src/utils/',
528 ],
529 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700530 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000531 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000532 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000533 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700534 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000535 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000536 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000537 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000538 {
539 'dependencies': [
540 'tools.gyp:win_dbghelp',
541 ],
542 },
543 ],
544 # VS static libraries don't have a linker option. We must set a global
545 # project linker option, or add it to each executable.
546 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400547 'skia_arch_type == "x86_64"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000548 {
549 'msvs_settings': {
550 'VCLinkerTool': {
551 'AdditionalDependencies': [
552 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
553 ],
554 },
555 },
556 },
557 ],
558 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400559 'skia_arch_type == "x86"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000560 {
561 'msvs_settings': {
562 'VCLinkerTool': {
563 'AdditionalDependencies': [
564 '<(skia_win_debuggers_path)/DbgHelp.lib',
565 ],
566 },
567 },
568 },
569 ],
570 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000571 },
572 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000573 'target_name': 'picture_utils',
574 'type': 'static_library',
575 'sources': [
576 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000577 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000578 ],
579 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000580 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000581 ],
reed@google.come52d2912013-05-15 20:01:07 +0000582 'direct_dependent_settings': {
583 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700584 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000585 ],
586 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000587 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000588 {
589 'target_name': 'pinspect',
590 'type': 'executable',
591 'sources': [
592 '../tools/pinspect.cpp',
593 ],
594 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000595 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000596 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000597 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000598 ],
599 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000600 {
reeda816d952014-12-17 13:08:17 -0800601 'target_name': 'imgconv',
602 'type': 'executable',
603 'sources': [
604 '../tools/imgconv.cpp',
605 ],
606 'dependencies': [
607 'flags.gyp:flags',
608 'skia_lib.gyp:skia_lib',
609 ],
610 },
611 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000612 'target_name': 'filter',
613 'type': 'executable',
614 'include_dirs' : [
mtkleinfd8ed692015-07-28 09:54:52 -0700615 '../include/private',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000616 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000617 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000618 ],
619 'sources': [
620 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000621 '../src/utils/debugger/SkDrawCommand.h',
622 '../src/utils/debugger/SkDrawCommand.cpp',
623 '../src/utils/debugger/SkDebugCanvas.h',
624 '../src/utils/debugger/SkDebugCanvas.cpp',
625 '../src/utils/debugger/SkObjectParser.h',
626 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000627 ],
628 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000629 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000630 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000631 ],
632 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000633 {
634 'target_name': 'test_image_decoder',
635 'type': 'executable',
636 'sources': [
637 '../tools/test_image_decoder.cpp',
638 ],
639 'dependencies': [
640 'skia_lib.gyp:skia_lib',
641 ],
642 },
halcanary0d154ee2014-08-11 11:33:51 -0700643 {
mtkleinafb43792014-08-19 15:55:55 -0700644 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700645 'type': 'static_library',
646 'sources': [
647 '../tools/ProcStats.h',
648 '../tools/ProcStats.cpp',
649 ],
650 'direct_dependent_settings': {
651 'include_dirs': [ '../tools', ],
652 },
653 },
djsollen0b17d6c2014-11-13 12:52:35 -0800654 {
caryclark5ef194c2015-08-31 09:22:38 -0700655 'target_name': 'whitelist_typefaces',
656 'type': 'executable',
657 'sources': [
658 '../tools/whitelist_typefaces.cpp',
659 ],
660 'dependencies': [
661 'skia_lib.gyp:skia_lib',
662 ],
663 },
664 {
djsollen0b17d6c2014-11-13 12:52:35 -0800665 'target_name': 'test_public_includes',
666 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800667 # Ensure that our public headers don't have unused params so that clients
668 # (e.g. Android) that include us can build with these warnings enabled
669 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800670 'variables': {
671 'includes_to_test': [
672 '<(skia_include_path)/animator',
673 '<(skia_include_path)/c',
674 '<(skia_include_path)/config',
675 '<(skia_include_path)/core',
676 '<(skia_include_path)/effects',
677 '<(skia_include_path)/gpu',
678 '<(skia_include_path)/images',
679 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800680 '<(skia_include_path)/pipe',
681 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800682 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800683 '<(skia_include_path)/utils',
684 '<(skia_include_path)/views',
685 '<(skia_include_path)/xml',
686 ],
687 'paths_to_ignore': [
688 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800689 '<(skia_include_path)/ports/SkAtomics_std.h',
690 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800691 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700692 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
mtkleina64c48f2015-01-21 13:13:31 -0800693 '<(skia_include_path)/ports/SkMutex_pthread.h',
694 '<(skia_include_path)/ports/SkMutex_win.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800695 '<(skia_include_path)/ports/SkTypeface_mac.h',
696 '<(skia_include_path)/ports/SkTypeface_win.h',
697 '<(skia_include_path)/utils/ios',
698 '<(skia_include_path)/utils/mac',
699 '<(skia_include_path)/utils/win',
700 '<(skia_include_path)/utils/SkDebugUtils.h',
701 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800702 '<(skia_include_path)/views/animated',
703 '<(skia_include_path)/views/SkOSWindow_Android.h',
704 '<(skia_include_path)/views/SkOSWindow_iOS.h',
705 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800706 '<(skia_include_path)/views/SkOSWindow_SDL.h',
707 '<(skia_include_path)/views/SkOSWindow_Unix.h',
708 '<(skia_include_path)/views/SkOSWindow_Win.h',
709 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800710 ],
711 },
712 'include_dirs': [
713 '<@(includes_to_test)',
714 ],
715 'sources': [
716 # unused_param_test.cpp is generated by the action below.
717 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
718 ],
719 'actions': [
720 {
721 'action_name': 'generate_includes_cpp',
722 'inputs': [
723 '../tools/generate_includes_cpp.py',
724 '<@(includes_to_test)',
725 # This causes the gyp generator on mac to fail
726 #'<@(paths_to_ignore)',
727 ],
728 'outputs': [
729 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
730 ],
731 'action': ['python', '../tools/generate_includes_cpp.py',
732 '--ignore', '<(paths_to_ignore)',
733 '<@(_outputs)', '<@(includes_to_test)'],
734 },
735 ],
736 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000737 ],
738 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000739 ['skia_shared_lib',
740 {
741 'targets': [
742 {
743 'target_name': 'sklua',
744 'product_name': 'skia',
745 'product_prefix': '',
746 'product_dir': '<(PRODUCT_DIR)/',
747 'type': 'shared_library',
748 'sources': [
749 '../src/utils/SkLuaCanvas.cpp',
750 '../src/utils/SkLua.cpp',
751 ],
752 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700753 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000754 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
755 '../src/gpu/',
756 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000757 '../third_party/lua/src/',
758 ],
759 'dependencies': [
760 'lua.gyp:lua',
761 'pdf.gyp:pdf',
762 'skia_lib.gyp:skia_lib',
763 ],
764 'conditions': [
765 ['skia_os != "win"',
766 {
767 'ldflags': [
768 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
769 ],
770 },
771 ],
772 ],
773 },
774 ],
775 },
776 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000777 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000778 {
779 'targets': [
780 {
781 'target_name': 'win_dbghelp',
782 'type': 'static_library',
783 'defines': [
784 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
785 ],
786 'sources': [
787 '../tools/win_dbghelp.h',
788 '../tools/win_dbghelp.cpp',
789 ],
790 },
791 ],
792 },
793 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000794 ['skia_os == "win"',
795 {
796 'targets': [
797 {
798 'target_name': 'win_lcid',
799 'type': 'executable',
800 'sources': [
801 '../tools/win_lcid.cpp',
802 ],
803 },
804 ],
805 },
806 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400807 ['skia_os == "mac"',
808 {
809 'targets': [
810 {
811 'target_name': 'create_test_font',
812 'type': 'executable',
813 'sources': [
814 '../tools/create_test_font.cpp',
815 ],
816 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700817 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400818 '../src/core',
819 ],
820 'dependencies': [
821 'flags.gyp:flags',
822 'skia_lib.gyp:skia_lib',
823 'resources',
824 ],
825 },
826 ],
827 },
828 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000829 ],
830}