blob: de1d8e94a8ba6dcdbd781a15aed27ff22b79eaa9 [file] [log] [blame]
epoger@google.comccdbd2c2011-06-02 14:38:23 +00001# GYP file to build various tools.
2#
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',
17 'filter',
reed@google.com1ef08bb2013-05-15 20:55:49 +000018 'lua_pictures',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +000019 'lua_app',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000020 'pinspect',
21 'render_pdfs',
22 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000023 'skdiff',
24 'skhello',
25 'skimage',
26 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000027 'conditions': [
28 ['skia_shared_lib',
29 {
30 'dependencies': [
31 'sklua', # This can only be built if skia is built as a shared library
32 ],
33 },
34 ],
35 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000036 },
37 {
38 'target_name': 'skdiff',
39 'type': 'executable',
40 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000041 '../tools/skdiff.cpp',
42 '../tools/skdiff.h',
43 '../tools/skdiff_html.cpp',
44 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000045 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000046 '../tools/skdiff_utils.cpp',
47 '../tools/skdiff_utils.h',
48 ],
49 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +000050 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000051 ],
52 },
53 {
54 'target_name': 'skimagediff',
55 'type': 'executable',
56 'sources': [
57 '../tools/skdiff.cpp',
58 '../tools/skdiff.h',
59 '../tools/skdiff_html.cpp',
60 '../tools/skdiff_html.h',
61 '../tools/skdiff_image.cpp',
62 '../tools/skdiff_utils.cpp',
63 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000064 ],
65 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +000066 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000067 ],
68 },
69 {
70 'target_name': 'skhello',
71 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000072 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +000073 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +000074 ],
75 'conditions': [
76 [ 'skia_os == "nacl"', {
77 'sources': [
78 '../platform_tools/nacl/src/nacl_hello.cpp',
79 ],
80 }, {
81 'sources': [
82 '../tools/skhello.cpp',
83 ],
84 'dependencies': [
85 'pdf.gyp:pdf',
86 'flags.gyp:flags',
87 ],
88 }],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000089 ],
90 },
91 {
92 'target_name': 'skimage',
93 'type': 'executable',
94 'sources': [
95 '../tools/skimage_main.cpp',
96 ],
scroggo@google.com6843bdb2013-05-08 19:14:23 +000097 'include_dirs': [
98 # For SkBitmapHasher.h
99 '../src/utils/',
100 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000101 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000102 'skia_lib.gyp:skia_lib',
scroggo@google.comb41ff952013-04-11 15:53:35 +0000103 'flags.gyp:flags',
scroggo@google.com6843bdb2013-05-08 19:14:23 +0000104 'gm.gyp:gm_expectations',
scroggo@google.com6843bdb2013-05-08 19:14:23 +0000105 'jsoncpp.gyp:jsoncpp',
106 'utils.gyp:utils',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000107 ],
108 },
zachr@google.com28c27c82013-06-20 17:15:05 +0000109
junov@chromium.org777442d2012-06-12 14:56:36 +0000110 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000111 'target_name': 'lua_app',
112 'type': 'executable',
113 'sources': [
114 '../tools/lua/lua_app.cpp',
115 '../src/utils/SkLua.cpp',
116 ],
117 'dependencies': [
118 'skia_lib.gyp:skia_lib',
119 'effects.gyp:effects',
120 'utils.gyp:utils',
121 'images.gyp:images',
122 'pdf.gyp:pdf',
123 'ports.gyp:ports',
124 'lua.gyp:lua',
125 ],
126 },
127 {
reed@google.comdff7e112013-05-15 19:34:20 +0000128 'target_name': 'lua_pictures',
129 'type': 'executable',
130 'sources': [
131 '../tools/lua/lua_pictures.cpp',
132 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000133 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000134 ],
135 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000136 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000137 'effects.gyp:effects',
138 'utils.gyp:utils',
139 'images.gyp:images',
140 'tools.gyp:picture_renderer',
141 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000142 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000143 'ports.gyp:ports',
144 'flags.gyp:flags',
145 'lua.gyp:lua',
146 ],
147 },
148 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000149 'target_name': 'render_pictures',
150 'type': 'executable',
151 'sources': [
152 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000153 ],
154 'include_dirs': [
155 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000156 ],
157 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000158 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000159 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000160 'tools.gyp:picture_utils',
scroggo@google.comd9ba9a02013-03-21 19:43:15 +0000161 'flags.gyp:flags',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000162 ],
163 },
164 {
reed@google.com006db0f2012-06-27 19:33:29 +0000165 'target_name': 'bench_pictures',
166 'type': 'executable',
167 'sources': [
scroggo@google.com9a412522012-09-07 15:21:18 +0000168 '../bench/SkBenchLogger.h',
169 '../bench/SkBenchLogger.cpp',
170 '../bench/TimerData.h',
171 '../bench/TimerData.cpp',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000172 '../tools/bench_pictures_main.cpp',
scroggo@google.com9a412522012-09-07 15:21:18 +0000173 '../tools/PictureBenchmark.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000174 ],
175 'include_dirs': [
176 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000177 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000178 ],
179 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000180 'skia_lib.gyp:skia_lib',
reed@google.com006db0f2012-06-27 19:33:29 +0000181 'tools.gyp:picture_utils',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000182 'tools.gyp:picture_renderer',
183 'bench.gyp:bench_timer',
scroggo@google.comd9ba9a02013-03-21 19:43:15 +0000184 'flags.gyp:flags',
scroggo@google.com9a412522012-09-07 15:21:18 +0000185 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000186 },
187 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000188 'target_name': 'picture_renderer',
189 'type': 'static_library',
190 'sources': [
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000191 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000192 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000193 '../tools/PictureRenderingFlags.h',
194 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000195 '../tools/CopyTilesRenderer.h',
196 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000197 '../src/pipe/utils/SamplePipeControllers.h',
198 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000199 ],
200 'include_dirs': [
junov@chromium.org9313ca42012-11-02 18:11:49 +0000201 '../src/core/',
borenet@google.comefb1d772012-10-10 19:45:51 +0000202 '../src/pipe/utils/',
203 '../src/utils/',
204 ],
205 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000206 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000207 'tools.gyp:picture_utils',
scroggo@google.com09fd4d22013-03-20 14:20:18 +0000208 'flags.gyp:flags',
borenet@google.comefb1d772012-10-10 19:45:51 +0000209 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000210 'conditions': [
211 ['skia_gpu == 1',
212 {
213 'include_dirs' : [
214 '../src/gpu',
215 ],
216 },
217 ],
218 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000219 },
220 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000221 'target_name': 'render_pdfs',
222 'type': 'executable',
223 'sources': [
224 '../tools/render_pdfs_main.cpp',
225 '../tools/PdfRenderer.cpp',
226 '../tools/PdfRenderer.h',
227 ],
228 'include_dirs': [
229 '../src/pipe/utils/',
230 '../src/utils/',
231 ],
232 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000233 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000234 'pdf.gyp:pdf',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000235 'tools.gyp:picture_utils',
236 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000237 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000238 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000239 {
240 'dependencies': [
241 'tools.gyp:win_dbghelp',
242 ],
243 },
244 ],
245 # VS static libraries don't have a linker option. We must set a global
246 # project linker option, or add it to each executable.
247 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000248 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000249 {
250 'msvs_settings': {
251 'VCLinkerTool': {
252 'AdditionalDependencies': [
253 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
254 ],
255 },
256 },
257 },
258 ],
259 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000260 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000261 {
262 'msvs_settings': {
263 'VCLinkerTool': {
264 'AdditionalDependencies': [
265 '<(skia_win_debuggers_path)/DbgHelp.lib',
266 ],
267 },
268 },
269 },
270 ],
271 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000272 },
273 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000274 'target_name': 'picture_utils',
275 'type': 'static_library',
276 'sources': [
277 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000278 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000279 ],
280 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000281 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000282 ],
reed@google.come52d2912013-05-15 20:01:07 +0000283 'direct_dependent_settings': {
284 'include_dirs': [
reed@google.com9bf99c32013-05-15 20:07:22 +0000285 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000286 ],
287 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000288 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000289 {
290 'target_name': 'pinspect',
291 'type': 'executable',
292 'sources': [
293 '../tools/pinspect.cpp',
294 ],
295 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000296 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000297 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000298 ],
299 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000300 {
301 'target_name': 'filter',
302 'type': 'executable',
303 'include_dirs' : [
304 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +0000305 '../src/utils/debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000306 ],
307 'sources': [
308 '../tools/filtermain.cpp',
robertphillips@google.comd3d377f2012-12-07 20:56:13 +0000309 '../tools/path_utils.h',
robertphillips@google.com3b0a9fe2013-01-31 15:56:22 +0000310 '../tools/path_utils.cpp',
fmalita@google.com86681b32013-06-13 20:59:14 +0000311 '../src/utils/debugger/SkDrawCommand.h',
312 '../src/utils/debugger/SkDrawCommand.cpp',
313 '../src/utils/debugger/SkDebugCanvas.h',
314 '../src/utils/debugger/SkDebugCanvas.cpp',
315 '../src/utils/debugger/SkObjectParser.h',
316 '../src/utils/debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000317 ],
318 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000319 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000320 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000321 ],
322 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000323 ],
324 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000325 ['skia_shared_lib',
326 {
327 'targets': [
328 {
329 'target_name': 'sklua',
330 'product_name': 'skia',
331 'product_prefix': '',
332 'product_dir': '<(PRODUCT_DIR)/',
333 'type': 'shared_library',
334 'sources': [
335 '../src/utils/SkLuaCanvas.cpp',
336 '../src/utils/SkLua.cpp',
337 ],
338 'include_dirs': [
339 '../third_party/lua/src/',
340 ],
341 'dependencies': [
342 'lua.gyp:lua',
343 'pdf.gyp:pdf',
344 'skia_lib.gyp:skia_lib',
345 ],
346 'conditions': [
347 ['skia_os != "win"',
348 {
349 'ldflags': [
350 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
351 ],
352 },
353 ],
354 ],
355 },
356 ],
357 },
358 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000359 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000360 {
361 'targets': [
362 {
363 'target_name': 'win_dbghelp',
364 'type': 'static_library',
365 'defines': [
366 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
367 ],
368 'sources': [
369 '../tools/win_dbghelp.h',
370 '../tools/win_dbghelp.cpp',
371 ],
372 },
373 ],
374 },
375 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000376 ['skia_os == "win"',
377 {
378 'targets': [
379 {
380 'target_name': 'win_lcid',
381 'type': 'executable',
382 'sources': [
383 '../tools/win_lcid.cpp',
384 ],
385 },
386 ],
387 },
388 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000389 ],
390}
391
392# Local Variables:
393# tab-width:2
394# indent-tabs-mode:nil
395# End:
396# vim: set expandtab tabstop=2 shiftwidth=2: