blob: aa27b45f62df42a1755db04fcda79abe15347e6a [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',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000019 'pinspect',
20 'render_pdfs',
21 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000022 'skdiff',
23 'skhello',
24 'skimage',
25 ],
26 },
27 {
28 'target_name': 'skdiff',
29 'type': 'executable',
30 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000031 '../tools/skdiff.cpp',
32 '../tools/skdiff.h',
33 '../tools/skdiff_html.cpp',
34 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000035 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000036 '../tools/skdiff_utils.cpp',
37 '../tools/skdiff_utils.h',
38 ],
39 'dependencies': [
40 'skia_base_libs.gyp:skia_base_libs',
41 'effects.gyp:effects',
42 'images.gyp:images',
43 ],
44 },
45 {
46 'target_name': 'skimagediff',
47 'type': 'executable',
48 'sources': [
49 '../tools/skdiff.cpp',
50 '../tools/skdiff.h',
51 '../tools/skdiff_html.cpp',
52 '../tools/skdiff_html.h',
53 '../tools/skdiff_image.cpp',
54 '../tools/skdiff_utils.cpp',
55 '../tools/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000056 ],
57 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +000058 'skia_base_libs.gyp:skia_base_libs',
djsollen@google.com41b46be2012-03-23 19:36:53 +000059 'effects.gyp:effects',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000060 'images.gyp:images',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000061 ],
62 },
63 {
64 'target_name': 'skhello',
65 'type': 'executable',
66 'sources': [
67 '../tools/skhello.cpp',
68 ],
69 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +000070 'skia_base_libs.gyp:skia_base_libs',
djsollen@google.com41b46be2012-03-23 19:36:53 +000071 'effects.gyp:effects',
scroggo@google.com09fd4d22013-03-20 14:20:18 +000072 'flags.gyp:flags',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000073 'images.gyp:images',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000074 ],
75 },
76 {
77 'target_name': 'skimage',
78 'type': 'executable',
79 'sources': [
80 '../tools/skimage_main.cpp',
81 ],
scroggo@google.com6843bdb2013-05-08 19:14:23 +000082 'include_dirs': [
83 # For SkBitmapHasher.h
84 '../src/utils/',
85 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000086 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +000087 'skia_base_libs.gyp:skia_base_libs',
djsollen@google.com41b46be2012-03-23 19:36:53 +000088 'effects.gyp:effects',
scroggo@google.comb41ff952013-04-11 15:53:35 +000089 'flags.gyp:flags',
scroggo@google.com6843bdb2013-05-08 19:14:23 +000090 'gm.gyp:gm_expectations',
91 'images.gyp:images',
92 'jsoncpp.gyp:jsoncpp',
93 'utils.gyp:utils',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000094 ],
95 },
junov@chromium.org777442d2012-06-12 14:56:36 +000096 {
reed@google.comdff7e112013-05-15 19:34:20 +000097 'target_name': 'lua_pictures',
98 'type': 'executable',
99 'sources': [
100 '../tools/lua/lua_pictures.cpp',
101 '../src/utils/SkLuaCanvas.cpp',
102 ],
103 'dependencies': [
104 'skia_base_libs.gyp:skia_base_libs',
105 'effects.gyp:effects',
106 'utils.gyp:utils',
107 'images.gyp:images',
108 'tools.gyp:picture_renderer',
109 'tools.gyp:picture_utils',
110 'ports.gyp:ports',
111 'flags.gyp:flags',
112 'lua.gyp:lua',
113 ],
114 },
115 {
junov@chromium.org777442d2012-06-12 14:56:36 +0000116 'target_name': 'render_pictures',
117 'type': 'executable',
118 'sources': [
119 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +0000120 ],
121 'include_dirs': [
122 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +0000123 ],
124 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +0000125 'skia_base_libs.gyp:skia_base_libs',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000126 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000127 'tools.gyp:picture_utils',
scroggo@google.combb281f72013-03-18 21:37:39 +0000128 'ports.gyp:ports',
scroggo@google.comd9ba9a02013-03-21 19:43:15 +0000129 'flags.gyp:flags',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000130 ],
131 },
132 {
reed@google.com006db0f2012-06-27 19:33:29 +0000133 'target_name': 'bench_pictures',
134 'type': 'executable',
135 'sources': [
scroggo@google.com9a412522012-09-07 15:21:18 +0000136 '../bench/SkBenchLogger.h',
137 '../bench/SkBenchLogger.cpp',
138 '../bench/TimerData.h',
139 '../bench/TimerData.cpp',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000140 '../tools/bench_pictures_main.cpp',
scroggo@google.com9a412522012-09-07 15:21:18 +0000141 '../tools/PictureBenchmark.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000142 ],
143 'include_dirs': [
144 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000145 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000146 ],
147 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +0000148 'skia_base_libs.gyp:skia_base_libs',
edisonn@google.comd966ab92012-09-05 19:43:46 +0000149 'effects.gyp:effects',
reed@google.com006db0f2012-06-27 19:33:29 +0000150 'tools.gyp:picture_utils',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000151 'tools.gyp:picture_renderer',
152 'bench.gyp:bench_timer',
scroggo@google.combb281f72013-03-18 21:37:39 +0000153 'ports.gyp:ports',
scroggo@google.comd9ba9a02013-03-21 19:43:15 +0000154 'flags.gyp:flags',
scroggo@google.com9a412522012-09-07 15:21:18 +0000155 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000156 },
157 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000158 'target_name': 'picture_renderer',
159 'type': 'static_library',
160 'sources': [
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000161 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000162 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000163 '../tools/PictureRenderingFlags.h',
164 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000165 '../tools/CopyTilesRenderer.h',
166 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000167 '../src/pipe/utils/SamplePipeControllers.h',
168 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000169 ],
170 'include_dirs': [
junov@chromium.org9313ca42012-11-02 18:11:49 +0000171 '../src/core/',
borenet@google.comefb1d772012-10-10 19:45:51 +0000172 '../src/pipe/utils/',
173 '../src/utils/',
174 ],
175 'dependencies': [
176 'skia_base_libs.gyp:skia_base_libs',
borenet@google.combc766112012-09-10 16:20:47 +0000177 'effects.gyp:effects',
keyar@chromium.org9299ede2012-08-21 19:05:08 +0000178 'images.gyp:images',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000179 'tools.gyp:picture_utils',
scroggo@google.com09fd4d22013-03-20 14:20:18 +0000180 'flags.gyp:flags',
borenet@google.comefb1d772012-10-10 19:45:51 +0000181 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000182 'conditions': [
183 ['skia_gpu == 1',
184 {
185 'include_dirs' : [
186 '../src/gpu',
187 ],
188 },
189 ],
190 ],
borenet@google.comefb1d772012-10-10 19:45:51 +0000191 'export_dependent_settings': [
192 'images.gyp:images',
193 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000194 },
195 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000196 'target_name': 'render_pdfs',
197 'type': 'executable',
198 'sources': [
199 '../tools/render_pdfs_main.cpp',
200 '../tools/PdfRenderer.cpp',
201 '../tools/PdfRenderer.h',
202 ],
203 'include_dirs': [
204 '../src/pipe/utils/',
205 '../src/utils/',
206 ],
207 'dependencies': [
208 'core.gyp:core',
209 'effects.gyp:effects',
210 'images.gyp:images',
211 'pdf.gyp:pdf',
212 'ports.gyp:ports',
213 'tools.gyp:picture_utils',
214 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000215 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000216 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000217 {
218 'dependencies': [
219 'tools.gyp:win_dbghelp',
220 ],
221 },
222 ],
223 # VS static libraries don't have a linker option. We must set a global
224 # project linker option, or add it to each executable.
225 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000226 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000227 {
228 'msvs_settings': {
229 'VCLinkerTool': {
230 'AdditionalDependencies': [
231 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
232 ],
233 },
234 },
235 },
236 ],
237 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000238 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000239 {
240 'msvs_settings': {
241 'VCLinkerTool': {
242 'AdditionalDependencies': [
243 '<(skia_win_debuggers_path)/DbgHelp.lib',
244 ],
245 },
246 },
247 },
248 ],
249 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000250 },
251 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000252 'target_name': 'picture_utils',
253 'type': 'static_library',
254 'sources': [
255 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000256 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000257 ],
258 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +0000259 'skia_base_libs.gyp:skia_base_libs',
junov@chromium.org777442d2012-06-12 14:56:36 +0000260 ],
reed@google.come52d2912013-05-15 20:01:07 +0000261 'direct_dependent_settings': {
262 'include_dirs': [
reed@google.com9bf99c32013-05-15 20:07:22 +0000263 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000264 ],
265 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000266 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000267 {
268 'target_name': 'pinspect',
269 'type': 'executable',
270 'sources': [
271 '../tools/pinspect.cpp',
272 ],
273 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +0000274 'skia_base_libs.gyp:skia_base_libs',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000275 'effects.gyp:effects',
276 'images.gyp:images',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000277 ],
278 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000279 {
280 'target_name': 'filter',
281 'type': 'executable',
282 'include_dirs' : [
283 '../src/core',
robertphillips@google.com3b0a9fe2013-01-31 15:56:22 +0000284 '../debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000285 ],
286 'sources': [
287 '../tools/filtermain.cpp',
robertphillips@google.comd3d377f2012-12-07 20:56:13 +0000288 '../tools/path_utils.h',
robertphillips@google.com3b0a9fe2013-01-31 15:56:22 +0000289 '../tools/path_utils.cpp',
290 '../debugger/SkDrawCommand.h',
291 '../debugger/SkDrawCommand.cpp',
292 '../debugger/SkDebugCanvas.h',
293 '../debugger/SkDebugCanvas.cpp',
294 '../debugger/SkObjectParser.h',
295 '../debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000296 ],
297 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +0000298 'skia_base_libs.gyp:skia_base_libs',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000299 'effects.gyp:effects',
300 'images.gyp:images',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000301 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000302 ],
303 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000304 ],
305 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000306 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000307 {
308 'targets': [
309 {
310 'target_name': 'win_dbghelp',
311 'type': 'static_library',
312 'defines': [
313 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
314 ],
315 'sources': [
316 '../tools/win_dbghelp.h',
317 '../tools/win_dbghelp.cpp',
318 ],
319 },
320 ],
321 },
322 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000323 ['skia_os == "win"',
324 {
325 'targets': [
326 {
327 'target_name': 'win_lcid',
328 'type': 'executable',
329 'sources': [
330 '../tools/win_lcid.cpp',
331 ],
332 },
333 ],
334 },
335 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000336 ],
337}
338
339# Local Variables:
340# tab-width:2
341# indent-tabs-mode:nil
342# End:
343# vim: set expandtab tabstop=2 shiftwidth=2: