blob: b94f037df98d1877a0a175f898e69177ca3c1376 [file] [log] [blame]
scroggo3e562272015-03-25 10:22:41 -07001# Copyright 2015 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
bsalomon3e791242014-12-17 13:43:13 -08005 # GYP file to build various tools.
epoger@google.comccdbd2c2011-06-02 14:38:23 +00006#
7# To build on Linux:
8# ./gyp_skia tools.gyp && make tools
9#
epoger@google.comccdbd2c2011-06-02 14:38:23 +000010{
11 'includes': [
12 'apptype_console.gypi',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000013 ],
14 'targets': [
15 {
16 # Build all executable targets defined below.
17 'target_name': 'tools',
18 'type': 'none',
19 'dependencies': [
caryclark7da2e552015-05-12 08:36:48 -070020 'chrome_fuzz',
mtklein2f2903d2015-11-18 11:06:37 -080021 'dump_record',
msarett3478f752016-02-12 14:47:09 -080022 'get_images_from_skps',
brianosman6373c952016-07-12 15:06:24 -070023 'get_current_monitor_profile',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +000024 'gpuveto',
robertphillips9c4909b2015-10-19 06:39:17 -070025 'imgblur',
robertphillips9c4909b2015-10-19 06:39:17 -070026 'imgslice',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000027 'lua_app',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000028 'lua_pictures',
edisonn@google.com8ba9a832013-01-18 18:06:22 +000029 'pinspect',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000030 'skdiff',
commit-bot@chromium.org5ccdf012014-01-02 18:51:38 +000031 'skhello',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +000032 'skpinfo',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +000033 'skpmaker',
djsollen0b17d6c2014-11-13 12:52:35 -080034 'test_public_includes',
halcanary00d44e02016-05-03 15:09:52 -070035 'using_skia_and_harfbuzz',
msarettaabe15e2016-05-13 07:32:59 -070036 'visualize_color_gamut',
caryclark5ef194c2015-08-31 09:22:38 -070037 'whitelist_typefaces',
epoger@google.comccdbd2c2011-06-02 14:38:23 +000038 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000039 'conditions': [
halcanary63677f42016-04-18 12:42:05 -070040 ['skia_mesa and skia_os in ["linux", "mac"]',
41 { 'dependencies': [ 'fiddle_build_test' ] }
42 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000043 ['skia_shared_lib',
44 {
45 'dependencies': [
46 'sklua', # This can only be built if skia is built as a shared library
47 ],
48 },
49 ],
djsollen14d8fa02015-12-18 09:34:08 -080050 [ 'skia_os == "android"',
51 {
52 'dependencies': [
53 # Build this by default to catch compile errors more quickly, since
54 # the only other time this code is exercised in the android framework
55 'android_utils',
56 ],
57 },
58 ],
zachr@google.com28c27c82013-06-20 17:15:05 +000059 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +000060 },
mtklein9a0d6d62014-12-15 12:47:51 -080061 {
djsollen14d8fa02015-12-18 09:34:08 -080062 'target_name': 'android_utils',
63 'type': 'static_library',
64 'dependencies': [
65 'core.gyp:core',
66 ],
67 'sources': [
68 '../tools/android/SkAndroidSDKCanvas.h',
69 '../tools/android/SkAndroidSDKCanvas.cpp',
70 ],
71 'direct_dependent_settings': {
72 'include_dirs': [
73 '../tools/android',
74 ],
75 },
76 },
77 {
mtklein2f2903d2015-11-18 11:06:37 -080078 'target_name': 'dump_record',
79 'type': 'executable',
80 'sources': [
81 '../tools/dump_record.cpp',
82 '../tools/DumpRecord.cpp',
83 ],
84 'include_dirs': [
85 '../include/private',
86 '../src/core',
87 ],
88 'dependencies': [
89 'flags.gyp:flags',
mtklein2f2903d2015-11-18 11:06:37 -080090 'skia_lib.gyp:skia_lib',
91 ],
92 },
93 {
mtklein7e602c22016-07-11 11:27:30 -070094 'target_name': 'monobench',
95 'type': 'executable',
96 'dependencies': [
97 'flags.gyp:flags',
98 'flags.gyp:flags_common',
99 'resources',
100 'skia_lib.gyp:skia_lib',
101 'timer',
102 'pdf.gyp:pdf',
103 'tools.gyp:sk_tool_utils',
104 ],
105 'include_dirs': [
106 '../bench',
107 '../include/private',
108 '../src/core',
109 '../src/effects',
110 '../src/effects/gradients',
111 '../src/image',
112 '../src/gpu',
113 '../src/pdf',
114 '../src/utils',
115 ],
116 'sources': [
117 '../tools/monobench.cpp',
118 '../bench/Benchmark.cpp',
mtkleinada5a442016-08-02 14:28:26 -0700119 '<!@(python find.py "*Bench.cpp" ../bench)',
mtklein7e602c22016-07-11 11:27:30 -0700120 ],
121 'sources!': [
122 '../bench/GMBench.cpp',
123 ],
124 },
125 {
caryclark7da2e552015-05-12 08:36:48 -0700126 'target_name': 'chrome_fuzz',
127 'type': 'executable',
128 'sources': [
129 '../tools/chrome_fuzz.cpp',
130 ],
131 'dependencies': [
132 'skia_lib.gyp:skia_lib',
133 ],
134 },
135 {
mtklein9ac68ee2014-06-20 11:29:20 -0700136 'target_name': 'crash_handler',
137 'type': 'static_library',
138 'sources': [ '../tools/CrashHandler.cpp' ],
139 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
140 'direct_dependent_settings': {
141 'include_dirs': [ '../tools' ],
142 },
scroggoac928f22015-02-10 08:13:26 -0800143 'conditions': [
144 [ 'skia_is_bot', {
145 'defines': [ 'SK_CRASH_HANDLER' ],
146 }],
147 ],
148
mtklein9ac68ee2014-06-20 11:29:20 -0700149 'all_dependent_settings': {
150 'msvs_settings': {
151 'VCLinkerTool': {
152 'AdditionalDependencies': [ 'Dbghelp.lib' ],
153 }
154 },
155 }
156 },
157 {
158 'target_name': 'resources',
159 'type': 'static_library',
160 'sources': [ '../tools/Resources.cpp' ],
161 'dependencies': [
162 'flags.gyp:flags',
163 'skia_lib.gyp:skia_lib',
164 ],
165 'direct_dependent_settings': {
tfarina20108912014-06-21 10:54:17 -0700166 'include_dirs': [ '../tools', ],
167 },
168 },
169 {
170 'target_name': 'sk_tool_utils',
171 'type': 'static_library',
caryclark5fb6bd42014-06-23 11:25:00 -0700172 'sources': [
173 '../tools/sk_tool_utils.cpp',
174 '../tools/sk_tool_utils_font.cpp',
caryclarkf1d41512016-02-09 10:30:22 -0800175 '../tools/random_parse_path.cpp',
caryclark5fb6bd42014-06-23 11:25:00 -0700176 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400177 'include_dirs': [
herb62a69c22015-09-29 11:47:45 -0700178 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400179 '../src/fonts',
robertphillips2f0dbc72015-08-20 05:15:06 -0700180 '../src/core',
Cary Clark992c7b02014-07-31 08:58:44 -0400181 ],
tfarina20108912014-06-21 10:54:17 -0700182 'dependencies': [
mtkleinada972d2014-07-31 08:31:56 -0700183 'resources',
Cary Clark992c7b02014-07-31 08:58:44 -0400184 'flags.gyp:flags',
fmalitafb4b9a22016-10-31 07:22:24 -0700185 'flags.gyp:flags_common',
tfarina20108912014-06-21 10:54:17 -0700186 'skia_lib.gyp:skia_lib',
187 ],
188 'direct_dependent_settings': {
189 'include_dirs': [ '../tools', ],
mtklein9ac68ee2014-06-20 11:29:20 -0700190 },
191 },
192 {
193 'target_name' : 'timer',
194 'type': 'static_library',
mtklein33eefcd2015-10-23 07:02:06 -0700195 'sources': [ '../tools/timer/Timer.cpp' ],
mtklein9ac68ee2014-06-20 11:29:20 -0700196 'direct_dependent_settings': {
197 'include_dirs': ['../tools/timer'],
198 },
mtklein33eefcd2015-10-23 07:02:06 -0700199 'dependencies': [ 'skia_lib.gyp:skia_lib' ],
mtklein9ac68ee2014-06-20 11:29:20 -0700200 },
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000201 {
202 'target_name': 'skdiff',
203 'type': 'executable',
204 'sources': [
bungemanfe917272016-10-13 17:36:40 -0400205 '../tools/skdiff/skdiff.cpp',
206 '../tools/skdiff/skdiff.h',
207 '../tools/skdiff/skdiff_html.cpp',
208 '../tools/skdiff/skdiff_html.h',
209 '../tools/skdiff/skdiff_main.cpp',
210 '../tools/skdiff/skdiff_utils.cpp',
211 '../tools/skdiff/skdiff_utils.h',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000212 ],
213 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000214 'skia_lib.gyp:skia_lib',
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000215 ],
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': [
mtkleinfd8ed692015-07-28 09:54:52 -0700224 '../include/private',
commit-bot@chromium.orgc7355982014-01-02 19:42:15 +0000225 '../src/core',
226 ],
227 'dependencies': [
228 'flags.gyp:flags',
229 'skia_lib.gyp:skia_lib',
230 ],
231 },
232 {
bungeman@google.come3c8ddf2012-12-05 20:13:12 +0000233 'target_name': 'skimagediff',
234 'type': 'executable',
235 'sources': [
bungemanfe917272016-10-13 17:36:40 -0400236 '../tools/skdiff/skdiff.cpp',
237 '../tools/skdiff/skdiff.h',
238 '../tools/skdiff/skdiff_html.cpp',
239 '../tools/skdiff/skdiff_html.h',
240 '../tools/skdiff/skdiff_image.cpp',
241 '../tools/skdiff/skdiff_utils.cpp',
242 '../tools/skdiff/skdiff_utils.h',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000243 ],
244 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000245 'skia_lib.gyp:skia_lib',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000246 ],
247 },
248 {
249 'target_name': 'skhello',
250 'type': 'executable',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000251 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700252 'flags.gyp:flags',
253 'pdf.gyp:pdf',
djsollen@google.com52f02972013-06-03 12:10:19 +0000254 'skia_lib.gyp:skia_lib',
borenet@google.combb522882013-06-17 15:39:43 +0000255 ],
borenet48087572015-04-02 12:16:36 -0700256 'sources': [
257 '../tools/skhello.cpp',
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000258 ],
259 },
260 {
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000261 'target_name': 'skpinfo',
262 'type': 'executable',
263 'sources': [
264 '../tools/skpinfo.cpp',
265 ],
266 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700267 '../include/private',
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000268 '../src/core/',
269 ],
270 'dependencies': [
271 'flags.gyp:flags',
272 'skia_lib.gyp:skia_lib',
273 ],
274 },
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000275 {
robertphillips9c4909b2015-10-19 06:39:17 -0700276 'target_name': 'imgblur',
277 'type': 'executable',
278 'sources': [
279 '../tools/imgblur.cpp',
280 ],
281 'include_dirs': [
282 '../include/core',
283 ],
284 'dependencies': [
285 'flags.gyp:flags',
286 'flags.gyp:flags_common',
287 'skia_lib.gyp:skia_lib',
288 'tools.gyp:sk_tool_utils',
289 ],
290 },
291 {
robertphillips5ce341f2015-09-18 09:04:43 -0700292 'target_name': 'imgslice',
293 'type': 'executable',
294 'sources': [
295 '../tools/imgslice.cpp',
296 ],
297 'include_dirs': [
298 '../include/core',
299 ],
300 'dependencies': [
301 'flags.gyp:flags',
302 'skia_lib.gyp:skia_lib',
303 ],
304 },
305 {
msarett6a738212016-03-04 13:27:35 -0800306 'target_name': 'get_images_from_skps',
307 'type': 'executable',
308 'sources': [
309 '../tools/get_images_from_skps.cpp',
310 ],
311 'include_dirs': [
312 '../src/core',
313 '../include/private',
314 ],
315 'dependencies': [
316 'flags.gyp:flags',
rmistry8d965a62016-04-25 10:35:03 -0700317 'jsoncpp.gyp:jsoncpp',
msarett6a738212016-03-04 13:27:35 -0800318 'skia_lib.gyp:skia_lib',
319 ],
msarett3478f752016-02-12 14:47:09 -0800320 },
321 {
brianosman6373c952016-07-12 15:06:24 -0700322 'target_name': 'get_current_monitor_profile',
323 'type': 'executable',
324 'sources': [
325 '../tools/get_current_monitor_profile.cpp',
326 ],
327 'include_dirs': [
328 '../src/core',
329 '../include/private',
330 ],
331 'dependencies': [
332 'flags.gyp:flags',
333 'skia_lib.gyp:skia_lib',
334 ],
335 },
336 {
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000337 'target_name': 'gpuveto',
338 'type': 'executable',
339 'sources': [
340 '../tools/gpuveto.cpp',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000341 ],
342 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700343 '../include/private',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000344 '../src/core/',
345 '../src/images',
commit-bot@chromium.orgfe788472014-04-28 13:19:34 +0000346 ],
347 'dependencies': [
348 'flags.gyp:flags',
349 'skia_lib.gyp:skia_lib',
350 ],
351 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000352 {
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000353 'target_name': 'lua_app',
354 'type': 'executable',
355 'sources': [
356 '../tools/lua/lua_app.cpp',
357 '../src/utils/SkLua.cpp',
358 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000359 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700360 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000361 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
362 '../src/gpu/',
363 '../src/core/',
364 ],
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000365 'dependencies': [
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000366 'effects.gyp:effects',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000367 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000368 'lua.gyp:lua',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000369 'pdf.gyp:pdf',
370 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000371 'skia_lib.gyp:skia_lib',
mike@reedtribe.org73d9f1c2013-06-09 01:54:56 +0000372 ],
373 },
374 {
reed@google.comdff7e112013-05-15 19:34:20 +0000375 'target_name': 'lua_pictures',
376 'type': 'executable',
377 'sources': [
378 '../tools/lua/lua_pictures.cpp',
379 '../src/utils/SkLuaCanvas.cpp',
reed@google.com74ce6f02013-05-22 15:13:18 +0000380 '../src/utils/SkLua.cpp',
reed@google.comdff7e112013-05-15 19:34:20 +0000381 ],
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000382 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700383 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000384 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
385 '../src/gpu/',
386 '../src/core/',
387 ],
reed@google.comdff7e112013-05-15 19:34:20 +0000388 'dependencies': [
reed@google.comdff7e112013-05-15 19:34:20 +0000389 'effects.gyp:effects',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000390 'flags.gyp:flags',
reed@google.comdff7e112013-05-15 19:34:20 +0000391 'images.gyp:images',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000392 'lua.gyp:lua',
reed@google.comdff7e112013-05-15 19:34:20 +0000393 'tools.gyp:picture_utils',
mike@reedtribe.orgfb858242013-06-08 16:39:44 +0000394 'pdf.gyp:pdf',
reed@google.comdff7e112013-05-15 19:34:20 +0000395 'ports.gyp:ports',
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000396 'skia_lib.gyp:skia_lib',
reed@google.comdff7e112013-05-15 19:34:20 +0000397 ],
398 },
399 {
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000400 'target_name': 'picture_utils',
401 'type': 'static_library',
402 'sources': [
403 '../tools/picture_utils.cpp',
borenet@google.come21795e2012-09-14 14:34:28 +0000404 '../tools/picture_utils.h',
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000405 ],
halcanary90602132016-04-20 08:49:53 -0700406 'include_dirs': [
Mike Klein2ad208d2016-11-14 18:05:16 -0500407 '../include/private',
brianosman3c579dc2016-04-19 09:18:11 -0700408 '../src/core/',
409 ],
twiz@google.coma31b8bb2012-06-22 18:24:56 +0000410 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000411 'skia_lib.gyp:skia_lib',
junov@chromium.org777442d2012-06-12 14:56:36 +0000412 ],
reed@google.come52d2912013-05-15 20:01:07 +0000413 'direct_dependent_settings': {
414 'include_dirs': [
tfarinabcbc1782014-06-18 14:32:48 -0700415 '../tools/',
reed@google.come52d2912013-05-15 20:01:07 +0000416 ],
417 },
junov@chromium.org777442d2012-06-12 14:56:36 +0000418 },
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000419 {
420 'target_name': 'pinspect',
421 'type': 'executable',
422 'sources': [
423 '../tools/pinspect.cpp',
424 ],
425 'dependencies': [
commit-bot@chromium.orga3f882c2013-12-13 20:52:36 +0000426 'flags.gyp:flags',
djsollen@google.com52f02972013-06-03 12:10:19 +0000427 'skia_lib.gyp:skia_lib',
reed@google.com1bdf7fe2012-06-14 18:58:40 +0000428 ],
429 },
robertphillips@google.comc7e4a5a2012-10-04 13:00:33 +0000430 {
mtkleinafb43792014-08-19 15:55:55 -0700431 'target_name': 'proc_stats',
halcanary0d154ee2014-08-11 11:33:51 -0700432 'type': 'static_library',
433 'sources': [
434 '../tools/ProcStats.h',
435 '../tools/ProcStats.cpp',
436 ],
437 'direct_dependent_settings': {
438 'include_dirs': [ '../tools', ],
439 },
mtklein25c81d42016-07-27 13:55:26 -0700440 'dependencies': [
441 'skia_lib.gyp:skia_lib',
442 ],
halcanary0d154ee2014-08-11 11:33:51 -0700443 },
djsollen0b17d6c2014-11-13 12:52:35 -0800444 {
joshualittcdad12f2016-02-08 07:08:21 -0800445 'target_name': 'url_data_manager',
446 'type': 'static_library',
447 'sources': [
448 '../tools/UrlDataManager.h',
449 '../tools/UrlDataManager.cpp',
450 ],
451 'dependencies': [
452 'skia_lib.gyp:skia_lib',
453 ],
454 'include_dirs': [
455 '../include/private',
456 '../src/core',
457 ],
458 'direct_dependent_settings': {
459 'include_dirs': [
460 '../include/private',
mtklein2d225e32016-02-29 09:05:32 -0800461 '../tools',
joshualittcdad12f2016-02-08 07:08:21 -0800462 ],
463 },
464 },
465 {
halcanary00d44e02016-05-03 15:09:52 -0700466 'target_name': 'using_skia_and_harfbuzz',
467 'type': 'executable',
halcanary13cba492016-08-03 10:43:55 -0700468 'sources': [ '../tools/using_skia_and_harfbuzz.cpp', ],
469 'variables': { 'skia_example_use_harfbuzz%': 1, },
470 'conditions': [
471 [ 'skia_example_use_harfbuzz',
472 {
473 'dependencies': [ 'harfbuzz.gyp:harfbuzz', ],
474 'sources' : [ '../tools/SkShaper_harfbuzz.cpp', ],
475 }, {
476 'sources' : [ '../tools/SkShaper_primitive.cpp', ],
477 },
478 ]
halcanary8a74f132016-07-11 14:30:39 -0700479 ],
halcanary00d44e02016-05-03 15:09:52 -0700480 'dependencies': [
481 'skia_lib.gyp:skia_lib',
482 'pdf.gyp:pdf',
halcanary00d44e02016-05-03 15:09:52 -0700483 ],
halcanary00d44e02016-05-03 15:09:52 -0700484 },
485 {
msarettaabe15e2016-05-13 07:32:59 -0700486 'target_name': 'visualize_color_gamut',
487 'type': 'executable',
488 'sources': [
Florin Malitafcfc4ba2016-11-14 14:29:00 -0500489 '../tools/colorspaceinfo.cpp',
msarettaabe15e2016-05-13 07:32:59 -0700490 ],
491 'include_dirs': [
492 '../src/core',
493 '../include/private',
494 '../tools',
495 ],
496 'dependencies': [
497 'flags.gyp:flags',
498 'resources',
499 'skia_lib.gyp:skia_lib',
500 ],
501 },
502 {
caryclark5ef194c2015-08-31 09:22:38 -0700503 'target_name': 'whitelist_typefaces',
504 'type': 'executable',
505 'sources': [
506 '../tools/whitelist_typefaces.cpp',
507 ],
508 'dependencies': [
509 'skia_lib.gyp:skia_lib',
510 ],
511 },
512 {
joshualitt3ebd0502016-02-09 07:18:08 -0800513 'target_name': 'thermal_manager',
514 'type': 'static_library',
515 'sources': [
516 '../tools/ThermalManager.cpp',
517 ],
518 'dependencies': [
519 'skia_lib.gyp:skia_lib',
520 ],
521 'direct_dependent_settings': {
522 'include_dirs': [ '../tools', ],
523 },
524 },
525 {
djsollen0b17d6c2014-11-13 12:52:35 -0800526 'target_name': 'test_public_includes',
527 'type': 'static_library',
djsollenc87dd2c2014-11-14 11:11:46 -0800528 # Ensure that our public headers don't have unused params so that clients
529 # (e.g. Android) that include us can build with these warnings enabled
530 'cflags!': [ '-Wno-unused-parameter' ],
djsollen0b17d6c2014-11-13 12:52:35 -0800531 'variables': {
532 'includes_to_test': [
msarett506e19a2015-11-13 06:11:09 -0800533 '<(skia_include_path)/android',
djsollen0b17d6c2014-11-13 12:52:35 -0800534 '<(skia_include_path)/c',
msarett33bee092015-11-11 12:43:07 -0800535 '<(skia_include_path)/codec',
djsollen0b17d6c2014-11-13 12:52:35 -0800536 '<(skia_include_path)/config',
537 '<(skia_include_path)/core',
538 '<(skia_include_path)/effects',
539 '<(skia_include_path)/gpu',
540 '<(skia_include_path)/images',
541 '<(skia_include_path)/pathops',
djsollen0b17d6c2014-11-13 12:52:35 -0800542 '<(skia_include_path)/ports',
djsollen0b17d6c2014-11-13 12:52:35 -0800543 '<(skia_include_path)/utils',
544 '<(skia_include_path)/views',
545 '<(skia_include_path)/xml',
546 ],
547 'paths_to_ignore': [
548 '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
bungeman0b1de262015-06-17 07:55:59 -0700549 '<(skia_include_path)/ports/SkFontMgr_fontconfig.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800550 '<(skia_include_path)/ports/SkTypeface_mac.h',
551 '<(skia_include_path)/ports/SkTypeface_win.h',
552 '<(skia_include_path)/utils/ios',
553 '<(skia_include_path)/utils/mac',
554 '<(skia_include_path)/utils/win',
555 '<(skia_include_path)/utils/SkDebugUtils.h',
556 '<(skia_include_path)/utils/SkJSONCPP.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800557 '<(skia_include_path)/views/SkOSWindow_iOS.h',
558 '<(skia_include_path)/views/SkOSWindow_Mac.h',
djsollen0b17d6c2014-11-13 12:52:35 -0800559 '<(skia_include_path)/views/SkOSWindow_SDL.h',
560 '<(skia_include_path)/views/SkOSWindow_Unix.h',
561 '<(skia_include_path)/views/SkOSWindow_Win.h',
562 '<(skia_include_path)/views/SkWindow.h',
Greg Daniel164a9f02016-02-22 09:56:40 -0500563 '<(skia_include_path)/gpu/vk',
djsollen0b17d6c2014-11-13 12:52:35 -0800564 ],
djsollen7c9c4a72016-03-30 08:28:02 -0700565 'output_file' : [
566 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
567 ],
djsollen0b17d6c2014-11-13 12:52:35 -0800568 },
569 'include_dirs': [
570 '<@(includes_to_test)',
571 ],
572 'sources': [
573 # unused_param_test.cpp is generated by the action below.
574 '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
575 ],
576 'actions': [
577 {
578 'action_name': 'generate_includes_cpp',
579 'inputs': [
580 '../tools/generate_includes_cpp.py',
581 '<@(includes_to_test)',
djsollen0b17d6c2014-11-13 12:52:35 -0800582 ],
583 'outputs': [
djsollen7c9c4a72016-03-30 08:28:02 -0700584 '<@(output_file)',
585 # Force the script to always run so that we pick up when files have
586 # been deleted.
587 'filename_that_does_not_exists_but_forces_rebuild.txt',
djsollen0b17d6c2014-11-13 12:52:35 -0800588 ],
589 'action': ['python', '../tools/generate_includes_cpp.py',
590 '--ignore', '<(paths_to_ignore)',
djsollen7c9c4a72016-03-30 08:28:02 -0700591 '<@(output_file)', '<@(includes_to_test)'],
djsollen0b17d6c2014-11-13 12:52:35 -0800592 },
593 ],
594 },
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000595 ],
596 'conditions': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000597 ['skia_shared_lib',
598 {
599 'targets': [
600 {
601 'target_name': 'sklua',
602 'product_name': 'skia',
603 'product_prefix': '',
604 'product_dir': '<(PRODUCT_DIR)/',
605 'type': 'shared_library',
606 'sources': [
607 '../src/utils/SkLuaCanvas.cpp',
608 '../src/utils/SkLua.cpp',
609 ],
610 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700611 '../include/private',
bsalomon@google.com4ebe3822014-02-26 20:22:32 +0000612 # Lua exposes GrReduceClip which in turn requires src/core for SkTLList
613 '../src/gpu/',
614 '../src/core/',
zachr@google.com28c27c82013-06-20 17:15:05 +0000615 '../third_party/lua/src/',
616 ],
617 'dependencies': [
618 'lua.gyp:lua',
619 'pdf.gyp:pdf',
620 'skia_lib.gyp:skia_lib',
621 ],
622 'conditions': [
623 ['skia_os != "win"',
624 {
625 'ldflags': [
626 '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
627 ],
628 },
629 ],
630 ],
631 },
632 ],
633 },
634 ],
borenet@google.com2d137b62013-03-08 23:13:33 +0000635 ['skia_win_debuggers_path and skia_os == "win"',
edisonn@google.com8819d1a2013-03-08 18:43:35 +0000636 {
637 'targets': [
638 {
639 'target_name': 'win_dbghelp',
640 'type': 'static_library',
641 'defines': [
642 'SK_CDB_PATH="<(skia_win_debuggers_path)"',
643 ],
644 'sources': [
645 '../tools/win_dbghelp.h',
646 '../tools/win_dbghelp.cpp',
647 ],
648 },
649 ],
650 },
651 ],
bungeman@google.com07a69f82013-04-02 14:12:38 +0000652 ['skia_os == "win"',
653 {
654 'targets': [
655 {
656 'target_name': 'win_lcid',
657 'type': 'executable',
658 'sources': [
659 '../tools/win_lcid.cpp',
660 ],
661 },
662 ],
663 },
664 ],
Cary Clark992c7b02014-07-31 08:58:44 -0400665 ['skia_os == "mac"',
666 {
667 'targets': [
668 {
669 'target_name': 'create_test_font',
670 'type': 'executable',
671 'sources': [
672 '../tools/create_test_font.cpp',
673 ],
674 'include_dirs': [
mtkleinfd8ed692015-07-28 09:54:52 -0700675 '../include/private',
Cary Clark992c7b02014-07-31 08:58:44 -0400676 '../src/core',
677 ],
678 'dependencies': [
679 'flags.gyp:flags',
680 'skia_lib.gyp:skia_lib',
681 'resources',
682 ],
683 },
684 ],
685 },
686 ],
halcanary7e669542016-04-19 08:46:50 -0700687 ['skia_mesa and skia_os in ["linux", "mac"]',
halcanaryf0da1382016-04-18 11:50:07 -0700688 {
689 'targets': [
690 {
691 'target_name': 'fiddle_build_test',
692 'type': 'executable',
693 'sources': [
694 '../tools/fiddle/draw.cpp',
695 '../tools/fiddle/fiddle_main.cpp',
696 '../tools/fiddle/fiddle_main.h',
697 ],
698 'dependencies': [
699 'skia_lib.gyp:skia_lib',
700 'pdf.gyp:pdf',
halcanary90602132016-04-20 08:49:53 -0700701 'gputest.gyp:osmesa',
halcanaryf0da1382016-04-18 11:50:07 -0700702 ],
703 'defines': [ 'FIDDLE_BUILD_TEST' ],
halcanaryf0da1382016-04-18 11:50:07 -0700704 },
705 ],
706 },
707 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000708 ],
709}