blob: 21d9c02db84e43beb92c8119700ce14826d28463 [file] [log] [blame]
bsalomon3e791242014-12-17 13:43:13 -08001 # GYP file to build various tools.
epoger@google.comccdbd2c2011-06-02 14:38:23 +00002#
3# To build on Linux:
4# ./gyp_skia tools.gyp && make tools
5#
epoger@google.comccdbd2c2011-06-02 14:38:23 +00006{
7 'includes': [
8 'apptype_console.gypi',
epoger@google.comccdbd2c2011-06-02 14:38:23 +00009 ],
10 'targets': [
11 {
12 # Build all executable targets defined below.
13 'target_name': 'tools',
14 'type': 'none',
15 'dependencies': [
edisonn@google.com8ba9a832013-01-18 18:06:22 +000016 'bench_pictures',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +000017 'dump_record',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000018 'filter',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +000019 'gpuveto',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000020 'lua_app',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000021 'lua_pictures',
reeda816d952014-12-17 13:08:17 -080022 'imgconv',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000023 'pinspect',
24 'render_pdfs',
25 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000026 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000027 'skhello',
fmalita93957f42015-01-30 09:03:29 -080028 'skp2svg',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000029 'skpdiff',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +000030 'skpinfo',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000031 'skpmaker',
halcanary@google.comfed30372013-10-04 12:46:45 +000032 'test_image_decoder',
djsollen0b17d6c2014-11-13 12:52:35 -080033 'test_public_includes',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000034 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000035 'conditions': [
36 ['skia_shared_lib',
37 {
38 'dependencies': [
39 'sklua', # This can only be built if skia is built as a shared library
40 ],
41 },
42 ],
43 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000044 },
mtklein9a0d6d62014-12-15 12:47:51 -080045 {
mtklein9ac68ee2014-06-20 11:29:20 -070046 'target_name': 'crash_handler',
47 'type': 'static_library',
48 'sources': [ '../tools/CrashHandler.cpp' ],
49 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
50 'direct_dependent_settings': {
51 'include_dirs': [ '../tools' ],
52 },
scroggoac928f22015-02-10 08:13:26 -080053 'conditions': [
54 [ 'skia_is_bot', {
55 'defines': [ 'SK_CRASH_HANDLER' ],
56 }],
57 ],
58
mtklein9ac68ee2014-06-20 11:29:20 -070059 'all_dependent_settings': {
60 'msvs_settings': {
61 'VCLinkerTool': {
62 'AdditionalDependencies': [ 'Dbghelp.lib' ],
63 }
64 },
65 }
66 },
67 {
68 'target_name': 'resources',
69 'type': 'static_library',
70 'sources': [ '../tools/Resources.cpp' ],
71 'dependencies': [
72 'flags.gyp:flags',
73 'skia_lib.gyp:skia_lib',
74 ],
75 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -070076 'include_dirs': [ '../tools', ],
77 },
78 },
79 {
80 'target_name': 'sk_tool_utils',
81 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -070082 'sources': [
83 '../tools/sk_tool_utils.cpp',
84 '../tools/sk_tool_utils_font.cpp',
85 ],
Cary Clark992c7b02014-07-31 08:58:44 -040086 'include_dirs': [
87 '../src/fonts',
88 ],
tfarina20108912014-06-21 10:54:17 -070089 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -070090 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -040091 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -070092 'skia_lib.gyp:skia_lib',
93 ],
94 'direct_dependent_settings': {
95 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -070096 },
97 },
98 {
99 'target_name' : 'timer',
100 'type': 'static_library',
101 'sources': [
102 '../tools/timer/Timer.cpp',
103 '../tools/timer/TimerData.cpp',
104 ],
105 'include_dirs': [
106 '../src/core',
107 '../src/gpu',
108 ],
109 'direct_dependent_settings': {
110 'include_dirs': ['../tools/timer'],
111 },
112 'dependencies': [
113 'skia_lib.gyp:skia_lib',
114 'jsoncpp.gyp:jsoncpp',
115 ],
116 'conditions': [
117 ['skia_gpu == 1', {
118 'sources': [ '../tools/timer/GpuTimer.cpp' ],
119 }],
120 [ 'skia_os in ["mac", "ios"]', {
121 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
122 }],
123 [ 'skia_os == "win"', {
124 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
125 }],
126 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
127 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
128 }],
129 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
130 'link_settings': { 'libraries': [ '-lrt' ] },
131 }],
132 ],
133 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000134 {
135 'target_name': 'skdiff',
136 'type': 'executable',
137 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000138 '../tools/skdiff.cpp',
139 '../tools/skdiff.h',
140 '../tools/skdiff_html.cpp',
141 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000142 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000143 '../tools/skdiff_utils.cpp',
144 '../tools/skdiff_utils.h',
145 ],
146 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000147 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000148 ],
149 },
150 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000151 'target_name': 'skpdiff',
152 'type': 'executable',
153 'sources': [
154 '../tools/skpdiff/skpdiff_main.cpp',
155 '../tools/skpdiff/SkDiffContext.cpp',
156 '../tools/skpdiff/SkImageDiffer.cpp',
157 '../tools/skpdiff/SkPMetric.cpp',
158 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000159 ],
160 'include_dirs': [
djsollen@google.comefc51b72013-11-12 18:29:17 +0000161 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700162 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000163 ],
164 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700165 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000166 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700167 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000168 ],
169 'cflags': [
170 '-O3',
171 ],
172 'conditions': [
173 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
174 'link_settings': {
175 'libraries': [
176 '-lrt',
177 ],
178 },
179 }],
180 ['skia_opencl', {
181 'sources': [
182 '../tools/skpdiff/SkCLImageDiffer.cpp',
183 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
184 ],
185 'conditions': [
186 [ 'skia_os == "mac"', {
187 'link_settings': {
188 'libraries': [
189 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
190 ]
191 }
192 }, {
193 'link_settings': {
194 'libraries': [
195 '-lOpenCL',
196 ],
197 },
198 }],
199 ],
200 }, { # !skia_opencl
201 'sources': [
202 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
203 ],
204 }],
205 ],
206 },
207 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000208 'target_name': 'skpmaker',
209 'type': 'executable',
210 'sources': [
211 '../tools/skpmaker.cpp',
212 ],
213 'include_dirs': [
214 '../src/core',
215 ],
216 'dependencies': [
217 'flags.gyp:flags',
218 'skia_lib.gyp:skia_lib',
219 ],
220 },
221 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000222 'target_name': 'skimagediff',
223 'type': 'executable',
224 'sources': [
225 '../tools/skdiff.cpp',
226 '../tools/skdiff.h',
227 '../tools/skdiff_html.cpp',
228 '../tools/skdiff_html.h',
229 '../tools/skdiff_image.cpp',
230 '../tools/skdiff_utils.cpp',
231 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000232 ],
233 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000234 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000235 ],
236 },
237 {
238 'target_name': 'skhello',
239 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000240 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000241 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000242 ],
243 'conditions': [
244 [ 'skia_os == "nacl"', {
245 'sources': [
246 '../platform_tools/nacl/src/nacl_hello.cpp',
247 ],
248 }, {
249 'sources': [
250 '../tools/skhello.cpp',
251 ],
252 'dependencies': [
borenet@google.combb522882013-06-17 15:39:43 +0000253 'flags.gyp:flags',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000254 'pdf.gyp:pdf',
borenet@google.combb522882013-06-17 15:39:43 +0000255 ],
256 }],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000257 ],
258 },
259 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000260 'target_name': 'skpinfo',
261 'type': 'executable',
262 'sources': [
263 '../tools/skpinfo.cpp',
264 ],
265 'include_dirs': [
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000266 '../src/core/',
267 ],
268 'dependencies': [
269 'flags.gyp:flags',
270 'skia_lib.gyp:skia_lib',
271 ],
272 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000273 {
fmalita2aafe6f2015-02-06 12:51:10 -0800274 # Superseded by dm, should be removed.
fmalita93957f42015-01-30 09:03:29 -0800275 'target_name': 'skp2svg',
276 'type': 'executable',
277 'sources': [
fmalita2aafe6f2015-02-06 12:51:10 -0800278 '../src/svg/skp2svg.cpp',
fmalita93957f42015-01-30 09:03:29 -0800279 '../tools/LazyDecodeBitmap.cpp',
280 ],
281 'include_dirs': [
282 '../src/core/',
283 '../src/lazy/',
284 '../tools/',
285 ],
286 'dependencies': [
287 'flags.gyp:flags',
288 'skia_lib.gyp:skia_lib',
fmalita2aafe6f2015-02-06 12:51:10 -0800289 'svg.gyp:svg',
fmalita93957f42015-01-30 09:03:29 -0800290 'xml.gyp:xml',
291 ],
292 },
293 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000294 'target_name': 'gpuveto',
295 'type': 'executable',
296 'sources': [
297 '../tools/gpuveto.cpp',
298 '../tools/LazyDecodeBitmap.cpp',
299 ],
300 'include_dirs': [
301 '../src/core/',
302 '../src/images',
303 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000304 ],
305 'dependencies': [
306 'flags.gyp:flags',
307 'skia_lib.gyp:skia_lib',
308 ],
309 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000310 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000311 'target_name': 'lua_app',
312 'type': 'executable',
313 'sources': [
314 '../tools/lua/lua_app.cpp',
315 '../src/utils/SkLua.cpp',
316 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000317 'include_dirs': [
318 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
319 '../src/gpu/',
320 '../src/core/',
321 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000322 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000323 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000324 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000325 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000326 'pdf.gyp:pdf',
327 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000328 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000329 ],
330 },
331 {
reed@google.comdff7e112013-05-15 19:34:20 +0000332 'target_name': 'lua_pictures',
333 'type': 'executable',
334 'sources': [
335 '../tools/lua/lua_pictures.cpp',
336 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000337 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000338 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000339 'include_dirs': [
340 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
341 '../src/gpu/',
342 '../src/core/',
343 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000344 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000345 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000346 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000347 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000348 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000349 'tools.gyp:picture_renderer',
350 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000351 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000352 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000353 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000354 ],
355 },
356 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000357 'target_name': 'render_pictures',
358 'type': 'executable',
359 'sources': [
360 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000361 ],
362 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000363 '../src/core',
364 '../src/images',
365 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000366 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000367 ],
368 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000369 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000370 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000371 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000372 'tools.gyp:picture_utils',
373 ],
374 },
375 {
reed@google.com006db0f2012-06-27 19:33:29 +0000376 'target_name': 'bench_pictures',
377 'type': 'executable',
378 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700379 '../bench/BenchLogger.cpp',
380 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000381 '../tools/PictureBenchmark.cpp',
382 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000383 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000384 ],
385 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000386 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000387 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000388 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000389 ],
390 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700391 'timer',
392 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000393 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000394 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000395 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000396 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700397 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000398 ],
scroggo3eb258d2014-07-17 06:58:28 -0700399 'conditions': [
400 ['skia_android_framework == 1', {
401 'libraries': [ '-lskia' ],
402 }],
403 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000404 },
405 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000406 'target_name': 'dump_record',
407 'type': 'executable',
408 'sources': [
409 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000410 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000411 '../tools/LazyDecodeBitmap.cpp',
412 ],
413 'include_dirs': [
414 '../src/core/',
415 '../src/images',
416 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000417 ],
418 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700419 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000420 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000421 'skia_lib.gyp:skia_lib',
422 ],
423 },
424 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000425 'target_name': 'picture_renderer',
426 'type': 'static_library',
427 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000428 '../tools/image_expectations.h',
429 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000430 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000431 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000432 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000433 '../tools/PictureRenderingFlags.h',
434 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000435 '../tools/CopyTilesRenderer.h',
436 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000437 '../src/pipe/utils/SamplePipeControllers.h',
438 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000439 ],
440 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000441 '../src/core',
442 '../src/images',
443 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000444 '../src/pipe/utils/',
445 '../src/utils/',
446 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000447 'direct_dependent_settings': {
448 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000449 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000450 '../third_party/externals/jsoncpp-chromium/overrides/include/',
451 '../third_party/externals/jsoncpp/include/',
452 ],
453 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000454 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000455 'flags.gyp:flags',
456 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000457 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000458 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000459 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000460 'conditions': [
461 ['skia_gpu == 1',
462 {
463 'include_dirs' : [
464 '../src/gpu',
465 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000466 'dependencies': [
467 'gputest.gyp:skgputest',
468 ],
djsollene4545212014-11-13 11:12:41 -0800469 'export_dependent_settings': [
470 'gputest.gyp:skgputest',
471 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000472 },
473 ],
474 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000475 },
476 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000477 'target_name': 'render_pdfs',
478 'type': 'executable',
479 'sources': [
480 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000481 ],
482 'include_dirs': [
halcanary0bef17a2014-08-07 07:24:47 -0700483 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000484 '../src/pipe/utils/',
485 '../src/utils/',
486 ],
487 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700488 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000489 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000490 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000491 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700492 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000493 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000494 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000495 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000496 {
497 'dependencies': [
498 'tools.gyp:win_dbghelp',
499 ],
500 },
501 ],
502 # VS static libraries don't have a linker option. We must set a global
503 # project linker option, or add it to each executable.
504 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000505 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000506 {
507 'msvs_settings': {
508 'VCLinkerTool': {
509 'AdditionalDependencies': [
510 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
511 ],
512 },
513 },
514 },
515 ],
516 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000517 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000518 {
519 'msvs_settings': {
520 'VCLinkerTool': {
521 'AdditionalDependencies': [
522 '<(skia_win_debuggers_path)/DbgHelp.lib',
523 ],
524 },
525 },
526 },
527 ],
528 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000529 },
530 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000531 'target_name': 'picture_utils',
532 'type': 'static_library',
533 'sources': [
534 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000535 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000536 ],
537 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000538 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000539 ],
reed@google.come52d2912013-05-15 20:01:07 +0000540 'direct_dependent_settings': {
541 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700542 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000543 ],
544 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000545 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000546 {
547 'target_name': 'pinspect',
548 'type': 'executable',
549 'sources': [
550 '../tools/pinspect.cpp',
551 ],
552 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000553 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000554 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000555 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000556 ],
557 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000558 {
reeda816d952014-12-17 13:08:17 -0800559 'target_name': 'imgconv',
560 'type': 'executable',
561 'sources': [
562 '../tools/imgconv.cpp',
563 ],
564 'dependencies': [
565 'flags.gyp:flags',
566 'skia_lib.gyp:skia_lib',
567 ],
568 },
569 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000570 'target_name': 'filter',
571 'type': 'executable',
572 'include_dirs' : [
573 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000574 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000575 ],
576 'sources': [
577 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000578 '../src/utils/debugger/SkDrawCommand.h',
579 '../src/utils/debugger/SkDrawCommand.cpp',
580 '../src/utils/debugger/SkDebugCanvas.h',
581 '../src/utils/debugger/SkDebugCanvas.cpp',
582 '../src/utils/debugger/SkObjectParser.h',
583 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000584 ],
585 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000586 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000587 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000588 ],
589 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000590 {
591 'target_name': 'test_image_decoder',
592 'type': 'executable',
593 'sources': [
594 '../tools/test_image_decoder.cpp',
595 ],
596 'dependencies': [
597 'skia_lib.gyp:skia_lib',
598 ],
599 },
halcanary0d154ee2014-08-11 11:33:51 -0700600 {
mtkleinafb43792014-08-19 15:55:55 -0700601 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700602 'type': 'static_library',
603 'sources': [
604 '../tools/ProcStats.h',
605 '../tools/ProcStats.cpp',
606 ],
607 'direct_dependent_settings': {
608 'include_dirs': [ '../tools', ],
609 },
610 },
djsollen0b17d6c2014-11-13 12:52:35 -0800611 {
612 'target_name': 'test_public_includes',
613 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800614 # Ensure that our public headers don't have unused params so that clients
615 # (e.g. Android) that include us can build with these warnings enabled
616 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800617 'variables': {
618 'includes_to_test': [
619 '<(skia_include_path)/animator',
620 '<(skia_include_path)/c',
621 '<(skia_include_path)/config',
622 '<(skia_include_path)/core',
623 '<(skia_include_path)/effects',
624 '<(skia_include_path)/gpu',
625 '<(skia_include_path)/images',
626 '<(skia_include_path)/pathops',
caryclarkac8d8b82015-01-07 07:36:52 -0800627 '<(skia_include_path)/pdf',
djsollen0b17d6c2014-11-13 12:52:35 -0800628 '<(skia_include_path)/pipe',
629 '<(skia_include_path)/ports',
fmalita02c8fd02015-02-06 08:43:51 -0800630 '<(skia_include_path)/svg/parser',
djsollen0b17d6c2014-11-13 12:52:35 -0800631 '<(skia_include_path)/utils',
632 '<(skia_include_path)/views',
633 '<(skia_include_path)/xml',
634 ],
635 'paths_to_ignore': [
636 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
mtkleina669bc72015-02-02 12:22:07 -0800637 '<(skia_include_path)/ports/SkAtomics_std.h',
638 '<(skia_include_path)/ports/SkAtomics_atomic.h',
mtkleina64c48f2015-01-21 13:13:31 -0800639 '<(skia_include_path)/ports/SkAtomics_sync.h',
mtkleina64c48f2015-01-21 13:13:31 -0800640 '<(skia_include_path)/ports/SkMutex_pthread.h',
641 '<(skia_include_path)/ports/SkMutex_win.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800642 '<(skia_include_path)/ports/SkTypeface_mac.h',
643 '<(skia_include_path)/ports/SkTypeface_win.h',
644 '<(skia_include_path)/utils/ios',
645 '<(skia_include_path)/utils/mac',
646 '<(skia_include_path)/utils/win',
647 '<(skia_include_path)/utils/SkDebugUtils.h',
648 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800649 '<(skia_include_path)/views/animated',
650 '<(skia_include_path)/views/SkOSWindow_Android.h',
651 '<(skia_include_path)/views/SkOSWindow_iOS.h',
652 '<(skia_include_path)/views/SkOSWindow_Mac.h',
653 '<(skia_include_path)/views/SkOSWindow_NaCl.h',
654 '<(skia_include_path)/views/SkOSWindow_SDL.h',
655 '<(skia_include_path)/views/SkOSWindow_Unix.h',
656 '<(skia_include_path)/views/SkOSWindow_Win.h',
657 '<(skia_include_path)/views/SkWindow.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800658 ],
659 },
660 'include_dirs': [
661 '<@(includes_to_test)',
662 ],
663 'sources': [
664 # unused_param_test.cpp is generated by the action below.
665 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
666 ],
667 'actions': [
668 {
669 'action_name': 'generate_includes_cpp',
670 'inputs': [
671 '../tools/generate_includes_cpp.py',
672 '<@(includes_to_test)',
673 # This causes the gyp generator on mac to fail
674 #'<@(paths_to_ignore)',
675 ],
676 'outputs': [
677 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
678 ],
679 'action': ['python', '../tools/generate_includes_cpp.py',
680 '--ignore', '<(paths_to_ignore)',
681 '<@(_outputs)', '<@(includes_to_test)'],
682 },
683 ],
684 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000685 ],
686 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000687 ['skia_shared_lib',
688 {
689 'targets': [
690 {
691 'target_name': 'sklua',
692 'product_name': 'skia',
693 'product_prefix': '',
694 'product_dir': '<(PRODUCT_DIR)/',
695 'type': 'shared_library',
696 'sources': [
697 '../src/utils/SkLuaCanvas.cpp',
698 '../src/utils/SkLua.cpp',
699 ],
700 'include_dirs': [
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000701 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
702 '../src/gpu/',
703 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000704 '../third_party/lua/src/',
705 ],
706 'dependencies': [
707 'lua.gyp:lua',
708 'pdf.gyp:pdf',
709 'skia_lib.gyp:skia_lib',
710 ],
711 'conditions': [
712 ['skia_os != "win"',
713 {
714 'ldflags': [
715 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
716 ],
717 },
718 ],
719 ],
720 },
721 ],
722 },
723 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000724 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000725 {
726 'targets': [
727 {
728 'target_name': 'win_dbghelp',
729 'type': 'static_library',
730 'defines': [
731 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
732 ],
733 'sources': [
734 '../tools/win_dbghelp.h',
735 '../tools/win_dbghelp.cpp',
736 ],
737 },
738 ],
739 },
740 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000741 ['skia_os == "win"',
742 {
743 'targets': [
744 {
745 'target_name': 'win_lcid',
746 'type': 'executable',
747 'sources': [
748 '../tools/win_lcid.cpp',
749 ],
750 },
751 ],
752 },
753 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400754 ['skia_os == "mac"',
755 {
756 'targets': [
757 {
758 'target_name': 'create_test_font',
759 'type': 'executable',
760 'sources': [
761 '../tools/create_test_font.cpp',
762 ],
763 'include_dirs': [
764 '../src/core',
765 ],
766 'dependencies': [
767 'flags.gyp:flags',
768 'skia_lib.gyp:skia_lib',
769 'resources',
770 ],
771 },
772 ],
773 },
774 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000775 ],
776}