blob: 13416664fce6f4b2e2bfd070313f44dc6b23ed24 [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': [
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000016 'bbh_shootout',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000017 'bench_pictures',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +000018 'dump_record',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000019 'filter',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +000020 'gpuveto',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000021 'lua_app',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000022 'lua_pictures',
reeda816d952014-12-17 13:08:17 -080023 'imgconv',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000024 'pinspect',
25 'render_pdfs',
26 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000027 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000028 'skhello',
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': 'gm_expectations',
47 'type': 'static_library',
48 'include_dirs' : [ '../src/utils/' ],
49 'sources': [
50 '../gm/gm_expectations.cpp',
mtklein9ac68ee2014-06-20 11:29:20 -070051 ],
52 'dependencies': [
53 'jsoncpp.gyp:jsoncpp',
tfarina20108912014-06-21 10:54:17 -070054 'sk_tool_utils',
mtklein9ac68ee2014-06-20 11:29:20 -070055 'skia_lib.gyp:skia_lib',
56 ],
57 'direct_dependent_settings': {
58 'include_dirs': [ '../gm/' ],
59 },
60 },
61 {
62 'target_name': 'crash_handler',
63 'type': 'static_library',
64 'sources': [ '../tools/CrashHandler.cpp' ],
65 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
66 'direct_dependent_settings': {
67 'include_dirs': [ '../tools' ],
68 },
69 'all_dependent_settings': {
70 'msvs_settings': {
71 'VCLinkerTool': {
72 'AdditionalDependencies': [ 'Dbghelp.lib' ],
73 }
74 },
75 }
76 },
77 {
78 'target_name': 'resources',
79 'type': 'static_library',
80 'sources': [ '../tools/Resources.cpp' ],
81 'dependencies': [
82 'flags.gyp:flags',
83 'skia_lib.gyp:skia_lib',
84 ],
85 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -070086 'include_dirs': [ '../tools', ],
87 },
88 },
89 {
90 'target_name': 'sk_tool_utils',
91 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -070092 'sources': [
93 '../tools/sk_tool_utils.cpp',
94 '../tools/sk_tool_utils_font.cpp',
95 ],
Cary Clark992c7b02014-07-31 08:58:44 -040096 'include_dirs': [
97 '../src/fonts',
98 ],
tfarina20108912014-06-21 10:54:17 -070099 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700100 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400101 'flags.gyp:flags',
tfarina20108912014-06-21 10:54:17 -0700102 'skia_lib.gyp:skia_lib',
103 ],
104 'direct_dependent_settings': {
105 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700106 },
107 },
108 {
109 'target_name' : 'timer',
110 'type': 'static_library',
111 'sources': [
112 '../tools/timer/Timer.cpp',
113 '../tools/timer/TimerData.cpp',
114 ],
115 'include_dirs': [
116 '../src/core',
117 '../src/gpu',
118 ],
119 'direct_dependent_settings': {
120 'include_dirs': ['../tools/timer'],
121 },
122 'dependencies': [
123 'skia_lib.gyp:skia_lib',
124 'jsoncpp.gyp:jsoncpp',
125 ],
126 'conditions': [
127 ['skia_gpu == 1', {
128 'sources': [ '../tools/timer/GpuTimer.cpp' ],
129 }],
130 [ 'skia_os in ["mac", "ios"]', {
131 'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
132 }],
133 [ 'skia_os == "win"', {
134 'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
135 }],
136 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
137 'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
138 }],
139 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
140 'link_settings': { 'libraries': [ '-lrt' ] },
141 }],
142 ],
143 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000144 {
145 'target_name': 'skdiff',
146 'type': 'executable',
147 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000148 '../tools/skdiff.cpp',
149 '../tools/skdiff.h',
150 '../tools/skdiff_html.cpp',
151 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000152 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000153 '../tools/skdiff_utils.cpp',
154 '../tools/skdiff_utils.h',
155 ],
156 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000157 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000158 ],
159 },
160 {
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000161 'target_name': 'skpdiff',
162 'type': 'executable',
163 'sources': [
164 '../tools/skpdiff/skpdiff_main.cpp',
165 '../tools/skpdiff/SkDiffContext.cpp',
166 '../tools/skpdiff/SkImageDiffer.cpp',
167 '../tools/skpdiff/SkPMetric.cpp',
168 '../tools/skpdiff/skpdiff_util.cpp',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000169 ],
170 'include_dirs': [
djsollen@google.comefc51b72013-11-12 18:29:17 +0000171 '../src/core/', # needed for SkTLList.h
stephana21b342d2014-08-13 10:36:06 -0700172 '../tools/', # needed for picture_utils::replace_char
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000173 ],
174 'dependencies': [
tfarina1c4d5782014-06-22 16:13:00 -0700175 'flags.gyp:flags',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000176 'skia_lib.gyp:skia_lib',
stephana21b342d2014-08-13 10:36:06 -0700177 'tools.gyp:picture_utils',
zachr@google.com5b3e2b92013-07-22 18:46:45 +0000178 ],
179 'cflags': [
180 '-O3',
181 ],
182 'conditions': [
183 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
184 'link_settings': {
185 'libraries': [
186 '-lrt',
187 ],
188 },
189 }],
190 ['skia_opencl', {
191 'sources': [
192 '../tools/skpdiff/SkCLImageDiffer.cpp',
193 '../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
194 ],
195 'conditions': [
196 [ 'skia_os == "mac"', {
197 'link_settings': {
198 'libraries': [
199 '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
200 ]
201 }
202 }, {
203 'link_settings': {
204 'libraries': [
205 '-lOpenCL',
206 ],
207 },
208 }],
209 ],
210 }, { # !skia_opencl
211 'sources': [
212 '../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
213 ],
214 }],
215 ],
216 },
217 {
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000218 'target_name': 'skpmaker',
219 'type': 'executable',
220 'sources': [
221 '../tools/skpmaker.cpp',
222 ],
223 'include_dirs': [
224 '../src/core',
225 ],
226 'dependencies': [
227 'flags.gyp:flags',
228 'skia_lib.gyp:skia_lib',
229 ],
230 },
231 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000232 'target_name': 'skimagediff',
233 'type': 'executable',
234 'sources': [
235 '../tools/skdiff.cpp',
236 '../tools/skdiff.h',
237 '../tools/skdiff_html.cpp',
238 '../tools/skdiff_html.h',
239 '../tools/skdiff_image.cpp',
240 '../tools/skdiff_utils.cpp',
241 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000242 ],
243 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000244 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000245 ],
246 },
247 {
248 'target_name': 'skhello',
249 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000250 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000251 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000252 ],
253 'conditions': [
254 [ 'skia_os == "nacl"', {
255 'sources': [
256 '../platform_tools/nacl/src/nacl_hello.cpp',
257 ],
258 }, {
259 'sources': [
260 '../tools/skhello.cpp',
261 ],
262 'dependencies': [
borenet@google.combb522882013-06-17 15:39:43 +0000263 'flags.gyp:flags',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000264 'pdf.gyp:pdf',
borenet@google.combb522882013-06-17 15:39:43 +0000265 ],
266 }],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000267 ],
268 },
269 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000270 'target_name': 'skpinfo',
271 'type': 'executable',
272 'sources': [
273 '../tools/skpinfo.cpp',
274 ],
275 'include_dirs': [
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000276 '../src/core/',
277 ],
278 'dependencies': [
279 'flags.gyp:flags',
280 'skia_lib.gyp:skia_lib',
281 ],
282 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000283 {
284 'target_name': 'gpuveto',
285 'type': 'executable',
286 'sources': [
287 '../tools/gpuveto.cpp',
288 '../tools/LazyDecodeBitmap.cpp',
289 ],
290 'include_dirs': [
291 '../src/core/',
292 '../src/images',
293 '../src/lazy',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000294 ],
295 'dependencies': [
296 'flags.gyp:flags',
297 'skia_lib.gyp:skia_lib',
298 ],
299 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000300 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000301 'target_name': 'lua_app',
302 'type': 'executable',
303 'sources': [
304 '../tools/lua/lua_app.cpp',
305 '../src/utils/SkLua.cpp',
306 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000307 'include_dirs': [
308 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
309 '../src/gpu/',
310 '../src/core/',
311 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000312 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000313 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000314 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000315 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000316 'pdf.gyp:pdf',
317 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000318 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000319 ],
320 },
321 {
reed@google.comdff7e112013-05-15 19:34:20 +0000322 'target_name': 'lua_pictures',
323 'type': 'executable',
324 'sources': [
325 '../tools/lua/lua_pictures.cpp',
326 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000327 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000328 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000329 'include_dirs': [
330 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
331 '../src/gpu/',
332 '../src/core/',
333 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000334 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000335 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000336 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000337 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000338 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000339 'tools.gyp:picture_renderer',
340 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000341 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000342 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000343 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000344 ],
345 },
346 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000347 'target_name': 'render_pictures',
348 'type': 'executable',
349 'sources': [
350 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000351 ],
352 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000353 '../src/core',
354 '../src/images',
355 '../src/lazy',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000356 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000357 ],
358 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000359 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000360 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000361 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000362 'tools.gyp:picture_utils',
363 ],
364 },
365 {
reed@google.com006db0f2012-06-27 19:33:29 +0000366 'target_name': 'bench_pictures',
367 'type': 'executable',
368 'sources': [
tfarinaf168b862014-06-19 12:32:29 -0700369 '../bench/BenchLogger.cpp',
370 '../bench/BenchLogger.h',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000371 '../tools/PictureBenchmark.cpp',
372 '../tools/PictureResultsWriter.h',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000373 '../tools/bench_pictures_main.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000374 ],
375 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000376 '../src/core/',
reed@google.com006db0f2012-06-27 19:33:29 +0000377 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000378 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000379 ],
380 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700381 'timer',
382 'crash_handler',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000383 'flags.gyp:flags',
commit-bot@chromium.org37c772a2014-05-29 17:10:24 +0000384 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000385 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000386 'tools.gyp:picture_renderer',
mtklein30e6e2a2014-06-18 11:44:15 -0700387 'tools.gyp:picture_utils',
scroggo@google.com9a412522012-09-07 15:21:18 +0000388 ],
scroggo3eb258d2014-07-17 06:58:28 -0700389 'conditions': [
390 ['skia_android_framework == 1', {
391 'libraries': [ '-lskia' ],
392 }],
393 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000394 },
395 {
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000396 'target_name': 'dump_record',
397 'type': 'executable',
398 'sources': [
399 '../tools/dump_record.cpp',
commit-bot@chromium.org85fd1932014-05-15 16:10:37 +0000400 '../tools/DumpRecord.cpp',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000401 '../tools/LazyDecodeBitmap.cpp',
402 ],
403 'include_dirs': [
404 '../src/core/',
405 '../src/images',
406 '../src/lazy',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000407 ],
408 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700409 'timer',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000410 'flags.gyp:flags',
commit-bot@chromium.org545a21a2014-05-06 19:45:18 +0000411 'skia_lib.gyp:skia_lib',
412 ],
413 },
414 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000415 'target_name': 'picture_renderer',
416 'type': 'static_library',
417 'sources': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000418 '../tools/image_expectations.h',
419 '../tools/image_expectations.cpp',
commit-bot@chromium.org56799e22013-07-16 18:21:46 +0000420 '../tools/LazyDecodeBitmap.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000421 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000422 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000423 '../tools/PictureRenderingFlags.h',
424 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000425 '../tools/CopyTilesRenderer.h',
426 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000427 '../src/pipe/utils/SamplePipeControllers.h',
428 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000429 ],
430 'include_dirs': [
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +0000431 '../src/core',
432 '../src/images',
433 '../src/lazy',
borenet@google.comefb1d772012-10-10 19:45:51 +0000434 '../src/pipe/utils/',
435 '../src/utils/',
436 ],
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000437 'direct_dependent_settings': {
438 'include_dirs': [
commit-bot@chromium.org90c0fbd2014-05-09 03:18:41 +0000439 # needed for JSON headers used within image_expectations.h
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000440 '../third_party/externals/jsoncpp-chromium/overrides/include/',
441 '../third_party/externals/jsoncpp/include/',
442 ],
443 },
borenet@google.comefb1d772012-10-10 19:45:51 +0000444 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000445 'flags.gyp:flags',
446 'jsoncpp.gyp:jsoncpp',
djsollen@google.com52f02972013-06-03 12:10:19 +0000447 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000448 'tools.gyp:picture_utils',
borenet@google.comefb1d772012-10-10 19:45:51 +0000449 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000450 'conditions': [
451 ['skia_gpu == 1',
452 {
453 'include_dirs' : [
454 '../src/gpu',
455 ],
robertphillips@google.com94d8f1e2013-12-18 17:25:33 +0000456 'dependencies': [
457 'gputest.gyp:skgputest',
458 ],
djsollene4545212014-11-13 11:12:41 -0800459 'export_dependent_settings': [
460 'gputest.gyp:skgputest',
461 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000462 },
463 ],
464 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000465 },
466 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000467 'target_name': 'render_pdfs',
468 'type': 'executable',
469 'sources': [
470 '../tools/render_pdfs_main.cpp',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000471 ],
472 'include_dirs': [
halcanary0bef17a2014-08-07 07:24:47 -0700473 '../src/core',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000474 '../src/pipe/utils/',
475 '../src/utils/',
476 ],
477 'dependencies': [
halcanary0bef17a2014-08-07 07:24:47 -0700478 'flags.gyp:flags',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000479 'pdf.gyp:pdf',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000480 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000481 'tools.gyp:picture_utils',
mtkleinafb43792014-08-19 15:55:55 -0700482 'tools.gyp:proc_stats',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000483 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000484 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000485 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000486 {
487 'dependencies': [
488 'tools.gyp:win_dbghelp',
489 ],
490 },
491 ],
492 # VS static libraries don't have a linker option. We must set a global
493 # project linker option, or add it to each executable.
494 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000495 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000496 {
497 'msvs_settings': {
498 'VCLinkerTool': {
499 'AdditionalDependencies': [
500 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
501 ],
502 },
503 },
504 },
505 ],
506 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000507 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000508 {
509 'msvs_settings': {
510 'VCLinkerTool': {
511 'AdditionalDependencies': [
512 '<(skia_win_debuggers_path)/DbgHelp.lib',
513 ],
514 },
515 },
516 },
517 ],
518 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000519 },
520 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000521 'target_name': 'picture_utils',
522 'type': 'static_library',
523 'sources': [
524 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000525 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000526 ],
527 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000528 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000529 ],
reed@google.come52d2912013-05-15 20:01:07 +0000530 'direct_dependent_settings': {
531 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700532 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000533 ],
534 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000535 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000536 {
537 'target_name': 'pinspect',
538 'type': 'executable',
539 'sources': [
540 '../tools/pinspect.cpp',
541 ],
542 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000543 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000544 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000545 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000546 ],
547 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000548 {
reeda816d952014-12-17 13:08:17 -0800549 'target_name': 'imgconv',
550 'type': 'executable',
551 'sources': [
552 '../tools/imgconv.cpp',
553 ],
554 'dependencies': [
555 'flags.gyp:flags',
556 'skia_lib.gyp:skia_lib',
557 ],
558 },
559 {
commit-bot@chromium.org6645cde2013-07-19 18:54:04 +0000560 'target_name': 'bbh_shootout',
561 'type': 'executable',
562 'include_dirs': [
563 '../bench',
564 '../tools/'
565 ],
566 'sources': [
567 '../tools/bbh_shootout.cpp',
568
569 # Bench code:
commit-bot@chromium.org6645cde2013-07-19 18:54:04 +0000570 ],
571 'dependencies': [
mtklein9ac68ee2014-06-20 11:29:20 -0700572 'timer',
commit-bot@chromium.org6645cde2013-07-19 18:54:04 +0000573 'flags.gyp:flags',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000574 'skia_lib.gyp:skia_lib',
575 'tools.gyp:picture_renderer',
576 'tools.gyp:picture_utils',
commit-bot@chromium.org6645cde2013-07-19 18:54:04 +0000577 ],
578 },
579 {
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000580 'target_name': 'filter',
581 'type': 'executable',
582 'include_dirs' : [
583 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000584 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000585 ],
586 'sources': [
587 '../tools/filtermain.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000588 '../src/utils/debugger/SkDrawCommand.h',
589 '../src/utils/debugger/SkDrawCommand.cpp',
590 '../src/utils/debugger/SkDebugCanvas.h',
591 '../src/utils/debugger/SkDebugCanvas.cpp',
592 '../src/utils/debugger/SkObjectParser.h',
593 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000594 ],
595 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000596 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000597 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000598 ],
599 },
halcanary@google.comfed30372013-10-04 12:46:45 +0000600 {
601 'target_name': 'test_image_decoder',
602 'type': 'executable',
603 'sources': [
604 '../tools/test_image_decoder.cpp',
605 ],
606 'dependencies': [
607 'skia_lib.gyp:skia_lib',
608 ],
609 },
halcanary0d154ee2014-08-11 11:33:51 -0700610 {
mtkleinafb43792014-08-19 15:55:55 -0700611 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700612 'type': 'static_library',
613 'sources': [
614 '../tools/ProcStats.h',
615 '../tools/ProcStats.cpp',
616 ],
617 'direct_dependent_settings': {
618 'include_dirs': [ '../tools', ],
619 },
620 },
djsollen0b17d6c2014-11-13 12:52:35 -0800621 {
622 'target_name': 'test_public_includes',
623 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800624 # Ensure that our public headers don't have unused params so that clients
625 # (e.g. Android) that include us can build with these warnings enabled
626 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800627 'variables': {
628 'includes_to_test': [
629 '<(skia_include_path)/animator',
630 '<(skia_include_path)/c',
631 '<(skia_include_path)/config',
632 '<(skia_include_path)/core',
633 '<(skia_include_path)/effects',
634 '<(skia_include_path)/gpu',
635 '<(skia_include_path)/images',
636 '<(skia_include_path)/pathops',
Greg Humphreys21c771b2014-11-17 09:42:09 -0500637 '<(skia_include_path)/pdf',
djsollen0b17d6c2014-11-13 12:52:35 -0800638 '<(skia_include_path)/pipe',
639 '<(skia_include_path)/ports',
640 '<(skia_include_path)/svg',
641 '<(skia_include_path)/utils',
642 '<(skia_include_path)/views',
643 '<(skia_include_path)/xml',
644 ],
645 'paths_to_ignore': [
646 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
647 '<(skia_include_path)/ports/SkTypeface_mac.h',
648 '<(skia_include_path)/ports/SkTypeface_win.h',
649 '<(skia_include_path)/utils/ios',
650 '<(skia_include_path)/utils/mac',
651 '<(skia_include_path)/utils/win',
652 '<(skia_include_path)/utils/SkDebugUtils.h',
653 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800654 '<(skia_include_path)/views/animated',
655 '<(skia_include_path)/views/SkOSWindow_Android.h',
656 '<(skia_include_path)/views/SkOSWindow_iOS.h',
657 '<(skia_include_path)/views/SkOSWindow_Mac.h',
658 '<(skia_include_path)/views/SkOSWindow_NaCl.h',
659 '<(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}