blob: 75b20551b4117052695e9960a01fa3c87d1ebc1b [file] [log] [blame]
mtkleinc04ff472016-06-23 10:29:30 -07001# Copyright 2016 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.
5
mikejurka8c24f4f2016-09-12 16:51:58 -07006import("gn/shared_sources.gni")
brettwb9447282016-09-01 14:24:39 -07007
mtklein3e8012e2016-09-21 09:14:19 -07008if (!defined(is_skia_standalone)) {
9 is_skia_standalone = false
10}
11
mtkleinc04ff472016-06-23 10:29:30 -070012declare_args() {
mtkleind68f9b02016-09-23 13:18:41 -070013 skia_use_angle = false
mtklein63213812016-08-24 09:55:56 -070014 skia_use_expat = true
mtklein3cc22182016-08-29 13:26:14 -070015 skia_use_fontconfig = is_linux
mtkleincdedd0e2016-09-12 15:15:44 -070016 skia_use_freetype = is_android || is_fuchsia || is_linux
mtklein457b42a2016-08-23 13:56:37 -070017 skia_use_giflib = !is_fuchsia
mtklein63213812016-08-24 09:55:56 -070018 skia_use_libjpeg_turbo = true
19 skia_use_libpng = true
mtkleineb3c4252016-08-23 07:38:09 -070020 skia_use_libwebp = !is_fuchsia
mtkleina627b5c2016-09-20 13:36:47 -070021 skia_use_mesa = false
mtklein63213812016-08-24 09:55:56 -070022 skia_use_sfntly = !is_fuchsia
mtkleinf29180e2016-09-16 07:01:17 -070023 skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24
mtklein63213812016-08-24 09:55:56 -070024 skia_use_zlib = true
mtklein1bd72ba2016-09-16 07:45:52 -070025
26 skia_enable_android_framework_defines = false
mtklein06c35c02016-09-20 12:28:12 -070027 skia_enable_gpu = true
mtklein3e8012e2016-09-21 09:14:19 -070028 skia_enable_tools = is_skia_standalone
29 skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug
Brian Salomon789e25e2016-09-30 13:41:03 -040030 skia_vulkan_sdk = ""
mtkleinc04ff472016-06-23 10:29:30 -070031}
32
Brian Salomon789e25e2016-09-30 13:41:03 -040033skia_use_vulkan = skia_use_vulkan || skia_vulkan_sdk != ""
34
mtklein38925aa2016-09-21 10:11:25 -070035# Our tools require static linking (they use non-exported symbols).
36skia_enable_tools = skia_enable_tools && !is_component_build
mtklein06c35c02016-09-20 12:28:12 -070037
mtkleina45be612016-08-29 15:22:10 -070038fontmgr_android_enabled = skia_use_expat && skia_use_freetype
39
mtklein1211e0c2016-07-26 13:55:45 -070040skia_public_includes = [
mtklein25c81d42016-07-27 13:55:26 -070041 "include/android",
mtkleinfa84d942016-07-28 09:45:14 -070042 "include/c",
mtklein1211e0c2016-07-26 13:55:45 -070043 "include/codec",
44 "include/config",
45 "include/core",
46 "include/effects",
47 "include/gpu",
48 "include/gpu/gl",
49 "include/images",
50 "include/pathops",
51 "include/ports",
mtklein25c81d42016-07-27 13:55:26 -070052 "include/svg",
mtklein1211e0c2016-07-26 13:55:45 -070053 "include/utils",
54 "include/utils/mac",
mtklein25c81d42016-07-27 13:55:26 -070055 "include/xml",
mtklein1211e0c2016-07-26 13:55:45 -070056]
57
mtkleinc04ff472016-06-23 10:29:30 -070058# Skia public API, generally provided by :skia.
59config("skia_public") {
mtklein1211e0c2016-07-26 13:55:45 -070060 include_dirs = skia_public_includes
mtkleinc04ff472016-06-23 10:29:30 -070061 defines = [ "SKIA_DLL" ]
Mike Kleinc4cbd742016-09-26 21:37:09 -040062 if (is_fuchsia || is_linux) {
jcgregorio5561e3d2016-08-25 09:25:11 -070063 defines += [ "SK_SAMPLES_FOR_X" ]
64 }
mtkleincae1be52016-09-20 08:24:34 -070065 if (skia_enable_android_framework_defines) {
66 defines += skia_android_framework_defines
67 }
mtklein06c35c02016-09-20 12:28:12 -070068 if (!skia_enable_gpu) {
69 defines += [ "SK_SUPPORT_GPU=0" ]
70 }
mtkleinc04ff472016-06-23 10:29:30 -070071}
72
73# Skia internal APIs, used by Skia itself and a few test tools.
74config("skia_private") {
75 visibility = [ ":*" ]
76
77 include_dirs = [
78 "include/private",
79 "src/c",
mtklein1211e0c2016-07-26 13:55:45 -070080 "src/codec",
mtkleinc04ff472016-06-23 10:29:30 -070081 "src/config",
82 "src/core",
83 "src/effects",
mtklein25c81d42016-07-27 13:55:26 -070084 "src/effects/gradients",
85 "src/fonts",
mtkleinc04ff472016-06-23 10:29:30 -070086 "src/gpu",
87 "src/image",
88 "src/images",
89 "src/lazy",
90 "src/opts",
91 "src/pathops",
mtklein2b6870c2016-07-28 14:17:33 -070092 "src/pdf",
mtkleinc04ff472016-06-23 10:29:30 -070093 "src/ports",
94 "src/sfnt",
mtklein9e0d9dd2016-08-30 10:37:19 -070095 "src/sksl",
mtkleinc04ff472016-06-23 10:29:30 -070096 "src/utils",
mtklein7a1f45f2016-08-04 06:19:33 -070097 "src/utils/win",
mtkleinc04ff472016-06-23 10:29:30 -070098 "third_party/etc1",
99 "third_party/ktx",
100 ]
mtklein150d1132016-08-01 06:56:40 -0700101
mtklein63213812016-08-24 09:55:56 -0700102 defines = [ "SK_GAMMA_APPLY_TO_A8" ]
mtkleinb37c0342016-09-09 11:07:45 -0700103 if (is_android) {
104 defines += [
105 "SK_GAMMA_EXPONENT=1.4",
106 "SK_GAMMA_CONTRAST=0.0",
107 ]
108 }
mtklein88a7ac02016-09-14 11:16:49 -0700109 if (is_official_build || is_android) {
110 # TODO(bsalomon): it'd be nice to make Android normal.
111 defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
112 }
Brian Salomon789e25e2016-09-30 13:41:03 -0400113 libs = []
114 lib_dirs = []
115 if (skia_use_vulkan) {
116 if (skia_vulkan_sdk != "") {
117 include_dirs += [ "$skia_vulkan_sdk/x86_64/include/" ]
118 lib_dirs += [ "$skia_vulkan_sdk/x86_64/lib/" ]
119 }
120 libs += [ "vulkan" ]
121 }
mtkleinc04ff472016-06-23 10:29:30 -0700122}
123
124# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
125config("skia_library") {
126 visibility = [ ":*" ]
mtkleinc04ff472016-06-23 10:29:30 -0700127 defines = [ "SKIA_IMPLEMENTATION=1" ]
128}
129
130skia_library_configs = [
131 ":skia_public",
132 ":skia_private",
133 ":skia_library",
134]
135
mtklein9b8583d2016-08-24 17:32:30 -0700136# Use for CPU-specific Skia code that needs particular compiler flags.
137template("opts") {
138 if (invoker.enabled) {
139 source_set(target_name) {
140 forward_variables_from(invoker, "*")
141 configs += skia_library_configs
142 }
143 } else {
144 # If not enabled, a phony empty target that swallows all otherwise unused variables.
145 source_set(target_name) {
146 forward_variables_from(invoker,
147 "*",
148 [
149 "sources",
150 "cflags",
151 ])
152 }
153 }
anmittala7eaf2e2016-08-17 13:57:26 -0700154}
155
mtklein422310d2016-08-16 18:28:43 -0700156is_x86 = current_cpu == "x64" || current_cpu == "x86"
mtkleinc04ff472016-06-23 10:29:30 -0700157
mtklein7d6fb2c2016-08-25 14:50:44 -0700158opts("none") {
159 enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64"
brettwb9447282016-09-01 14:24:39 -0700160 sources = skia_opts.none_sources
anmittalb8b3f712016-08-25 04:55:19 -0700161 cflags = []
162}
163
mtklein7d6fb2c2016-08-25 14:50:44 -0700164opts("armv7") {
anmittalb8b3f712016-08-25 04:55:19 -0700165 enabled = current_cpu == "arm"
brettwb9447282016-09-01 14:24:39 -0700166 sources = skia_opts.armv7_sources + skia_opts.neon_sources
mtklein7d6fb2c2016-08-25 14:50:44 -0700167 cflags = []
anmittalb8b3f712016-08-25 04:55:19 -0700168}
169
170opts("arm64") {
171 enabled = current_cpu == "arm64"
brettwb9447282016-09-01 14:24:39 -0700172 sources = skia_opts.arm64_sources
anmittalb8b3f712016-08-25 04:55:19 -0700173 cflags = []
174}
175
176opts("crc32") {
177 enabled = current_cpu == "arm64"
brettwb9447282016-09-01 14:24:39 -0700178 sources = skia_opts.crc32_sources
anmittalb8b3f712016-08-25 04:55:19 -0700179 cflags = [ "-march=armv8-a+crc" ]
180}
181
mtklein9b8583d2016-08-24 17:32:30 -0700182opts("sse2") {
183 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700184 sources = skia_opts.sse2_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400185 if (!is_win) {
186 cflags = [ "-msse2" ]
187 }
mtklein9b8583d2016-08-24 17:32:30 -0700188}
mtkleinc04ff472016-06-23 10:29:30 -0700189
mtklein9b8583d2016-08-24 17:32:30 -0700190opts("ssse3") {
191 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700192 sources = skia_opts.ssse3_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400193 if (!is_win) {
194 cflags = [ "-mssse3" ]
195 }
mtklein9b8583d2016-08-24 17:32:30 -0700196}
mtkleinc04ff472016-06-23 10:29:30 -0700197
mtklein9b8583d2016-08-24 17:32:30 -0700198opts("sse41") {
199 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700200 sources = skia_opts.sse41_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400201 if (!is_win) {
202 cflags = [ "-msse4.1" ]
203 }
mtklein9b8583d2016-08-24 17:32:30 -0700204}
mtklein4e976072016-08-08 09:06:27 -0700205
mtklein9b8583d2016-08-24 17:32:30 -0700206opts("sse42") {
207 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700208 sources = skia_opts.sse42_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400209 if (!is_win) {
210 cflags = [ "-msse4.2" ]
211 }
mtklein9b8583d2016-08-24 17:32:30 -0700212}
213
214opts("avx") {
215 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700216 sources = skia_opts.avx_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400217 if (is_win) {
218 cflags = [ "/arch:AVX" ]
219 } else {
220 cflags = [ "-mavx" ]
221 }
mtkleinc04ff472016-06-23 10:29:30 -0700222}
223
Mike Klein78d5a3b2016-09-30 10:48:01 -0400224opts("hsw") {
225 enabled = is_x86
226 sources = skia_opts.hsw_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400227 if (is_win) {
228 cflags = [ "/arch:AVX2" ]
229 } else {
230 cflags = [
231 "-mavx2",
232 "-mbmi",
233 "-mbmi2",
234 "-mf16c",
235 "-mfma",
236 ]
237 }
Mike Klein78d5a3b2016-09-30 10:48:01 -0400238}
239
mtklein349cece2016-08-26 08:13:04 -0700240opts("dsp") {
241 enabled = current_cpu == "mipsel"
brettwb9447282016-09-01 14:24:39 -0700242 sources = skia_opts.mips_dsp_sources
mtkleinb6064ef2016-08-30 11:49:24 -0700243 cflags = []
mtklein349cece2016-08-26 08:13:04 -0700244}
245
mtkleinc095df52016-08-24 12:23:52 -0700246# Any feature of Skia that requires third-party code should be optional and use this template.
mtklein457b42a2016-08-23 13:56:37 -0700247template("optional") {
248 if (invoker.enabled) {
249 config(target_name + "_public") {
mtkleincd01b032016-08-31 04:58:19 -0700250 if (defined(invoker.public_defines)) {
251 defines = invoker.public_defines
252 }
mtklein457b42a2016-08-23 13:56:37 -0700253 }
254 source_set(target_name) {
mtkleincd01b032016-08-31 04:58:19 -0700255 forward_variables_from(invoker,
256 "*",
257 [
258 "public_defines",
259 "sources_when_disabled",
260 ])
mtklein457b42a2016-08-23 13:56:37 -0700261 all_dependent_configs = [ ":" + target_name + "_public" ]
mtklein9b8583d2016-08-24 17:32:30 -0700262 configs += skia_library_configs
mtklein457b42a2016-08-23 13:56:37 -0700263 }
264 } else {
mtklein457b42a2016-08-23 13:56:37 -0700265 source_set(target_name) {
266 forward_variables_from(invoker,
267 "*",
268 [
269 "public_defines",
mtklein457b42a2016-08-23 13:56:37 -0700270 "deps",
mtklein6ef69992016-09-14 06:12:09 -0700271 "libs",
mtklein457b42a2016-08-23 13:56:37 -0700272 "sources",
mtkleincd01b032016-08-31 04:58:19 -0700273 "sources_when_disabled",
mtklein457b42a2016-08-23 13:56:37 -0700274 ])
mtkleincd01b032016-08-31 04:58:19 -0700275 if (defined(invoker.sources_when_disabled)) {
276 sources = invoker.sources_when_disabled
277 }
278 configs += skia_library_configs
mtklein457b42a2016-08-23 13:56:37 -0700279 }
mtkleineb3c4252016-08-23 07:38:09 -0700280 }
mtklein457b42a2016-08-23 13:56:37 -0700281}
mtklein457b42a2016-08-23 13:56:37 -0700282
mtkleina45be612016-08-29 15:22:10 -0700283optional("fontmgr_android") {
284 enabled = fontmgr_android_enabled
mtkleina45be612016-08-29 15:22:10 -0700285
286 deps = [
287 "//third_party/expat",
288 "//third_party/freetype2",
289 ]
290 sources = [
291 "src/ports/SkFontMgr_android.cpp",
292 "src/ports/SkFontMgr_android_factory.cpp",
293 "src/ports/SkFontMgr_android_parser.cpp",
294 ]
295}
296
mtkleind2e39db2016-09-07 07:52:55 -0700297optional("fontmgr_custom") {
298 enabled = is_linux && skia_use_freetype && !skia_use_fontconfig
299
300 deps = [
301 "//third_party/freetype2",
302 ]
303 sources = [
304 "src/ports/SkFontMgr_custom.cpp",
305 "src/ports/SkFontMgr_custom_directory_factory.cpp",
306 ]
307}
308
mtklein3cc22182016-08-29 13:26:14 -0700309optional("fontmgr_fontconfig") {
310 enabled = skia_use_freetype && skia_use_fontconfig
mtklein3cc22182016-08-29 13:26:14 -0700311
312 deps = [
313 "//third_party:fontconfig",
314 "//third_party/freetype2",
315 ]
316 sources = [
bungeman1ae0e012016-09-19 12:13:16 -0700317 "src/ports/SkFontConfigInterface.cpp",
mtklein3cc22182016-08-29 13:26:14 -0700318 "src/ports/SkFontConfigInterface_direct.cpp",
319 "src/ports/SkFontConfigInterface_direct_factory.cpp",
320 "src/ports/SkFontMgr_FontConfigInterface.cpp",
321 "src/ports/SkFontMgr_fontconfig.cpp",
322 "src/ports/SkFontMgr_fontconfig_factory.cpp",
323 ]
324}
325
mtkleincdedd0e2016-09-12 15:15:44 -0700326optional("fontmgr_fuchsia") {
327 enabled = is_fuchsia && skia_use_freetype
328
329 deps = [
330 "//third_party/freetype2",
331 ]
332 sources = [
333 "src/ports/SkFontMgr_custom.cpp",
334 "src/ports/SkFontMgr_custom_empty_factory.cpp",
335 ]
336}
337
mtklein457b42a2016-08-23 13:56:37 -0700338optional("gif") {
339 enabled = skia_use_giflib
340 public_defines = [ "SK_HAS_GIF_LIBRARY" ]
341
mtklein457b42a2016-08-23 13:56:37 -0700342 deps = [
343 "//third_party/giflib",
344 ]
345 sources = [
346 "src/codec/SkGifCodec.cpp",
347 ]
348}
349
mtklein06c35c02016-09-20 12:28:12 -0700350optional("gpu") {
351 enabled = skia_enable_gpu
mtkleine9fb3d52016-09-20 15:11:46 -0700352 public_defines = []
353
mtklein06c35c02016-09-20 12:28:12 -0700354 sources = skia_gpu_sources + [ "src/gpu/gl/GrGLDefaultInterface_native.cpp" ]
355
356 # These paths need to be absolute to match the ones produced by shared_sources.gni.
357 sources -= get_path_info([
358 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
359 "src/gpu/gl/GrGLDefaultInterface_none.cpp",
360 ],
361 "abspath")
362 if (is_android) {
363 sources += [ "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp" ]
364 } else if (is_linux) {
365 sources += [ "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp" ]
366 } else if (is_mac) {
367 sources += [ "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp" ]
368 } else {
369 sources += [ "src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ]
370 }
mtkleine9fb3d52016-09-20 15:11:46 -0700371 libs = []
372
373 if (skia_use_vulkan) {
374 public_defines += [ "SK_VULKAN" ]
375 sources += skia_vk_sources
egdaniele4a9bd72016-09-21 07:36:14 -0700376 if (skia_enable_vulkan_debug_layers) {
377 public_defines += [ "SK_ENABLE_VK_LAYERS" ]
378 }
mtkleine9fb3d52016-09-20 15:11:46 -0700379 }
mtklein06c35c02016-09-20 12:28:12 -0700380}
381
mtklein63213812016-08-24 09:55:56 -0700382optional("jpeg") {
383 enabled = skia_use_libjpeg_turbo
384 public_defines = [ "SK_HAS_JPEG_LIBRARY" ]
385
mtklein63213812016-08-24 09:55:56 -0700386 deps = [
387 "//third_party/libjpeg-turbo:libjpeg",
388 ]
389 sources = [
390 "src/codec/SkJpegCodec.cpp",
391 "src/codec/SkJpegDecoderMgr.cpp",
392 "src/codec/SkJpegUtility.cpp",
393 "src/images/SkJPEGImageEncoder.cpp",
394 "src/images/SkJPEGWriteUtility.cpp",
395 ]
396}
397
398optional("pdf") {
399 enabled = skia_use_zlib
mtklein63213812016-08-24 09:55:56 -0700400
mtklein63213812016-08-24 09:55:56 -0700401 deps = [
402 "//third_party/zlib",
403 ]
brettwb9447282016-09-01 14:24:39 -0700404 sources = skia_pdf_sources
mtkleincd01b032016-08-31 04:58:19 -0700405 sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]
mtklein63213812016-08-24 09:55:56 -0700406
407 if (skia_use_sfntly) {
408 deps += [ "//third_party/sfntly" ]
mtkleincd01b032016-08-31 04:58:19 -0700409 public_defines = [ "SK_PDF_USE_SFNTLY" ]
mtklein63213812016-08-24 09:55:56 -0700410 }
411}
412
413optional("png") {
414 enabled = skia_use_libpng
415 public_defines = [ "SK_HAS_PNG_LIBRARY" ]
416
mtklein63213812016-08-24 09:55:56 -0700417 deps = [
418 "//third_party/libpng",
419 ]
420 sources = [
421 "src/codec/SkIcoCodec.cpp",
422 "src/codec/SkPngCodec.cpp",
423 "src/images/SkPNGImageEncoder.cpp",
424 ]
425}
426
mtklein3cc22182016-08-29 13:26:14 -0700427optional("typeface_freetype") {
428 enabled = skia_use_freetype
mtklein3cc22182016-08-29 13:26:14 -0700429
430 deps = [
431 "//third_party/freetype2",
432 ]
433 sources = [
434 "src/ports/SkFontHost_FreeType.cpp",
435 "src/ports/SkFontHost_FreeType_common.cpp",
436 ]
437}
438
mtklein457b42a2016-08-23 13:56:37 -0700439optional("webp") {
440 enabled = skia_use_libwebp
441 public_defines = [ "SK_HAS_WEBP_LIBRARY" ]
442
mtklein457b42a2016-08-23 13:56:37 -0700443 deps = [
444 "//third_party/libwebp",
445 ]
446 sources = [
447 "src/codec/SkWebpAdapterCodec.cpp",
448 "src/codec/SkWebpCodec.cpp",
449 "src/images/SkWEBPImageEncoder.cpp",
450 ]
mtkleineb3c4252016-08-23 07:38:09 -0700451}
452
mtklein63213812016-08-24 09:55:56 -0700453optional("xml") {
454 enabled = skia_use_expat
mtklein63213812016-08-24 09:55:56 -0700455
mtklein63213812016-08-24 09:55:56 -0700456 deps = [
457 "//third_party/expat",
458 ]
459 sources = [
460 "src/xml/SkDOM.cpp",
461 "src/xml/SkXMLParser.cpp",
462 "src/xml/SkXMLWriter.cpp",
463 ]
464}
465
mtkleinc04ff472016-06-23 10:29:30 -0700466component("skia") {
467 public_configs = [ ":skia_public" ]
468 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700469
470 deps = [
anmittalb8b3f712016-08-25 04:55:19 -0700471 ":arm64",
472 ":armv7",
mtklein9b8583d2016-08-24 17:32:30 -0700473 ":avx",
anmittalb8b3f712016-08-25 04:55:19 -0700474 ":crc32",
mtklein349cece2016-08-26 08:13:04 -0700475 ":dsp",
mtkleina45be612016-08-29 15:22:10 -0700476 ":fontmgr_android",
mtkleind2e39db2016-09-07 07:52:55 -0700477 ":fontmgr_custom",
mtklein3cc22182016-08-29 13:26:14 -0700478 ":fontmgr_fontconfig",
mtkleincdedd0e2016-09-12 15:15:44 -0700479 ":fontmgr_fuchsia",
mtklein457b42a2016-08-23 13:56:37 -0700480 ":gif",
mtklein06c35c02016-09-20 12:28:12 -0700481 ":gpu",
Mike Klein78d5a3b2016-09-30 10:48:01 -0400482 ":hsw",
mtklein63213812016-08-24 09:55:56 -0700483 ":jpeg",
mtklein9b8583d2016-08-24 17:32:30 -0700484 ":none",
mtklein63213812016-08-24 09:55:56 -0700485 ":pdf",
486 ":png",
mtklein9b8583d2016-08-24 17:32:30 -0700487 ":sse2",
488 ":sse41",
489 ":sse42",
490 ":ssse3",
mtklein3cc22182016-08-29 13:26:14 -0700491 ":typeface_freetype",
mtkleineb3c4252016-08-23 07:38:09 -0700492 ":webp",
mtklein63213812016-08-24 09:55:56 -0700493 ":xml",
mtkleinc04ff472016-06-23 10:29:30 -0700494 ]
495
mtkleinc04ff472016-06-23 10:29:30 -0700496 sources = []
brettwb9447282016-09-01 14:24:39 -0700497 sources += skia_core_sources
498 sources += skia_effects_sources
brettwb9447282016-09-01 14:24:39 -0700499 sources += skia_sksl_sources
500 sources += skia_utils_sources
mtkleinc04ff472016-06-23 10:29:30 -0700501 sources += [
mtklein25c81d42016-07-27 13:55:26 -0700502 "src/android/SkBitmapRegionCodec.cpp",
503 "src/android/SkBitmapRegionDecoder.cpp",
504 "src/codec/SkAndroidCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700505 "src/codec/SkBmpCodec.cpp",
506 "src/codec/SkBmpMaskCodec.cpp",
507 "src/codec/SkBmpRLECodec.cpp",
508 "src/codec/SkBmpStandardCodec.cpp",
509 "src/codec/SkCodec.cpp",
510 "src/codec/SkCodecImageGenerator.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700511 "src/codec/SkMaskSwizzler.cpp",
512 "src/codec/SkMasks.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700513 "src/codec/SkSampledCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700514 "src/codec/SkSampler.cpp",
515 "src/codec/SkSwizzler.cpp",
516 "src/codec/SkWbmpCodec.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700517 "src/images/SkImageEncoder.cpp",
518 "src/images/SkImageEncoder_Factory.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700519 "src/images/SkKTXImageEncoder.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700520 "src/ports/SkDiscardableMemory_none.cpp",
521 "src/ports/SkGlobalInitialization_default.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700522 "src/ports/SkImageGenerator_skia.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700523 "src/ports/SkMemory_malloc.cpp",
524 "src/ports/SkOSFile_stdio.cpp",
525 "src/sfnt/SkOTTable_name.cpp",
526 "src/sfnt/SkOTUtils.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700527 "src/svg/SkSVGCanvas.cpp",
528 "src/svg/SkSVGDevice.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700529 "src/utils/mac/SkStream_mac.cpp",
530 "third_party/etc1/etc1.cpp",
531 "third_party/ktx/ktx.cpp",
532 ]
brettwb9447282016-09-01 14:24:39 -0700533
mtklein7d6fb2c2016-08-25 14:50:44 -0700534 libs = []
535
mtkleinc04ff472016-06-23 10:29:30 -0700536 if (is_win) {
537 sources += [
538 "src/ports/SkDebug_win.cpp",
539 "src/ports/SkFontHost_win.cpp",
540 "src/ports/SkFontMgr_win_dw.cpp",
541 "src/ports/SkFontMgr_win_dw_factory.cpp",
542 "src/ports/SkImageEncoder_WIC.cpp",
543 "src/ports/SkImageGeneratorWIC.cpp",
544 "src/ports/SkOSFile_win.cpp",
mtklein605d9522016-09-21 14:01:32 -0700545 "src/ports/SkOSLibrary_win.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700546 "src/ports/SkScalerContext_win_dw.cpp",
547 "src/ports/SkTLS_win.cpp",
548 "src/ports/SkTypeface_win_dw.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700549 "src/xps/SkDocument_XPS.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700550 ]
mtkleinb9be9792016-09-16 14:44:18 -0700551 sources -=
552 [ get_path_info("src/utils/SkThreadUtils_pthread.cpp", "abspath") ]
mtkleinc04ff472016-06-23 10:29:30 -0700553 } else {
554 sources += [
mtkleinc04ff472016-06-23 10:29:30 -0700555 "src/ports/SkOSFile_posix.cpp",
mtklein605d9522016-09-21 14:01:32 -0700556 "src/ports/SkOSLibrary_posix.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700557 "src/ports/SkTLS_pthread.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700558 "src/xps/SkDocument_XPS_None.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700559 ]
560 }
561
mtklein7d6fb2c2016-08-25 14:50:44 -0700562 if (is_android) {
563 deps += [
564 "//third_party/cpu-features",
565 "//third_party/expat",
mtklein7d6fb2c2016-08-25 14:50:44 -0700566 ]
mtklein06c35c02016-09-20 12:28:12 -0700567 sources += [ "src/ports/SkDebug_android.cpp" ]
mtklein7d6fb2c2016-08-25 14:50:44 -0700568 libs += [
569 "EGL",
570 "GLESv2",
571 "log",
572 ]
573 }
574
mtkleinc04ff472016-06-23 10:29:30 -0700575 if (is_linux) {
mtklein09e61f72016-08-23 13:35:28 -0700576 libs += [
577 "GL",
578 "GLU",
579 "X11",
580 ]
mtklein06c35c02016-09-20 12:28:12 -0700581 sources += [ "src/ports/SkDebug_stdio.cpp" ]
mtkleinc04ff472016-06-23 10:29:30 -0700582 }
583
584 if (is_mac) {
585 sources += [
mtklein7d6fb2c2016-08-25 14:50:44 -0700586 "src/ports/SkDebug_stdio.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700587 "src/ports/SkFontHost_mac.cpp",
588 "src/ports/SkImageEncoder_CG.cpp",
589 "src/ports/SkImageGeneratorCG.cpp",
590 ]
mtklein09e61f72016-08-23 13:35:28 -0700591 libs += [
592 "ApplicationServices.framework",
593 "OpenGL.framework",
594 ]
mtkleinc04ff472016-06-23 10:29:30 -0700595 }
abarth6fc8ff02016-07-15 15:15:15 -0700596
597 if (is_fuchsia) {
mtklein06c35c02016-09-20 12:28:12 -0700598 sources += [ "src/ports/SkDebug_stdio.cpp" ]
abarth6fc8ff02016-07-15 15:15:15 -0700599 }
mtkleinc04ff472016-06-23 10:29:30 -0700600}
601
mtkleinada5a442016-08-02 14:28:26 -0700602skia_h_headers = exec_script("gyp/find.py",
603 [ "*.h" ] + rebase_path(skia_public_includes),
604 "list lines",
605 []) -
606 [
607 rebase_path("include/gpu/gl/GrGLConfig_chrome.h"),
608 rebase_path("include/gpu/vk/GrVkBackendContext.h"),
609 rebase_path("include/gpu/vk/GrVkDefines.h"),
610 rebase_path("include/gpu/vk/GrVkInterface.h"),
611 rebase_path("include/gpu/vk/GrVkTypes.h"),
612 rebase_path("include/ports/SkFontMgr_fontconfig.h"),
613 ]
614
mtklein1211e0c2016-07-26 13:55:45 -0700615action("skia.h") {
616 script = "gn/echo_headers.py"
617 args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] +
mtkleinc095df52016-08-24 12:23:52 -0700618 rebase_path(skia_h_headers, target_gen_dir)
Ben Wagnerbc344042016-09-29 15:41:53 -0400619 inputs = skia_h_headers
mtklein1211e0c2016-07-26 13:55:45 -0700620 outputs = [
621 "$target_gen_dir/skia.h",
622 ]
623}
624
mtklein06c35c02016-09-20 12:28:12 -0700625if (skia_enable_gpu && target_cpu == "x64") {
mtklein1fbdf982016-09-15 12:07:48 -0700626 # Our bots only have 64-bit libOSMesa installed.
627 # TODO: worth fixing?
628 executable("fiddle") {
629 include_dirs = [ "$target_gen_dir" ]
630 libs = []
631 if (is_linux) {
632 libs += [ "OSMesa" ]
633 }
mtklein56d56692016-09-15 11:18:55 -0700634
mtklein1fbdf982016-09-15 12:07:48 -0700635 sources = [
636 "src/images/SkForceLinking.cpp",
637 "tools/fiddle/draw.cpp",
638 "tools/fiddle/fiddle_main.cpp",
639 ]
640 deps = [
641 ":skia",
642 ":skia.h",
643 ]
644 }
mtkleinc04ff472016-06-23 10:29:30 -0700645}
mtklein25c81d42016-07-27 13:55:26 -0700646
mtkleinc095df52016-08-24 12:23:52 -0700647# Targets guarded by skia_enable_tools may use //third_party freely.
648if (skia_enable_tools) {
649 template("test_lib") {
650 config(target_name + "_config") {
651 include_dirs = invoker.public_include_dirs
mtkleina627b5c2016-09-20 13:36:47 -0700652 if (defined(invoker.public_defines)) {
653 defines = invoker.public_defines
654 }
mtklein25c81d42016-07-27 13:55:26 -0700655 }
mtkleinc095df52016-08-24 12:23:52 -0700656 source_set(target_name) {
657 forward_variables_from(invoker, "*", [ "public_include_dirs" ])
658 public_configs = [
659 ":" + target_name + "_config",
660 ":skia_private",
661 ]
662
663 if (!defined(deps)) {
664 deps = []
665 }
666 deps += [ ":skia" ]
667 testonly = true
668 }
mtklein25c81d42016-07-27 13:55:26 -0700669 }
mtklein25c81d42016-07-27 13:55:26 -0700670
mtkleinc095df52016-08-24 12:23:52 -0700671 test_lib("gpu_tool_utils") {
mtklein38925aa2016-09-21 10:11:25 -0700672 public_include_dirs = []
673 if (skia_enable_gpu) {
674 public_defines = []
675 public_include_dirs += [ "tools/gpu" ]
mtkleind68f9b02016-09-23 13:18:41 -0700676
677 deps = []
mtklein38925aa2016-09-21 10:11:25 -0700678 sources = [
679 "tools/gpu/GrContextFactory.cpp",
680 "tools/gpu/GrTest.cpp",
681 "tools/gpu/TestContext.cpp",
682 "tools/gpu/gl/GLTestContext.cpp",
mtklein605d9522016-09-21 14:01:32 -0700683 "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
mtklein38925aa2016-09-21 10:11:25 -0700684 "tools/gpu/gl/debug/DebugGLTestContext.cpp",
685 "tools/gpu/gl/debug/GrBufferObj.cpp",
686 "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
687 "tools/gpu/gl/debug/GrProgramObj.cpp",
688 "tools/gpu/gl/debug/GrShaderObj.cpp",
689 "tools/gpu/gl/debug/GrTextureObj.cpp",
690 "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
691 "tools/gpu/gl/null/NullGLTestContext.cpp",
692 ]
693 libs = []
mtklein25c81d42016-07-27 13:55:26 -0700694
mtklein38925aa2016-09-21 10:11:25 -0700695 if (is_android) {
696 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
697 } else if (is_linux) {
698 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
699 } else if (is_mac) {
700 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
701 }
mtklein6ef69992016-09-14 06:12:09 -0700702
mtkleind68f9b02016-09-23 13:18:41 -0700703 if (skia_use_angle) {
704 public_defines += [ "SK_ANGLE" ]
705 deps += [ "//third_party/angle2" ]
706 sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
mtklein38925aa2016-09-21 10:11:25 -0700707 }
708 if (skia_use_mesa) {
709 public_defines += [ "SK_MESA" ]
710 sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ]
711 libs += [ "OSMesa" ]
712 }
mtkleind68f9b02016-09-23 13:18:41 -0700713 if (skia_use_vulkan) {
714 sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
715 }
mtkleina627b5c2016-09-20 13:36:47 -0700716 }
mtklein25c81d42016-07-27 13:55:26 -0700717 }
mtklein25c81d42016-07-27 13:55:26 -0700718
mtkleinc095df52016-08-24 12:23:52 -0700719 test_lib("flags") {
720 public_include_dirs = [ "tools/flags" ]
721 sources = [
722 "tools/flags/SkCommandLineFlags.cpp",
mtklein046cb562016-09-16 10:23:12 -0700723 ]
724 }
725 test_lib("common_flags") {
726 public_include_dirs = [ "tools/flags" ]
727 sources = [
mtkleinc095df52016-08-24 12:23:52 -0700728 "tools/flags/SkCommonFlags.cpp",
729 "tools/flags/SkCommonFlagsConfig.cpp",
730 ]
731 deps = [
mtklein046cb562016-09-16 10:23:12 -0700732 ":flags",
mtkleinc095df52016-08-24 12:23:52 -0700733 ":gpu_tool_utils",
734 ]
735 }
mtklein25c81d42016-07-27 13:55:26 -0700736
mtkleinc095df52016-08-24 12:23:52 -0700737 test_lib("tool_utils") {
738 public_include_dirs = [
739 "tools",
740 "tools/debugger",
741 "tools/timer",
742 ]
743 sources = [
744 "src/images/SkForceLinking.cpp",
745 "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to tools?
mtkleinb37c0342016-09-09 11:07:45 -0700746 "tools/AndroidSkDebugToStdOut.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700747 "tools/CrashHandler.cpp",
mtklein0590fa52016-09-01 07:06:54 -0700748 "tools/LsanSuppressions.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700749 "tools/ProcStats.cpp",
750 "tools/Resources.cpp",
751 "tools/ThermalManager.cpp",
752 "tools/UrlDataManager.cpp",
753 "tools/debugger/SkDebugCanvas.cpp",
754 "tools/debugger/SkDrawCommand.cpp",
755 "tools/debugger/SkJsonWriteBuffer.cpp",
756 "tools/debugger/SkObjectParser.cpp",
757 "tools/debugger/SkOverdrawMode.cpp",
758 "tools/picture_utils.cpp",
759 "tools/random_parse_path.cpp",
760 "tools/sk_tool_utils.cpp",
761 "tools/sk_tool_utils_font.cpp",
762 "tools/timer/Timer.cpp",
763 ]
764 deps = [
mtklein046cb562016-09-16 10:23:12 -0700765 ":common_flags",
mtkleinc095df52016-08-24 12:23:52 -0700766 ":flags",
767 "//third_party/libpng",
768 ]
769 public_deps = [
770 "//third_party/jsoncpp",
771 ]
772 }
mtklein25c81d42016-07-27 13:55:26 -0700773
mtkleinc095df52016-08-24 12:23:52 -0700774 gm_sources = exec_script("gyp/find.py",
775 [
776 "*.c*",
777 rebase_path("gm"),
778 ],
779 "list lines",
780 [])
781 test_lib("gm") {
782 public_include_dirs = [ "gm" ]
783 sources = gm_sources
784 deps = [
785 ":gpu_tool_utils",
786 ":skia",
787 ":tool_utils",
788 ]
789 }
mtklein25c81d42016-07-27 13:55:26 -0700790
mtkleinc095df52016-08-24 12:23:52 -0700791 tests_sources = exec_script("gyp/find.py",
792 [
793 "*.c*",
794 rebase_path("tests"),
795 ],
796 "list lines",
797 [])
mtklein2f3416d2016-08-02 16:02:05 -0700798
mtkleinc095df52016-08-24 12:23:52 -0700799 test_lib("tests") {
800 public_include_dirs = [ "tests" ]
mtkleina45be612016-08-29 15:22:10 -0700801 sources = tests_sources - [
802 rebase_path("tests/PathOpsSkpClipTest.cpp"), # alternate main
mtkleina45be612016-08-29 15:22:10 -0700803 rebase_path("tests/SkpSkGrTest.cpp"), # doesn't compile
804 rebase_path("tests/skia_test.cpp"), # alternate main
805 ]
806 if (!fontmgr_android_enabled) {
807 sources -= [ rebase_path("tests/FontMgrAndroidParserTest.cpp") ]
808 }
mtkleinc095df52016-08-24 12:23:52 -0700809 deps = [
fmalita6cf896d2016-08-25 08:44:35 -0700810 ":experimental_svg_model",
mtkleinc095df52016-08-24 12:23:52 -0700811 ":flags",
812 ":gpu_tool_utils",
813 ":skia",
814 ":tool_utils",
815 "//third_party/libpng",
816 "//third_party/zlib",
817 ]
818 }
mtklein2f3416d2016-08-02 16:02:05 -0700819
mtkleinc095df52016-08-24 12:23:52 -0700820 bench_sources = exec_script("gyp/find.py",
821 [
822 "*.c*",
823 rebase_path("bench"),
824 ],
825 "list lines",
826 [])
mtklein25c81d42016-07-27 13:55:26 -0700827
mtkleinc095df52016-08-24 12:23:52 -0700828 test_lib("bench") {
829 public_include_dirs = [ "bench" ]
830 sources = bench_sources
831 sources -= [
832 rebase_path("bench/nanobench.cpp"),
833 rebase_path("bench/nanobenchAndroid.cpp"),
834 ]
835 deps = [
836 ":flags",
837 ":gm",
838 ":gpu_tool_utils",
839 ":skia",
840 ":tool_utils",
841 ]
842 }
mtklein2b6870c2016-07-28 14:17:33 -0700843
mtkleinc095df52016-08-24 12:23:52 -0700844 test_lib("experimental_svg_model") {
845 public_include_dirs = [ "experimental/svg/model" ]
846 sources = [
847 "experimental/svg/model/SkSVGAttribute.cpp",
848 "experimental/svg/model/SkSVGAttributeParser.cpp",
849 "experimental/svg/model/SkSVGCircle.cpp",
850 "experimental/svg/model/SkSVGContainer.cpp",
851 "experimental/svg/model/SkSVGDOM.cpp",
852 "experimental/svg/model/SkSVGEllipse.cpp",
853 "experimental/svg/model/SkSVGLine.cpp",
fmalita28d5b722016-09-12 17:06:47 -0700854 "experimental/svg/model/SkSVGLinearGradient.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700855 "experimental/svg/model/SkSVGNode.cpp",
856 "experimental/svg/model/SkSVGPath.cpp",
857 "experimental/svg/model/SkSVGPoly.cpp",
858 "experimental/svg/model/SkSVGRect.cpp",
859 "experimental/svg/model/SkSVGRenderContext.cpp",
860 "experimental/svg/model/SkSVGSVG.cpp",
861 "experimental/svg/model/SkSVGShape.cpp",
fmalita28d5b722016-09-12 17:06:47 -0700862 "experimental/svg/model/SkSVGStop.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700863 "experimental/svg/model/SkSVGTransformableNode.cpp",
864 "experimental/svg/model/SkSVGValue.cpp",
865 ]
866 deps = [
867 ":skia",
868 ]
869 }
fmalitaa2b9fdf2016-08-03 19:53:36 -0700870
mtklein2b6870c2016-07-28 14:17:33 -0700871 executable("dm") {
872 sources = [
873 "dm/DM.cpp",
874 "dm/DMJsonWriter.cpp",
875 "dm/DMSrcSink.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700876 ]
877 include_dirs = [ "tests" ]
878 deps = [
mtklein046cb562016-09-16 10:23:12 -0700879 ":common_flags",
fmalitaa2b9fdf2016-08-03 19:53:36 -0700880 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700881 ":flags",
882 ":gm",
883 ":gpu_tool_utils",
884 ":skia",
mtklein2f3416d2016-08-02 16:02:05 -0700885 ":tests",
mtklein2b6870c2016-07-28 14:17:33 -0700886 ":tool_utils",
887 "//third_party/jsoncpp",
888 "//third_party/libpng",
889 ]
890 testonly = true
891 }
892
Mike Kleina3430172016-09-27 16:46:29 -0400893 if (!is_debug) { # I've benchmarked debug code once too many times...
894 executable("monobench") {
895 sources = [
896 "tools/monobench.cpp",
897 ]
898 deps = [
899 ":bench",
900 ":skia",
901 ]
902 testonly = true
903 }
mtklein2b6870c2016-07-28 14:17:33 -0700904 }
905
906 executable("nanobench") {
907 sources = [
908 "bench/nanobench.cpp",
909 ]
910 deps = [
911 ":bench",
mtklein046cb562016-09-16 10:23:12 -0700912 ":common_flags",
fmalita6519c212016-09-14 08:05:17 -0700913 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700914 ":flags",
915 ":gm",
916 ":gpu_tool_utils",
917 ":skia",
918 ":tool_utils",
919 "//third_party/jsoncpp",
920 ]
921 testonly = true
922 }
halcanary19a97202016-08-03 15:08:04 -0700923
mtklein38925aa2016-09-21 10:11:25 -0700924 if (skia_enable_gpu) {
925 executable("skpbench") {
926 sources = [
927 "tools/skpbench/skpbench.cpp",
928 ]
929 deps = [
930 ":flags",
931 ":gpu_tool_utils",
932 ":skia",
933 ":tool_utils",
934 ]
935 testonly = true
936 }
csmartdalton4b5179b2016-09-19 11:03:58 -0700937 }
938
mtklein6f5df6a2016-08-29 16:01:10 -0700939 if (current_cpu != "mipsel") { # Clang 3.8 crashes while compiling hb-icu.cc for mipsel.
halcanary3eee9d92016-09-10 07:01:53 -0700940 executable("sktexttopdf-hb") {
mtklein6f5df6a2016-08-29 16:01:10 -0700941 sources = [
942 "tools/SkShaper_harfbuzz.cpp",
943 "tools/using_skia_and_harfbuzz.cpp",
944 ]
945 deps = [
946 ":skia",
947 "//third_party/harfbuzz",
948 ]
949 testonly = true
950 }
halcanary19a97202016-08-03 15:08:04 -0700951 }
halcanary3eee9d92016-09-10 07:01:53 -0700952 executable("sktexttopdf") {
953 sources = [
954 "tools/SkShaper_primitive.cpp",
955 "tools/using_skia_and_harfbuzz.cpp",
956 ]
957 deps = [
958 ":skia",
959 ]
960 testonly = true
961 }
mtklein046cb562016-09-16 10:23:12 -0700962
963 executable("get_images_from_skps") {
964 sources = [
965 "tools/get_images_from_skps.cpp",
966 ]
967 deps = [
968 ":flags",
969 ":skia",
970 "//third_party/jsoncpp",
971 ]
972 testonly = true
973 }
mtkleinecbc5262016-09-22 11:51:24 -0700974
975 executable("skiaserve") {
976 sources = [
977 "tools/skiaserve/Request.cpp",
978 "tools/skiaserve/Response.cpp",
979 "tools/skiaserve/skiaserve.cpp",
980 "tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp",
981 "tools/skiaserve/urlhandlers/BatchesHandler.cpp",
982 "tools/skiaserve/urlhandlers/BreakHandler.cpp",
983 "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp",
984 "tools/skiaserve/urlhandlers/CmdHandler.cpp",
985 "tools/skiaserve/urlhandlers/ColorModeHandler.cpp",
986 "tools/skiaserve/urlhandlers/DataHandler.cpp",
987 "tools/skiaserve/urlhandlers/DownloadHandler.cpp",
988 "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp",
989 "tools/skiaserve/urlhandlers/ImgHandler.cpp",
990 "tools/skiaserve/urlhandlers/InfoHandler.cpp",
991 "tools/skiaserve/urlhandlers/PostHandler.cpp",
992 "tools/skiaserve/urlhandlers/QuitHandler.cpp",
993 "tools/skiaserve/urlhandlers/RootHandler.cpp",
994 ]
995 deps = [
996 ":flags",
997 ":gpu_tool_utils",
998 ":skia",
999 ":tool_utils",
1000 "//third_party/jsoncpp",
1001 "//third_party/libmicrohttpd",
1002 "//third_party/libpng",
1003 ]
1004 testonly = true
1005 }
kjlubick14f984b2016-10-03 11:49:45 -07001006
1007 executable("fuzz") {
1008 sources = [
1009 "fuzz/FilterFuzz.cpp",
1010 "fuzz/FuzzGradients.cpp",
1011 "fuzz/FuzzParsePath.cpp",
1012 "fuzz/FuzzPathop.cpp",
1013 "fuzz/FuzzScaleToSides.cpp",
1014 "fuzz/fuzz.cpp",
1015 ]
1016 deps = [
1017 ":flags",
1018 ":skia",
1019 ]
1020 testonly = true
1021 }
Mike Klein38312422016-10-05 15:41:01 -04001022
1023 executable("dump_record") {
1024 sources = [
1025 "tools/DumpRecord.cpp",
1026 "tools/dump_record.cpp",
1027 ]
1028 deps = [
1029 ":flags",
1030 ":skia",
1031 ]
1032 testonly = true
1033 }
mtklein25c81d42016-07-27 13:55:26 -07001034}