blob: 7f79dc4114875e6004b862690b7a33970987bdbe [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',
18 'pinspect',
19 'render_pdfs',
20 'render_pictures',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000021 'skdiff',
22 'skhello',
23 'skimage',
24 ],
25 },
26 {
27 'target_name': 'skdiff',
28 'type': 'executable',
29 'sources': [
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000030 '../tools/skdiff.cpp',
31 '../tools/skdiff.h',
32 '../tools/skdiff_html.cpp',
33 '../tools/skdiff_html.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000034 '../tools/skdiff_main.cpp',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +000035 '../tools/skdiff_utils.cpp',
36 '../tools/skdiff_utils.h',
37 ],
38 'dependencies': [
39 'skia_base_libs.gyp:skia_base_libs',
40 'effects.gyp:effects',
41 'images.gyp:images',
42 ],
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': [
borenet@google.comefb1d772012-10-10 19:45:51 +000057 'skia_base_libs.gyp:skia_base_libs',
djsollen@google.com41b46be2012-03-23 19:36:53 +000058 'effects.gyp:effects',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000059 'images.gyp:images',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000060 ],
61 },
62 {
63 'target_name': 'skhello',
64 'type': 'executable',
65 'sources': [
66 '../tools/skhello.cpp',
67 ],
68 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +000069 'skia_base_libs.gyp:skia_base_libs',
djsollen@google.com41b46be2012-03-23 19:36:53 +000070 'effects.gyp:effects',
scroggo@google.com09fd4d22013-03-20 14:20:18 +000071 'flags.gyp:flags',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000072 'images.gyp:images',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000073 ],
74 },
75 {
76 'target_name': 'skimage',
77 'type': 'executable',
78 'sources': [
79 '../tools/skimage_main.cpp',
80 ],
81 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +000082 'skia_base_libs.gyp:skia_base_libs',
djsollen@google.com41b46be2012-03-23 19:36:53 +000083 'effects.gyp:effects',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000084 'images.gyp:images',
scroggo@google.comb41ff952013-04-11 15:53:35 +000085 'flags.gyp:flags',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000086 ],
87 },
junov@chromium.org777442d2012-06-12 14:56:36 +000088 {
89 'target_name': 'render_pictures',
90 'type': 'executable',
91 'sources': [
92 '../tools/render_pictures_main.cpp',
keyar@chromium.orga2333d92012-07-16 17:29:16 +000093 ],
94 'include_dirs': [
95 '../src/pipe/utils/',
junov@chromium.org777442d2012-06-12 14:56:36 +000096 ],
97 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +000098 'skia_base_libs.gyp:skia_base_libs',
keyar@chromium.org163b5672012-08-01 17:53:29 +000099 'tools.gyp:picture_renderer',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000100 'tools.gyp:picture_utils',
scroggo@google.combb281f72013-03-18 21:37:39 +0000101 'ports.gyp:ports',
scroggo@google.comd9ba9a02013-03-21 19:43:15 +0000102 'flags.gyp:flags',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000103 ],
104 },
105 {
reed@google.com006db0f2012-06-27 19:33:29 +0000106 'target_name': 'bench_pictures',
107 'type': 'executable',
108 'sources': [
scroggo@google.com9a412522012-09-07 15:21:18 +0000109 '../bench/SkBenchLogger.h',
110 '../bench/SkBenchLogger.cpp',
111 '../bench/TimerData.h',
112 '../bench/TimerData.cpp',
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +0000113 '../tools/bench_pictures_main.cpp',
scroggo@google.com9a412522012-09-07 15:21:18 +0000114 '../tools/PictureBenchmark.cpp',
reed@google.com006db0f2012-06-27 19:33:29 +0000115 ],
116 'include_dirs': [
117 '../bench',
scroggo@google.comcc690202013-03-04 19:56:21 +0000118 '../src/lazy/',
reed@google.com006db0f2012-06-27 19:33:29 +0000119 ],
120 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +0000121 'skia_base_libs.gyp:skia_base_libs',
edisonn@google.comd966ab92012-09-05 19:43:46 +0000122 'effects.gyp:effects',
reed@google.com006db0f2012-06-27 19:33:29 +0000123 'tools.gyp:picture_utils',
keyar@chromium.org163b5672012-08-01 17:53:29 +0000124 'tools.gyp:picture_renderer',
125 'bench.gyp:bench_timer',
scroggo@google.combb281f72013-03-18 21:37:39 +0000126 'ports.gyp:ports',
scroggo@google.comd9ba9a02013-03-21 19:43:15 +0000127 'flags.gyp:flags',
scroggo@google.com9a412522012-09-07 15:21:18 +0000128 ],
keyar@chromium.org163b5672012-08-01 17:53:29 +0000129 },
130 {
borenet@google.comefb1d772012-10-10 19:45:51 +0000131 'target_name': 'picture_renderer',
132 'type': 'static_library',
133 'sources': [
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000134 '../tools/PictureRenderer.h',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000135 '../tools/PictureRenderer.cpp',
scroggo@google.com161e1ba2013-03-04 16:41:06 +0000136 '../tools/PictureRenderingFlags.h',
137 '../tools/PictureRenderingFlags.cpp',
scroggo@google.com4a26d9d2012-11-07 18:01:46 +0000138 '../tools/CopyTilesRenderer.h',
139 '../tools/CopyTilesRenderer.cpp',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000140 '../src/pipe/utils/SamplePipeControllers.h',
141 '../src/pipe/utils/SamplePipeControllers.cpp',
borenet@google.comefb1d772012-10-10 19:45:51 +0000142 ],
143 'include_dirs': [
junov@chromium.org9313ca42012-11-02 18:11:49 +0000144 '../src/core/',
borenet@google.comefb1d772012-10-10 19:45:51 +0000145 '../src/pipe/utils/',
146 '../src/utils/',
147 ],
148 'dependencies': [
149 'skia_base_libs.gyp:skia_base_libs',
borenet@google.combc766112012-09-10 16:20:47 +0000150 'effects.gyp:effects',
keyar@chromium.org9299ede2012-08-21 19:05:08 +0000151 'images.gyp:images',
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000152 'tools.gyp:picture_utils',
scroggo@google.com09fd4d22013-03-20 14:20:18 +0000153 'flags.gyp:flags',
borenet@google.comefb1d772012-10-10 19:45:51 +0000154 ],
robertphillips@google.comfe1b5362013-02-07 19:45:46 +0000155 'conditions': [
156 ['skia_gpu == 1',
157 {
158 'include_dirs' : [
159 '../src/gpu',
160 ],
161 },
162 ],
163 ],
borenet@google.comefb1d772012-10-10 19:45:51 +0000164 'export_dependent_settings': [
165 'images.gyp:images',
166 ],
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000167 },
168 {
edisonn@google.comc319abe2012-11-01 19:52:38 +0000169 'target_name': 'render_pdfs',
170 'type': 'executable',
171 'sources': [
172 '../tools/render_pdfs_main.cpp',
173 '../tools/PdfRenderer.cpp',
174 '../tools/PdfRenderer.h',
175 ],
176 'include_dirs': [
177 '../src/pipe/utils/',
178 '../src/utils/',
179 ],
180 'dependencies': [
181 'core.gyp:core',
182 'effects.gyp:effects',
183 'images.gyp:images',
184 'pdf.gyp:pdf',
185 'ports.gyp:ports',
186 'tools.gyp:picture_utils',
187 ],
edisonn@google.com184487c2013-03-08 18:00:16 +0000188 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000189 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com184487c2013-03-08 18:00:16 +0000190 {
191 'dependencies': [
192 'tools.gyp:win_dbghelp',
193 ],
194 },
195 ],
196 # VS static libraries don't have a linker option. We must set a global
197 # project linker option, or add it to each executable.
198 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000199 'skia_arch_width == 64',
edisonn@google.com184487c2013-03-08 18:00:16 +0000200 {
201 'msvs_settings': {
202 'VCLinkerTool': {
203 'AdditionalDependencies': [
204 '<(skia_win_debuggers_path)/x64/DbgHelp.lib',
205 ],
206 },
207 },
208 },
209 ],
210 ['skia_win_debuggers_path and skia_os == "win" and '
borenet@google.com2d137b62013-03-08 23:13:33 +0000211 'skia_arch_width == 32',
edisonn@google.com184487c2013-03-08 18:00:16 +0000212 {
213 'msvs_settings': {
214 'VCLinkerTool': {
215 'AdditionalDependencies': [
216 '<(skia_win_debuggers_path)/DbgHelp.lib',
217 ],
218 },
219 },
220 },
221 ],
222 ],
edisonn@google.comc319abe2012-11-01 19:52:38 +0000223 },
224 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000225 'target_name': 'picture_utils',
226 'type': 'static_library',
227 'sources': [
228 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000229 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000230 ],
231 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +0000232 'skia_base_libs.gyp:skia_base_libs',
junov@chromium.org777442d2012-06-12 14:56:36 +0000233 ],
234 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000235 {
236 'target_name': 'pinspect',
237 'type': 'executable',
238 'sources': [
239 '../tools/pinspect.cpp',
240 ],
241 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +0000242 'skia_base_libs.gyp:skia_base_libs',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000243 'effects.gyp:effects',
244 'images.gyp:images',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000245 ],
246 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000247 {
248 'target_name': 'filter',
249 'type': 'executable',
250 'include_dirs' : [
251 '../src/core',
robertphillips@google.com3b0a9fe2013-01-31 15:56:22 +0000252 '../debugger',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000253 ],
254 'sources': [
255 '../tools/filtermain.cpp',
robertphillips@google.comd3d377f2012-12-07 20:56:13 +0000256 '../tools/path_utils.h',
robertphillips@google.com3b0a9fe2013-01-31 15:56:22 +0000257 '../tools/path_utils.cpp',
258 '../debugger/SkDrawCommand.h',
259 '../debugger/SkDrawCommand.cpp',
260 '../debugger/SkDebugCanvas.h',
261 '../debugger/SkDebugCanvas.cpp',
262 '../debugger/SkObjectParser.h',
263 '../debugger/SkObjectParser.cpp',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000264 ],
265 'dependencies': [
borenet@google.comefb1d772012-10-10 19:45:51 +0000266 'skia_base_libs.gyp:skia_base_libs',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000267 'effects.gyp:effects',
268 'images.gyp:images',
djsollen@google.coma09e8832012-11-13 18:50:33 +0000269 'tools.gyp:picture_utils',
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000270 ],
271 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000272 ],
273 'conditions': [
borenet@google.com2d137b62013-03-08 23:13:33 +0000274 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000275 {
276 'targets': [
277 {
278 'target_name': 'win_dbghelp',
279 'type': 'static_library',
280 'defines': [
281 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
282 ],
283 'sources': [
284 '../tools/win_dbghelp.h',
285 '../tools/win_dbghelp.cpp',
286 ],
287 },
288 ],
289 },
290 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000291 ['skia_os == "win"',
292 {
293 'targets': [
294 {
295 'target_name': 'win_lcid',
296 'type': 'executable',
297 'sources': [
298 '../tools/win_lcid.cpp',
299 ],
300 },
301 ],
302 },
303 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000304 ],
305}
306
307# Local Variables:
308# tab-width:2
309# indent-tabs-mode:nil
310# End:
311# vim: set expandtab tabstop=2 shiftwidth=2: