blob: 552dfc8b6f43363620b85a14d77459c5bf42b144 [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 ],
27 },
28 {
29 'target_name': 'skdiff',
30 'type': 'executable',
31 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000032 '../tools/skdiff.cpp',
33 '../tools/skdiff.h',
34 '../tools/skdiff_html.cpp',
35 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000036 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000037 '../tools/skdiff_utils.cpp',
38 '../tools/skdiff_utils.h',
39 ],
40 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +000041 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000042 ],
43 },
44 {
45 'target_name': 'skimagediff',
46 'type': 'executable',
47 'sources': [
48 '../tools/skdiff.cpp',
49 '../tools/skdiff.h',
50 '../tools/skdiff_html.cpp',
51 '../tools/skdiff_html.h',
52 '../tools/skdiff_image.cpp',
53 '../tools/skdiff_utils.cpp',
54 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000055 ],
56 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +000057 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000058 ],
59 },
60 {
61 'target_name': 'skhello',
62 'type': 'executable',
63 'sources': [
64 '../tools/skhello.cpp',
65 ],
66 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +000067 'skia_lib.gyp:skia_lib',
reed@google.com99ac02b2013-06-07 20:30:16 +000068 'pdf.gyp:pdf',
scroggo@google.com09fd4d22013-03-20 14:20:18 +000069 'flags.gyp:flags',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000070 ],
71 },
72 {
73 'target_name': 'skimage',
74 'type': 'executable',
75 'sources': [
76 '../tools/skimage_main.cpp',
77 ],
scroggo@google.com6843bdb2013-05-08 19:14:23 +000078 'include_dirs': [
79 # For SkBitmapHasher.h
80 '../src/utils/',
81 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000082 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +000083 'skia_lib.gyp:skia_lib',
scroggo@google.comb41ff952013-04-11 15:53:35 +000084 'flags.gyp:flags',
scroggo@google.com6843bdb2013-05-08 19:14:23 +000085 'gm.gyp:gm_expectations',
scroggo@google.com6843bdb2013-05-08 19:14:23 +000086 'jsoncpp.gyp:jsoncpp',
87 'utils.gyp:utils',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000088 ],
89 },
junov@chromium.org777442d2012-06-12 14:56:36 +000090 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +000091 'target_name': 'lua_app',
92 'type': 'executable',
93 'sources': [
94 '../tools/lua/lua_app.cpp',
95 '../src/utils/SkLua.cpp',
96 ],
97 'dependencies': [
98 'skia_lib.gyp:skia_lib',
99 'effects.gyp:effects',
100 'utils.gyp:utils',
101 'images.gyp:images',
102 'pdf.gyp:pdf',
103 'ports.gyp:ports',
104 'lua.gyp:lua',
105 ],
106 },
107 {
reed@google.comdff7e112013-05-15 19:34:20 +0000108 'target_name': 'lua_pictures',
109 'type': 'executable',
110 'sources': [
111 '../tools/lua/lua_pictures.cpp',
112 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000113 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000114 ],
115 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000116 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000117 'effects.gyp:effects',
118 'utils.gyp:utils',
119 'images.gyp:images',
120 'tools.gyp:picture_renderer',
121 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000122 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000123 'ports.gyp:ports',
124 'flags.gyp:flags',
125 'lua.gyp:lua',
126 ],
127 },
128 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000129 'target_name': 'render_pictures',
130 'type': 'executable',
131 'sources': [
132 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000133 ],
134 'include_dirs': [
135 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000136 ],
137 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000138 'skia_lib.gyp:skia_lib',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000139 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000140 'tools.gyp:picture_utils',
scroggo@google.comd9ba9a02013-03-21 19:43:15 +0000141 'flags.gyp:flags',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000142 ],
143 },
144 {
reed@google.com006db0f2012-06-27 19:33:29 +0000145 'target_name': 'bench_pictures',
146 'type': 'executable',
147 'sources': [
scroggo@google.com9a412522012-09-07 15:21:18 +0000148 '../bench/SkBenchLogger.h',
149 '../bench/SkBenchLogger.cpp',
150 '../bench/TimerData.h',
151 '../bench/TimerData.cpp',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000152 '../tools/bench_pictures_main.cpp',
scroggo@google.com9a412522012-09-07 15:21:18 +0000153 '../tools/PictureBenchmark.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000154 ],
155 'include_dirs': [
156 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000157 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000158 ],
159 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000160 'skia_lib.gyp:skia_lib',
reed@google.com006db0f2012-06-27 19:33:29 +0000161 'tools.gyp:picture_utils',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000162 'tools.gyp:picture_renderer',
163 'bench.gyp:bench_timer',
scroggo@google.comd9ba9a02013-03-21 19:43:15 +0000164 'flags.gyp:flags',
scroggo@google.com9a412522012-09-07 15:21:18 +0000165 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000166 },
167 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000168 'target_name': 'picture_renderer',
169 'type': 'static_library',
170 'sources': [
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000171 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000172 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000173 '../tools/PictureRenderingFlags.h',
174 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000175 '../tools/CopyTilesRenderer.h',
176 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000177 '../src/pipe/utils/SamplePipeControllers.h',
178 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000179 ],
180 'include_dirs': [
junov@chromium.org9313ca42012-11-02 18:11:49 +0000181 '../src/core/',
borenet@google.comefb1d772012-10-10 19:45:51 +0000182 '../src/pipe/utils/',
183 '../src/utils/',
184 ],
185 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000186 'skia_lib.gyp:skia_lib',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000187 'tools.gyp:picture_utils',
scroggo@google.com09fd4d22013-03-20 14:20:18 +0000188 'flags.gyp:flags',
borenet@google.comefb1d772012-10-10 19:45:51 +0000189 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000190 'conditions': [
191 ['skia_gpu == 1',
192 {
193 'include_dirs' : [
194 '../src/gpu',
195 ],
196 },
197 ],
198 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000199 },
200 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000201 'target_name': 'render_pdfs',
202 'type': 'executable',
203 'sources': [
204 '../tools/render_pdfs_main.cpp',
205 '../tools/PdfRenderer.cpp',
206 '../tools/PdfRenderer.h',
207 ],
208 'include_dirs': [
209 '../src/pipe/utils/',
210 '../src/utils/',
211 ],
212 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000213 'skia_lib.gyp:skia_lib',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000214 'pdf.gyp:pdf',
edisonn@google.comc319abe2012-11-01 19:52:38 +0000215 'tools.gyp:picture_utils',
216 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000217 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000218 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000219 {
220 'dependencies': [
221 'tools.gyp:win_dbghelp',
222 ],
223 },
224 ],
225 # VS static libraries don't have a linker option. We must set a global
226 # project linker option, or add it to each executable.
227 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000228 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000229 {
230 'msvs_settings': {
231 'VCLinkerTool': {
232 'AdditionalDependencies': [
233 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
234 ],
235 },
236 },
237 },
238 ],
239 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000240 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000241 {
242 'msvs_settings': {
243 'VCLinkerTool': {
244 'AdditionalDependencies': [
245 '<(skia_win_debuggers_path)/DbgHelp.lib',
246 ],
247 },
248 },
249 },
250 ],
251 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000252 },
253 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000254 'target_name': 'picture_utils',
255 'type': 'static_library',
256 'sources': [
257 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000258 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000259 ],
260 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000261 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000262 ],
reed@google.come52d2912013-05-15 20:01:07 +0000263 'direct_dependent_settings': {
264 'include_dirs': [
reed@google.com9bf99c32013-05-15 20:07:22 +0000265 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000266 ],
267 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000268 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000269 {
270 'target_name': 'pinspect',
271 'type': 'executable',
272 'sources': [
273 '../tools/pinspect.cpp',
274 ],
275 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000276 'skia_lib.gyp:skia_lib',
commit-bot@chromium.org826ec812013-06-12 18:28:36 +0000277 'tools.gyp:picture_renderer',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000278 ],
279 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000280 {
281 'target_name': 'filter',
282 'type': 'executable',
283 'include_dirs' : [
284 '../src/core',
robertphillips@google.com3b0a9fe2013-01-31 15:56:22 +0000285 '../debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000286 ],
287 'sources': [
288 '../tools/filtermain.cpp',
robertphillips@google.comd3d377f2012-12-07 20:56:13 +0000289 '../tools/path_utils.h',
robertphillips@google.com3b0a9fe2013-01-31 15:56:22 +0000290 '../tools/path_utils.cpp',
291 '../debugger/SkDrawCommand.h',
292 '../debugger/SkDrawCommand.cpp',
293 '../debugger/SkDebugCanvas.h',
294 '../debugger/SkDebugCanvas.cpp',
295 '../debugger/SkObjectParser.h',
296 '../debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000297 ],
298 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000299 'skia_lib.gyp:skia_lib',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000300 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000301 ],
302 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000303 ],
304 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000305 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000306 {
307 'targets': [
308 {
309 'target_name': 'win_dbghelp',
310 'type': 'static_library',
311 'defines': [
312 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
313 ],
314 'sources': [
315 '../tools/win_dbghelp.h',
316 '../tools/win_dbghelp.cpp',
317 ],
318 },
319 ],
320 },
321 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000322 ['skia_os == "win"',
323 {
324 'targets': [
325 {
326 'target_name': 'win_lcid',
327 'type': 'executable',
328 'sources': [
329 '../tools/win_lcid.cpp',
330 ],
331 },
332 ],
333 },
334 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000335 ],
336}
337
338# Local Variables:
339# tab-width:2
340# indent-tabs-mode:nil
341# End:
342# vim: set expandtab tabstop=2 shiftwidth=2: