blob: 1c443229eefaac09e431faf513abf8e5cf159d9c [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',
msaretta5783ae2015-09-08 15:35:32 -070021 'bitmap_region_decoder',
caryclark7da2e552015-05-12 08:36:48 -070022 'chrome_fuzz',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +000023 'dump_record',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000024 'filter',
mtklein60c04752015-07-08 10:06:01 -070025 'flatten',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +000026 'gpuveto',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000027 'lua_app',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000028 'lua_pictures',
reeda816d952014-12-17 13:08:17 -080029 'imgconv',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000030 'pinspect',
31 'render_pdfs',
32 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000033 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000034 'skhello',
fmalita93957f42015-01-30 09:03:29 -080035 'skp2svg',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000036 'skpdiff',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +000037 'skpinfo',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000038 'skpmaker',
halcanary@google.comfed30372013-10-04 12:46:45 +000039 'test_image_decoder',
djsollen0b17d6c2014-11-13 12:52:35 -080040 'test_public_includes',
caryclark5ef194c2015-08-31 09:22:38 -070041 'whitelist_typefaces',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000042 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000043 'conditions': [
44 ['skia_shared_lib',
45 {
46 'dependencies': [
47 'sklua', # This can only be built if skia is built as a shared library
48 ],
49 },
50 ],
51 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000052 },
mtklein9a0d6d62014-12-15 12:47:51 -080053 {
msaretta5783ae2015-09-08 15:35:32 -070054 'target_name': 'bitmap_region_decoder',
55 'type': 'static_library',
56 'sources': [
57 '../tools/SkBitmapRegionCanvas.cpp',
58 '../tools/SkBitmapRegionDecoderInterface.cpp',
59 '../tools/SkBitmapRegionSampler.cpp',
60 ],
61 'include_dirs': [
62 '../include/private'
63 ],
64 'dependencies': [
65 'skia_lib.gyp:skia_lib',
66 ],
67 },
68 {
caryclark7da2e552015-05-12 08:36:48 -070069 'target_name': 'chrome_fuzz',
70 'type': 'executable',
71 'sources': [
72 '../tools/chrome_fuzz.cpp',
73 ],
74 'dependencies': [
75 'skia_lib.gyp:skia_lib',
76 ],
77 },
78 {
mtklein9ac68ee2014-06-20 11:29:20 -070079 'target_name': 'crash_handler',
80 'type': 'static_library',
81 'sources': [ '../tools/CrashHandler.cpp' ],
82 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
83 'direct_dependent_settings': {
84 'include_dirs': [ '../tools' ],
85 },
scroggoac928f22015-02-10 08:13:26 -080086 'conditions': [
87 [ 'skia_is_bot', {
88 'defines': [ 'SK_CRASH_HANDLER' ],
89 }],
90 ],
91
mtklein9ac68ee2014-06-20 11:29:20 -070092 'all_dependent_settings': {
93 'msvs_settings': {
94 'VCLinkerTool': {
95 'AdditionalDependencies': [ 'Dbghelp.lib' ],
96 }
97 },
98 }
99 },
100 {
101 'target_name': 'resources',
102 'type': 'static_library',
103 'sources': [ '../tools/Resources.cpp' ],
104 'dependencies': [
105 'flags.gyp:flags',
106 'skia_lib.gyp:skia_lib',
107 ],
108 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -0700109 'include_dirs': [ '../tools', ],
110 },
111 },
112 {
113 'target_name': 'sk_tool_utils',
114 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -0700115 'sources': [
116 '../tools/sk_tool_utils.cpp',
117 '../tools/sk_tool_utils_font.cpp',
118 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400119 'include_dirs': [
120 '../src/fonts',
robertphillips2f0dbc72015-08-20 05:15:06 -0700121 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400122 ],
tfarina20108912014-06-21 10:54:17 -0700123 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700124 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400125 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700126 'skia_lib.gyp:skia_lib',
127 ],
128 'direct_dependent_settings': {
129 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700130 },
131 },
132 {
133 'target_name' : 'timer',
134 'type': 'static_library',
135 'sources': [
136 '../tools/timer/Timer.cpp',
137 '../tools/timer/TimerData.cpp',
138 ],
139 'include_dirs': [
mtkleincd1f2da2015-07-28 08:55:14 -0700140 '../include/private',
mtklein9ac68ee2014-06-20 11:29:20 -0700141 '../src/core',
142 '../src/gpu',
143 ],
144 'direct_dependent_settings': {
145 'include_dirs': ['../tools/timer'],
146 },
147 'dependencies': [
148 'skia_lib.gyp:skia_lib',
149 'jsoncpp.gyp:jsoncpp',
150 ],
151 'conditions': [
152 ['skia_gpu == 1', {
153 'sources': [ '../tools/timer/GpuTimer.cpp' ],
154 }],
155 [ 'skia_os in ["mac", "ios"]', {
156 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
157 }],
158 [ 'skia_os == "win"', {
159 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
160 }],
161 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
162 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
163 }],
164 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
165 'link_settings': { 'libraries': [ '-lrt' ] },
166 }],
167 ],
168 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000169 {
170 'target_name': 'skdiff',
171 'type': 'executable',
172 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000173 '../tools/skdiff.cpp',
174 '../tools/skdiff.h',
175 '../tools/skdiff_html.cpp',
176 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000177 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000178 '../tools/skdiff_utils.cpp',
179 '../tools/skdiff_utils.h',
180 ],
181 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000182 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000183 ],
bungemanf3c15b72015-08-19 11:56:48 -0700184 'xcode_settings': {
185 'conditions': [
186 [ 'skia_osx_deployment_target==""', {
187 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed in env to ld.
188 }, {
189 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)',
190 }],
191 ],
192 'CLANG_CXX_LIBRARY': 'libc++',
193 },
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000194 },
195 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000196 'target_name': 'skpdiff',
197 'type': 'executable',
198 'sources': [
199 '../tools/skpdiff/skpdiff_main.cpp',
200 '../tools/skpdiff/SkDiffContext.cpp',
201 '../tools/skpdiff/SkImageDiffer.cpp',
202 '../tools/skpdiff/SkPMetric.cpp',
203 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000204 ],
205 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700206 '../include/private',
djsollen@google.comefc51b72013-11-12 18:29:17 +0000207 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700208 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000209 ],
210 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700211 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000212 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700213 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000214 ],
215 'cflags': [
216 '-O3',
217 ],
218 'conditions': [
219 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
220 'link_settings': {
221 'libraries': [
222 '-lrt',
borenet283714f2015-06-25 08:05:19 -0700223 '-pthread',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000224 ],
225 },
226 }],
227 ['skia_opencl', {
228 'sources': [
229 '../tools/skpdiff/SkCLImageDiffer.cpp',
230 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
231 ],
232 'conditions': [
233 [ 'skia_os == "mac"', {
234 'link_settings': {
235 'libraries': [
236 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
237 ]
238 }
239 }, {
240 'link_settings': {
241 'libraries': [
242 '-lOpenCL',
243 ],
244 },
245 }],
246 ],
247 }, { # !skia_opencl
248 'sources': [
249 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
250 ],
251 }],
252 ],
253 },
254 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000255 'target_name': 'skpmaker',
256 'type': 'executable',
257 'sources': [
258 '../tools/skpmaker.cpp',
259 ],
260 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700261 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000262 '../src/core',
263 ],
264 'dependencies': [
265 'flags.gyp:flags',
266 'skia_lib.gyp:skia_lib',
267 ],
268 },
269 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000270 'target_name': 'skimagediff',
271 'type': 'executable',
272 'sources': [
273 '../tools/skdiff.cpp',
274 '../tools/skdiff.h',
275 '../tools/skdiff_html.cpp',
276 '../tools/skdiff_html.h',
277 '../tools/skdiff_image.cpp',
278 '../tools/skdiff_utils.cpp',
279 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000280 ],
281 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000282 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000283 ],
284 },
285 {
286 'target_name': 'skhello',
287 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000288 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700289 'flags.gyp:flags',
290 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000291 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000292 ],
borenet48087572015-04-02 12:16:36 -0700293 'sources': [
294 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000295 ],
296 },
297 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000298 'target_name': 'skpinfo',
299 'type': 'executable',
300 'sources': [
301 '../tools/skpinfo.cpp',
302 ],
303 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700304 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000305 '../src/core/',
306 ],
307 'dependencies': [
308 'flags.gyp:flags',
309 'skia_lib.gyp:skia_lib',
310 ],
311 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000312 {
mtklein60c04752015-07-08 10:06:01 -0700313 'target_name': 'flatten',
314 'type': 'executable',
315 'sources': [
316 '../tools/flatten.cpp',
317 ],
318 'dependencies': [
319 'skia_lib.gyp:skia_lib',
320 ],
321 },
322 {
fmalita2aafe6f2015-02-06 12:51:10 -0800323 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800324 'target_name': 'skp2svg',
325 'type': 'executable',
326 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800327 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800328 '../tools/LazyDecodeBitmap.cpp',
329 ],
330 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700331 '../include/private',
fmalita93957f42015-01-30 09:03:29 -0800332 '../src/core/',
333 '../src/lazy/',
334 '../tools/',
335 ],
336 'dependencies': [
337 'flags.gyp:flags',
338 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800339 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800340 'xml.gyp:xml',
341 ],
342 },
343 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000344 'target_name': 'gpuveto',
345 'type': 'executable',
346 'sources': [
347 '../tools/gpuveto.cpp',
348 '../tools/LazyDecodeBitmap.cpp',
349 ],
350 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700351 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000352 '../src/core/',
353 '../src/images',
354 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000355 ],
356 'dependencies': [
357 'flags.gyp:flags',
358 'skia_lib.gyp:skia_lib',
359 ],
360 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000361 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000362 'target_name': 'lua_app',
363 'type': 'executable',
364 'sources': [
365 '../tools/lua/lua_app.cpp',
366 '../src/utils/SkLua.cpp',
367 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000368 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700369 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000370 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
371 '../src/gpu/',
372 '../src/core/',
373 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000374 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000375 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000376 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000377 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000378 'pdf.gyp:pdf',
379 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000380 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000381 ],
382 },
383 {
reed@google.comdff7e112013-05-15 19:34:20 +0000384 'target_name': 'lua_pictures',
385 'type': 'executable',
386 'sources': [
387 '../tools/lua/lua_pictures.cpp',
388 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000389 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000390 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000391 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700392 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000393 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
394 '../src/gpu/',
395 '../src/core/',
396 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000397 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000398 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000399 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000400 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000401 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000402 'tools.gyp:picture_renderer',
403 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000404 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000405 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000406 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000407 ],
408 },
409 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000410 'target_name': 'render_pictures',
411 'type': 'executable',
412 'sources': [
413 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000414 ],
415 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700416 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000417 '../src/core',
418 '../src/images',
419 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000420 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000421 ],
422 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000423 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000424 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000425 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000426 'tools.gyp:picture_utils',
427 ],
428 },
429 {
reed@google.com006db0f2012-06-27 19:33:29 +0000430 'target_name': 'bench_pictures',
431 'type': 'executable',
432 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700433 '../bench/BenchLogger.cpp',
434 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000435 '../tools/PictureBenchmark.cpp',
436 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000437 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000438 ],
439 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700440 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000441 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000442 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000443 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000444 ],
445 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700446 'timer',
447 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000448 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000449 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000450 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000451 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700452 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000453 ],
scroggo3eb258d2014-07-17 06:58:28 -0700454 'conditions': [
455 ['skia_android_framework == 1', {
456 'libraries': [ '-lskia' ],
457 }],
458 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000459 },
460 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000461 'target_name': 'dump_record',
462 'type': 'executable',
463 'sources': [
464 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000465 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000466 '../tools/LazyDecodeBitmap.cpp',
467 ],
468 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700469 '../include/private',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000470 '../src/core/',
471 '../src/images',
472 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000473 ],
474 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700475 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000476 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000477 'skia_lib.gyp:skia_lib',
478 ],
479 },
480 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000481 'target_name': 'picture_renderer',
482 'type': 'static_library',
483 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000484 '../tools/image_expectations.h',
485 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000486 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000487 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000488 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000489 '../tools/PictureRenderingFlags.h',
490 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000491 '../tools/CopyTilesRenderer.h',
492 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000493 '../src/pipe/utils/SamplePipeControllers.h',
494 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000495 ],
496 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700497 '../include/private',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000498 '../src/core',
499 '../src/images',
500 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000501 '../src/pipe/utils/',
502 '../src/utils/',
503 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000504 'direct_dependent_settings': {
505 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000506 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000507 '../third_party/externals/jsoncpp-chromium/overrides/include/',
508 '../third_party/externals/jsoncpp/include/',
509 ],
510 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000511 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000512 'flags.gyp:flags',
513 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000514 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000515 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000516 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000517 'conditions': [
518 ['skia_gpu == 1',
519 {
520 'include_dirs' : [
521 '../src/gpu',
522 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000523 'dependencies': [
524 'gputest.gyp:skgputest',
525 ],
djsollene4545212014-11-13 11:12:41 -0800526 'export_dependent_settings': [
527 'gputest.gyp:skgputest',
528 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000529 },
530 ],
531 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000532 },
533 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000534 'target_name': 'render_pdfs',
535 'type': 'executable',
536 'sources': [
537 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000538 ],
539 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700540 '../include/private',
halcanary0bef17a2014-08-07 07:24:47 -0700541 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000542 '../src/pipe/utils/',
543 '../src/utils/',
544 ],
545 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700546 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000547 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000548 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000549 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700550 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000551 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000552 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000553 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000554 {
555 'dependencies': [
556 'tools.gyp:win_dbghelp',
557 ],
558 },
559 ],
560 # VS static libraries don't have a linker option. We must set a global
561 # project linker option, or add it to each executable.
562 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400563 'skia_arch_type == "x86_64"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000564 {
565 'msvs_settings': {
566 'VCLinkerTool': {
567 'AdditionalDependencies': [
568 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
569 ],
570 },
571 },
572 },
573 ],
574 ['skia_win_debuggers_path and skia_os == "win" and '
Brian Salomon4239fc22015-07-27 09:10:36 -0400575 'skia_arch_type == "x86"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000576 {
577 'msvs_settings': {
578 'VCLinkerTool': {
579 'AdditionalDependencies': [
580 '<(skia_win_debuggers_path)/DbgHelp.lib',
581 ],
582 },
583 },
584 },
585 ],
586 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000587 },
588 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000589 'target_name': 'picture_utils',
590 'type': 'static_library',
591 'sources': [
592 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000593 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000594 ],
595 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000596 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000597 ],
reed@google.come52d2912013-05-15 20:01:07 +0000598 'direct_dependent_settings': {
599 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700600 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000601 ],
602 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000603 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000604 {
605 'target_name': 'pinspect',
606 'type': 'executable',
607 'sources': [
608 '../tools/pinspect.cpp',
609 ],
610 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000611 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000612 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000613 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000614 ],
615 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000616 {
reeda816d952014-12-17 13:08:17 -0800617 'target_name': 'imgconv',
618 'type': 'executable',
619 'sources': [
620 '../tools/imgconv.cpp',
621 ],
622 'dependencies': [
623 'flags.gyp:flags',
624 'skia_lib.gyp:skia_lib',
625 ],
626 },
627 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000628 'target_name': 'filter',
629 'type': 'executable',
630 'include_dirs' : [
mtkleinfd8ed692015-07-28 09:54:52 -0700631 '../include/private',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000632 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000633 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000634 ],
635 'sources': [
636 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000637 '../src/utils/debugger/SkDrawCommand.h',
638 '../src/utils/debugger/SkDrawCommand.cpp',
639 '../src/utils/debugger/SkDebugCanvas.h',
640 '../src/utils/debugger/SkDebugCanvas.cpp',
641 '../src/utils/debugger/SkObjectParser.h',
642 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000643 ],
644 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000645 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000646 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000647 ],
648 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000649 {
650 'target_name': 'test_image_decoder',
651 'type': 'executable',
652 'sources': [
653 '../tools/test_image_decoder.cpp',
654 ],
655 'dependencies': [
656 'skia_lib.gyp:skia_lib',
657 ],
658 },
halcanary0d154ee2014-08-11 11:33:51 -0700659 {
mtkleinafb43792014-08-19 15:55:55 -0700660 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700661 'type': 'static_library',
662 'sources': [
663 '../tools/ProcStats.h',
664 '../tools/ProcStats.cpp',
665 ],
666 'direct_dependent_settings': {
667 'include_dirs': [ '../tools', ],
668 },
669 },
djsollen0b17d6c2014-11-13 12:52:35 -0800670 {
caryclark5ef194c2015-08-31 09:22:38 -0700671 'target_name': 'whitelist_typefaces',
672 'type': 'executable',
673 'sources': [
674 '../tools/whitelist_typefaces.cpp',
675 ],
676 'dependencies': [
677 'skia_lib.gyp:skia_lib',
678 ],
679 },
680 {
djsollen0b17d6c2014-11-13 12:52:35 -0800681 'target_name': 'test_public_includes',
682 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800683 # Ensure that our public headers don't have unused params so that clients
684 # (e.g. Android) that include us can build with these warnings enabled
685 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800686 'variables': {
687 'includes_to_test': [
688 '<(skia_include_path)/animator',
689 '<(skia_include_path)/c',
690 '<(skia_include_path)/config',
691 '<(skia_include_path)/core',
692 '<(skia_include_path)/effects',
693 '<(skia_include_path)/gpu',
694 '<(skia_include_path)/images',
695 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800696 '<(skia_include_path)/pipe',
697 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800698 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800699 '<(skia_include_path)/utils',
700 '<(skia_include_path)/views',
701 '<(skia_include_path)/xml',
702 ],
703 'paths_to_ignore': [
704 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800705 '<(skia_include_path)/ports/SkAtomics_std.h',
706 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800707 '<(skia_include_path)/ports/SkAtomics_sync.h',
bungeman0b1de262015-06-17 07:55:59 -0700708 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
mtkleina64c48f2015-01-21 13:13:31 -0800709 '<(skia_include_path)/ports/SkMutex_pthread.h',
710 '<(skia_include_path)/ports/SkMutex_win.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800711 '<(skia_include_path)/ports/SkTypeface_mac.h',
712 '<(skia_include_path)/ports/SkTypeface_win.h',
713 '<(skia_include_path)/utils/ios',
714 '<(skia_include_path)/utils/mac',
715 '<(skia_include_path)/utils/win',
716 '<(skia_include_path)/utils/SkDebugUtils.h',
717 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800718 '<(skia_include_path)/views/animated',
719 '<(skia_include_path)/views/SkOSWindow_Android.h',
720 '<(skia_include_path)/views/SkOSWindow_iOS.h',
721 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800722 '<(skia_include_path)/views/SkOSWindow_SDL.h',
723 '<(skia_include_path)/views/SkOSWindow_Unix.h',
724 '<(skia_include_path)/views/SkOSWindow_Win.h',
725 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800726 ],
727 },
728 'include_dirs': [
729 '<@(includes_to_test)',
730 ],
731 'sources': [
732 # unused_param_test.cpp is generated by the action below.
733 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
734 ],
735 'actions': [
736 {
737 'action_name': 'generate_includes_cpp',
738 'inputs': [
739 '../tools/generate_includes_cpp.py',
740 '<@(includes_to_test)',
741 # This causes the gyp generator on mac to fail
742 #'<@(paths_to_ignore)',
743 ],
744 'outputs': [
745 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
746 ],
747 'action': ['python', '../tools/generate_includes_cpp.py',
748 '--ignore', '<(paths_to_ignore)',
749 '<@(_outputs)', '<@(includes_to_test)'],
750 },
751 ],
752 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000753 ],
754 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000755 ['skia_shared_lib',
756 {
757 'targets': [
758 {
759 'target_name': 'sklua',
760 'product_name': 'skia',
761 'product_prefix': '',
762 'product_dir': '<(PRODUCT_DIR)/',
763 'type': 'shared_library',
764 'sources': [
765 '../src/utils/SkLuaCanvas.cpp',
766 '../src/utils/SkLua.cpp',
767 ],
768 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700769 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000770 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
771 '../src/gpu/',
772 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000773 '../third_party/lua/src/',
774 ],
775 'dependencies': [
776 'lua.gyp:lua',
777 'pdf.gyp:pdf',
778 'skia_lib.gyp:skia_lib',
779 ],
780 'conditions': [
781 ['skia_os != "win"',
782 {
783 'ldflags': [
784 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
785 ],
786 },
787 ],
788 ],
789 },
790 ],
791 },
792 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000793 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000794 {
795 'targets': [
796 {
797 'target_name': 'win_dbghelp',
798 'type': 'static_library',
799 'defines': [
800 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
801 ],
802 'sources': [
803 '../tools/win_dbghelp.h',
804 '../tools/win_dbghelp.cpp',
805 ],
806 },
807 ],
808 },
809 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000810 ['skia_os == "win"',
811 {
812 'targets': [
813 {
814 'target_name': 'win_lcid',
815 'type': 'executable',
816 'sources': [
817 '../tools/win_lcid.cpp',
818 ],
819 },
820 ],
821 },
822 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400823 ['skia_os == "mac"',
824 {
825 'targets': [
826 {
827 'target_name': 'create_test_font',
828 'type': 'executable',
829 'sources': [
830 '../tools/create_test_font.cpp',
831 ],
832 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700833 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400834 '../src/core',
835 ],
836 'dependencies': [
837 'flags.gyp:flags',
838 'skia_lib.gyp:skia_lib',
839 'resources',
840 ],
841 },
842 ],
843 },
844 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000845 ],
846}