blob: a21549417caaf957d757b3d4b0f0e19274514b7c [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
mtklein9b8583d2016-08-24 17:32:30 -0700185 cflags = [ "-msse2" ]
186}
mtkleinc04ff472016-06-23 10:29:30 -0700187
mtklein9b8583d2016-08-24 17:32:30 -0700188opts("ssse3") {
189 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700190 sources = skia_opts.ssse3_sources
mtklein9b8583d2016-08-24 17:32:30 -0700191 cflags = [ "-mssse3" ]
192}
mtkleinc04ff472016-06-23 10:29:30 -0700193
mtklein9b8583d2016-08-24 17:32:30 -0700194opts("sse41") {
195 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700196 sources = skia_opts.sse41_sources
mtklein9b8583d2016-08-24 17:32:30 -0700197 cflags = [ "-msse4.1" ]
198}
mtklein4e976072016-08-08 09:06:27 -0700199
mtklein9b8583d2016-08-24 17:32:30 -0700200opts("sse42") {
201 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700202 sources = skia_opts.sse42_sources
mtklein9b8583d2016-08-24 17:32:30 -0700203 cflags = [ "-msse4.2" ]
204}
205
206opts("avx") {
207 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700208 sources = skia_opts.avx_sources
mtklein9b8583d2016-08-24 17:32:30 -0700209 cflags = [ "-mavx" ]
mtkleinc04ff472016-06-23 10:29:30 -0700210}
211
Mike Klein78d5a3b2016-09-30 10:48:01 -0400212opts("hsw") {
213 enabled = is_x86
214 sources = skia_opts.hsw_sources
215 cflags = [
216 "-mavx2",
217 "-mbmi",
218 "-mbmi2",
219 "-mf16c",
220 "-mfma",
221 ]
222}
223
mtklein349cece2016-08-26 08:13:04 -0700224opts("dsp") {
225 enabled = current_cpu == "mipsel"
brettwb9447282016-09-01 14:24:39 -0700226 sources = skia_opts.mips_dsp_sources
mtkleinb6064ef2016-08-30 11:49:24 -0700227 cflags = []
mtklein349cece2016-08-26 08:13:04 -0700228}
229
mtkleinc095df52016-08-24 12:23:52 -0700230# Any feature of Skia that requires third-party code should be optional and use this template.
mtklein457b42a2016-08-23 13:56:37 -0700231template("optional") {
232 if (invoker.enabled) {
233 config(target_name + "_public") {
mtkleincd01b032016-08-31 04:58:19 -0700234 if (defined(invoker.public_defines)) {
235 defines = invoker.public_defines
236 }
mtklein457b42a2016-08-23 13:56:37 -0700237 }
238 source_set(target_name) {
mtkleincd01b032016-08-31 04:58:19 -0700239 forward_variables_from(invoker,
240 "*",
241 [
242 "public_defines",
243 "sources_when_disabled",
244 ])
mtklein457b42a2016-08-23 13:56:37 -0700245 all_dependent_configs = [ ":" + target_name + "_public" ]
mtklein9b8583d2016-08-24 17:32:30 -0700246 configs += skia_library_configs
mtklein457b42a2016-08-23 13:56:37 -0700247 }
248 } else {
mtklein457b42a2016-08-23 13:56:37 -0700249 source_set(target_name) {
250 forward_variables_from(invoker,
251 "*",
252 [
253 "public_defines",
mtklein457b42a2016-08-23 13:56:37 -0700254 "deps",
mtklein6ef69992016-09-14 06:12:09 -0700255 "libs",
mtklein457b42a2016-08-23 13:56:37 -0700256 "sources",
mtkleincd01b032016-08-31 04:58:19 -0700257 "sources_when_disabled",
mtklein457b42a2016-08-23 13:56:37 -0700258 ])
mtkleincd01b032016-08-31 04:58:19 -0700259 if (defined(invoker.sources_when_disabled)) {
260 sources = invoker.sources_when_disabled
261 }
262 configs += skia_library_configs
mtklein457b42a2016-08-23 13:56:37 -0700263 }
mtkleineb3c4252016-08-23 07:38:09 -0700264 }
mtklein457b42a2016-08-23 13:56:37 -0700265}
mtklein457b42a2016-08-23 13:56:37 -0700266
mtkleina45be612016-08-29 15:22:10 -0700267optional("fontmgr_android") {
268 enabled = fontmgr_android_enabled
mtkleina45be612016-08-29 15:22:10 -0700269
270 deps = [
271 "//third_party/expat",
272 "//third_party/freetype2",
273 ]
274 sources = [
275 "src/ports/SkFontMgr_android.cpp",
276 "src/ports/SkFontMgr_android_factory.cpp",
277 "src/ports/SkFontMgr_android_parser.cpp",
278 ]
279}
280
mtkleind2e39db2016-09-07 07:52:55 -0700281optional("fontmgr_custom") {
282 enabled = is_linux && skia_use_freetype && !skia_use_fontconfig
283
284 deps = [
285 "//third_party/freetype2",
286 ]
287 sources = [
288 "src/ports/SkFontMgr_custom.cpp",
289 "src/ports/SkFontMgr_custom_directory_factory.cpp",
290 ]
291}
292
mtklein3cc22182016-08-29 13:26:14 -0700293optional("fontmgr_fontconfig") {
294 enabled = skia_use_freetype && skia_use_fontconfig
mtklein3cc22182016-08-29 13:26:14 -0700295
296 deps = [
297 "//third_party:fontconfig",
298 "//third_party/freetype2",
299 ]
300 sources = [
bungeman1ae0e012016-09-19 12:13:16 -0700301 "src/ports/SkFontConfigInterface.cpp",
mtklein3cc22182016-08-29 13:26:14 -0700302 "src/ports/SkFontConfigInterface_direct.cpp",
303 "src/ports/SkFontConfigInterface_direct_factory.cpp",
304 "src/ports/SkFontMgr_FontConfigInterface.cpp",
305 "src/ports/SkFontMgr_fontconfig.cpp",
306 "src/ports/SkFontMgr_fontconfig_factory.cpp",
307 ]
308}
309
mtkleincdedd0e2016-09-12 15:15:44 -0700310optional("fontmgr_fuchsia") {
311 enabled = is_fuchsia && skia_use_freetype
312
313 deps = [
314 "//third_party/freetype2",
315 ]
316 sources = [
317 "src/ports/SkFontMgr_custom.cpp",
318 "src/ports/SkFontMgr_custom_empty_factory.cpp",
319 ]
320}
321
mtklein457b42a2016-08-23 13:56:37 -0700322optional("gif") {
323 enabled = skia_use_giflib
324 public_defines = [ "SK_HAS_GIF_LIBRARY" ]
325
mtklein457b42a2016-08-23 13:56:37 -0700326 deps = [
327 "//third_party/giflib",
328 ]
329 sources = [
330 "src/codec/SkGifCodec.cpp",
331 ]
332}
333
mtklein06c35c02016-09-20 12:28:12 -0700334optional("gpu") {
335 enabled = skia_enable_gpu
mtkleine9fb3d52016-09-20 15:11:46 -0700336 public_defines = []
337
mtklein06c35c02016-09-20 12:28:12 -0700338 sources = skia_gpu_sources + [ "src/gpu/gl/GrGLDefaultInterface_native.cpp" ]
339
340 # These paths need to be absolute to match the ones produced by shared_sources.gni.
341 sources -= get_path_info([
342 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
343 "src/gpu/gl/GrGLDefaultInterface_none.cpp",
344 ],
345 "abspath")
346 if (is_android) {
347 sources += [ "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp" ]
348 } else if (is_linux) {
349 sources += [ "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp" ]
350 } else if (is_mac) {
351 sources += [ "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp" ]
352 } else {
353 sources += [ "src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ]
354 }
mtkleine9fb3d52016-09-20 15:11:46 -0700355 libs = []
356
357 if (skia_use_vulkan) {
358 public_defines += [ "SK_VULKAN" ]
359 sources += skia_vk_sources
egdaniele4a9bd72016-09-21 07:36:14 -0700360 if (skia_enable_vulkan_debug_layers) {
361 public_defines += [ "SK_ENABLE_VK_LAYERS" ]
362 }
mtkleine9fb3d52016-09-20 15:11:46 -0700363 }
mtklein06c35c02016-09-20 12:28:12 -0700364}
365
mtklein63213812016-08-24 09:55:56 -0700366optional("jpeg") {
367 enabled = skia_use_libjpeg_turbo
368 public_defines = [ "SK_HAS_JPEG_LIBRARY" ]
369
mtklein63213812016-08-24 09:55:56 -0700370 deps = [
371 "//third_party/libjpeg-turbo:libjpeg",
372 ]
373 sources = [
374 "src/codec/SkJpegCodec.cpp",
375 "src/codec/SkJpegDecoderMgr.cpp",
376 "src/codec/SkJpegUtility.cpp",
377 "src/images/SkJPEGImageEncoder.cpp",
378 "src/images/SkJPEGWriteUtility.cpp",
379 ]
380}
381
382optional("pdf") {
383 enabled = skia_use_zlib
mtklein63213812016-08-24 09:55:56 -0700384
mtklein63213812016-08-24 09:55:56 -0700385 deps = [
386 "//third_party/zlib",
387 ]
brettwb9447282016-09-01 14:24:39 -0700388 sources = skia_pdf_sources
mtkleincd01b032016-08-31 04:58:19 -0700389 sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]
mtklein63213812016-08-24 09:55:56 -0700390
391 if (skia_use_sfntly) {
392 deps += [ "//third_party/sfntly" ]
mtkleincd01b032016-08-31 04:58:19 -0700393 public_defines = [ "SK_PDF_USE_SFNTLY" ]
mtklein63213812016-08-24 09:55:56 -0700394 }
395}
396
397optional("png") {
398 enabled = skia_use_libpng
399 public_defines = [ "SK_HAS_PNG_LIBRARY" ]
400
mtklein63213812016-08-24 09:55:56 -0700401 deps = [
402 "//third_party/libpng",
403 ]
404 sources = [
405 "src/codec/SkIcoCodec.cpp",
406 "src/codec/SkPngCodec.cpp",
407 "src/images/SkPNGImageEncoder.cpp",
408 ]
409}
410
mtklein3cc22182016-08-29 13:26:14 -0700411optional("typeface_freetype") {
412 enabled = skia_use_freetype
mtklein3cc22182016-08-29 13:26:14 -0700413
414 deps = [
415 "//third_party/freetype2",
416 ]
417 sources = [
418 "src/ports/SkFontHost_FreeType.cpp",
419 "src/ports/SkFontHost_FreeType_common.cpp",
420 ]
421}
422
mtklein457b42a2016-08-23 13:56:37 -0700423optional("webp") {
424 enabled = skia_use_libwebp
425 public_defines = [ "SK_HAS_WEBP_LIBRARY" ]
426
mtklein457b42a2016-08-23 13:56:37 -0700427 deps = [
428 "//third_party/libwebp",
429 ]
430 sources = [
431 "src/codec/SkWebpAdapterCodec.cpp",
432 "src/codec/SkWebpCodec.cpp",
433 "src/images/SkWEBPImageEncoder.cpp",
434 ]
mtkleineb3c4252016-08-23 07:38:09 -0700435}
436
mtklein63213812016-08-24 09:55:56 -0700437optional("xml") {
438 enabled = skia_use_expat
mtklein63213812016-08-24 09:55:56 -0700439
mtklein63213812016-08-24 09:55:56 -0700440 deps = [
441 "//third_party/expat",
442 ]
443 sources = [
444 "src/xml/SkDOM.cpp",
445 "src/xml/SkXMLParser.cpp",
446 "src/xml/SkXMLWriter.cpp",
447 ]
448}
449
mtkleinc04ff472016-06-23 10:29:30 -0700450component("skia") {
451 public_configs = [ ":skia_public" ]
452 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700453
454 deps = [
anmittalb8b3f712016-08-25 04:55:19 -0700455 ":arm64",
456 ":armv7",
mtklein9b8583d2016-08-24 17:32:30 -0700457 ":avx",
anmittalb8b3f712016-08-25 04:55:19 -0700458 ":crc32",
mtklein349cece2016-08-26 08:13:04 -0700459 ":dsp",
mtkleina45be612016-08-29 15:22:10 -0700460 ":fontmgr_android",
mtkleind2e39db2016-09-07 07:52:55 -0700461 ":fontmgr_custom",
mtklein3cc22182016-08-29 13:26:14 -0700462 ":fontmgr_fontconfig",
mtkleincdedd0e2016-09-12 15:15:44 -0700463 ":fontmgr_fuchsia",
mtklein457b42a2016-08-23 13:56:37 -0700464 ":gif",
mtklein06c35c02016-09-20 12:28:12 -0700465 ":gpu",
Mike Klein78d5a3b2016-09-30 10:48:01 -0400466 ":hsw",
mtklein63213812016-08-24 09:55:56 -0700467 ":jpeg",
mtklein9b8583d2016-08-24 17:32:30 -0700468 ":none",
mtklein63213812016-08-24 09:55:56 -0700469 ":pdf",
470 ":png",
mtklein9b8583d2016-08-24 17:32:30 -0700471 ":sse2",
472 ":sse41",
473 ":sse42",
474 ":ssse3",
mtklein3cc22182016-08-29 13:26:14 -0700475 ":typeface_freetype",
mtkleineb3c4252016-08-23 07:38:09 -0700476 ":webp",
mtklein63213812016-08-24 09:55:56 -0700477 ":xml",
mtkleinc04ff472016-06-23 10:29:30 -0700478 ]
479
mtkleinc04ff472016-06-23 10:29:30 -0700480 sources = []
brettwb9447282016-09-01 14:24:39 -0700481 sources += skia_core_sources
482 sources += skia_effects_sources
brettwb9447282016-09-01 14:24:39 -0700483 sources += skia_sksl_sources
484 sources += skia_utils_sources
mtkleinc04ff472016-06-23 10:29:30 -0700485 sources += [
mtklein25c81d42016-07-27 13:55:26 -0700486 "src/android/SkBitmapRegionCodec.cpp",
487 "src/android/SkBitmapRegionDecoder.cpp",
488 "src/codec/SkAndroidCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700489 "src/codec/SkBmpCodec.cpp",
490 "src/codec/SkBmpMaskCodec.cpp",
491 "src/codec/SkBmpRLECodec.cpp",
492 "src/codec/SkBmpStandardCodec.cpp",
493 "src/codec/SkCodec.cpp",
494 "src/codec/SkCodecImageGenerator.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700495 "src/codec/SkMaskSwizzler.cpp",
496 "src/codec/SkMasks.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700497 "src/codec/SkSampledCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700498 "src/codec/SkSampler.cpp",
499 "src/codec/SkSwizzler.cpp",
500 "src/codec/SkWbmpCodec.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700501 "src/images/SkImageEncoder.cpp",
502 "src/images/SkImageEncoder_Factory.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700503 "src/images/SkKTXImageEncoder.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700504 "src/ports/SkDiscardableMemory_none.cpp",
505 "src/ports/SkGlobalInitialization_default.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700506 "src/ports/SkImageGenerator_skia.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700507 "src/ports/SkMemory_malloc.cpp",
508 "src/ports/SkOSFile_stdio.cpp",
509 "src/sfnt/SkOTTable_name.cpp",
510 "src/sfnt/SkOTUtils.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700511 "src/svg/SkSVGCanvas.cpp",
512 "src/svg/SkSVGDevice.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700513 "src/utils/mac/SkStream_mac.cpp",
514 "third_party/etc1/etc1.cpp",
515 "third_party/ktx/ktx.cpp",
516 ]
brettwb9447282016-09-01 14:24:39 -0700517
mtklein7d6fb2c2016-08-25 14:50:44 -0700518 libs = []
519
mtkleinc04ff472016-06-23 10:29:30 -0700520 if (is_win) {
521 sources += [
522 "src/ports/SkDebug_win.cpp",
523 "src/ports/SkFontHost_win.cpp",
524 "src/ports/SkFontMgr_win_dw.cpp",
525 "src/ports/SkFontMgr_win_dw_factory.cpp",
526 "src/ports/SkImageEncoder_WIC.cpp",
527 "src/ports/SkImageGeneratorWIC.cpp",
528 "src/ports/SkOSFile_win.cpp",
mtklein605d9522016-09-21 14:01:32 -0700529 "src/ports/SkOSLibrary_win.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700530 "src/ports/SkScalerContext_win_dw.cpp",
531 "src/ports/SkTLS_win.cpp",
532 "src/ports/SkTypeface_win_dw.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700533 "src/xps/SkDocument_XPS.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700534 ]
mtkleinb9be9792016-09-16 14:44:18 -0700535 sources -=
536 [ get_path_info("src/utils/SkThreadUtils_pthread.cpp", "abspath") ]
mtkleinc04ff472016-06-23 10:29:30 -0700537 } else {
538 sources += [
mtkleinc04ff472016-06-23 10:29:30 -0700539 "src/ports/SkOSFile_posix.cpp",
mtklein605d9522016-09-21 14:01:32 -0700540 "src/ports/SkOSLibrary_posix.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700541 "src/ports/SkTLS_pthread.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700542 "src/xps/SkDocument_XPS_None.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700543 ]
544 }
545
mtklein7d6fb2c2016-08-25 14:50:44 -0700546 if (is_android) {
547 deps += [
548 "//third_party/cpu-features",
549 "//third_party/expat",
mtklein7d6fb2c2016-08-25 14:50:44 -0700550 ]
mtklein06c35c02016-09-20 12:28:12 -0700551 sources += [ "src/ports/SkDebug_android.cpp" ]
mtklein7d6fb2c2016-08-25 14:50:44 -0700552 libs += [
553 "EGL",
554 "GLESv2",
555 "log",
556 ]
557 }
558
mtkleinc04ff472016-06-23 10:29:30 -0700559 if (is_linux) {
mtklein09e61f72016-08-23 13:35:28 -0700560 libs += [
561 "GL",
562 "GLU",
563 "X11",
564 ]
mtklein06c35c02016-09-20 12:28:12 -0700565 sources += [ "src/ports/SkDebug_stdio.cpp" ]
mtkleinc04ff472016-06-23 10:29:30 -0700566 }
567
568 if (is_mac) {
569 sources += [
mtklein7d6fb2c2016-08-25 14:50:44 -0700570 "src/ports/SkDebug_stdio.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700571 "src/ports/SkFontHost_mac.cpp",
572 "src/ports/SkImageEncoder_CG.cpp",
573 "src/ports/SkImageGeneratorCG.cpp",
574 ]
mtklein09e61f72016-08-23 13:35:28 -0700575 libs += [
576 "ApplicationServices.framework",
577 "OpenGL.framework",
578 ]
mtkleinc04ff472016-06-23 10:29:30 -0700579 }
abarth6fc8ff02016-07-15 15:15:15 -0700580
581 if (is_fuchsia) {
mtklein06c35c02016-09-20 12:28:12 -0700582 sources += [ "src/ports/SkDebug_stdio.cpp" ]
abarth6fc8ff02016-07-15 15:15:15 -0700583 }
mtkleinc04ff472016-06-23 10:29:30 -0700584}
585
mtkleinada5a442016-08-02 14:28:26 -0700586skia_h_headers = exec_script("gyp/find.py",
587 [ "*.h" ] + rebase_path(skia_public_includes),
588 "list lines",
589 []) -
590 [
591 rebase_path("include/gpu/gl/GrGLConfig_chrome.h"),
592 rebase_path("include/gpu/vk/GrVkBackendContext.h"),
593 rebase_path("include/gpu/vk/GrVkDefines.h"),
594 rebase_path("include/gpu/vk/GrVkInterface.h"),
595 rebase_path("include/gpu/vk/GrVkTypes.h"),
596 rebase_path("include/ports/SkFontMgr_fontconfig.h"),
597 ]
598
mtklein1211e0c2016-07-26 13:55:45 -0700599action("skia.h") {
600 script = "gn/echo_headers.py"
601 args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] +
mtkleinc095df52016-08-24 12:23:52 -0700602 rebase_path(skia_h_headers, target_gen_dir)
Ben Wagnerbc344042016-09-29 15:41:53 -0400603 inputs = skia_h_headers
mtklein1211e0c2016-07-26 13:55:45 -0700604 outputs = [
605 "$target_gen_dir/skia.h",
606 ]
607}
608
mtklein06c35c02016-09-20 12:28:12 -0700609if (skia_enable_gpu && target_cpu == "x64") {
mtklein1fbdf982016-09-15 12:07:48 -0700610 # Our bots only have 64-bit libOSMesa installed.
611 # TODO: worth fixing?
612 executable("fiddle") {
613 include_dirs = [ "$target_gen_dir" ]
614 libs = []
615 if (is_linux) {
616 libs += [ "OSMesa" ]
617 }
mtklein56d56692016-09-15 11:18:55 -0700618
mtklein1fbdf982016-09-15 12:07:48 -0700619 sources = [
620 "src/images/SkForceLinking.cpp",
621 "tools/fiddle/draw.cpp",
622 "tools/fiddle/fiddle_main.cpp",
623 ]
624 deps = [
625 ":skia",
626 ":skia.h",
627 ]
628 }
mtkleinc04ff472016-06-23 10:29:30 -0700629}
mtklein25c81d42016-07-27 13:55:26 -0700630
mtkleinc095df52016-08-24 12:23:52 -0700631# Targets guarded by skia_enable_tools may use //third_party freely.
632if (skia_enable_tools) {
633 template("test_lib") {
634 config(target_name + "_config") {
635 include_dirs = invoker.public_include_dirs
mtkleina627b5c2016-09-20 13:36:47 -0700636 if (defined(invoker.public_defines)) {
637 defines = invoker.public_defines
638 }
mtklein25c81d42016-07-27 13:55:26 -0700639 }
mtkleinc095df52016-08-24 12:23:52 -0700640 source_set(target_name) {
641 forward_variables_from(invoker, "*", [ "public_include_dirs" ])
642 public_configs = [
643 ":" + target_name + "_config",
644 ":skia_private",
645 ]
646
647 if (!defined(deps)) {
648 deps = []
649 }
650 deps += [ ":skia" ]
651 testonly = true
652 }
mtklein25c81d42016-07-27 13:55:26 -0700653 }
mtklein25c81d42016-07-27 13:55:26 -0700654
mtkleinc095df52016-08-24 12:23:52 -0700655 test_lib("gpu_tool_utils") {
mtklein38925aa2016-09-21 10:11:25 -0700656 public_include_dirs = []
657 if (skia_enable_gpu) {
658 public_defines = []
659 public_include_dirs += [ "tools/gpu" ]
mtkleind68f9b02016-09-23 13:18:41 -0700660
661 deps = []
mtklein38925aa2016-09-21 10:11:25 -0700662 sources = [
663 "tools/gpu/GrContextFactory.cpp",
664 "tools/gpu/GrTest.cpp",
665 "tools/gpu/TestContext.cpp",
666 "tools/gpu/gl/GLTestContext.cpp",
mtklein605d9522016-09-21 14:01:32 -0700667 "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
mtklein38925aa2016-09-21 10:11:25 -0700668 "tools/gpu/gl/debug/DebugGLTestContext.cpp",
669 "tools/gpu/gl/debug/GrBufferObj.cpp",
670 "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
671 "tools/gpu/gl/debug/GrProgramObj.cpp",
672 "tools/gpu/gl/debug/GrShaderObj.cpp",
673 "tools/gpu/gl/debug/GrTextureObj.cpp",
674 "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
675 "tools/gpu/gl/null/NullGLTestContext.cpp",
676 ]
677 libs = []
mtklein25c81d42016-07-27 13:55:26 -0700678
mtklein38925aa2016-09-21 10:11:25 -0700679 if (is_android) {
680 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
681 } else if (is_linux) {
682 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
683 } else if (is_mac) {
684 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
685 }
mtklein6ef69992016-09-14 06:12:09 -0700686
mtkleind68f9b02016-09-23 13:18:41 -0700687 if (skia_use_angle) {
688 public_defines += [ "SK_ANGLE" ]
689 deps += [ "//third_party/angle2" ]
690 sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
mtklein38925aa2016-09-21 10:11:25 -0700691 }
692 if (skia_use_mesa) {
693 public_defines += [ "SK_MESA" ]
694 sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ]
695 libs += [ "OSMesa" ]
696 }
mtkleind68f9b02016-09-23 13:18:41 -0700697 if (skia_use_vulkan) {
698 sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
699 }
mtkleina627b5c2016-09-20 13:36:47 -0700700 }
mtklein25c81d42016-07-27 13:55:26 -0700701 }
mtklein25c81d42016-07-27 13:55:26 -0700702
mtkleinc095df52016-08-24 12:23:52 -0700703 test_lib("flags") {
704 public_include_dirs = [ "tools/flags" ]
705 sources = [
706 "tools/flags/SkCommandLineFlags.cpp",
mtklein046cb562016-09-16 10:23:12 -0700707 ]
708 }
709 test_lib("common_flags") {
710 public_include_dirs = [ "tools/flags" ]
711 sources = [
mtkleinc095df52016-08-24 12:23:52 -0700712 "tools/flags/SkCommonFlags.cpp",
713 "tools/flags/SkCommonFlagsConfig.cpp",
714 ]
715 deps = [
mtklein046cb562016-09-16 10:23:12 -0700716 ":flags",
mtkleinc095df52016-08-24 12:23:52 -0700717 ":gpu_tool_utils",
718 ]
719 }
mtklein25c81d42016-07-27 13:55:26 -0700720
mtkleinc095df52016-08-24 12:23:52 -0700721 test_lib("tool_utils") {
722 public_include_dirs = [
723 "tools",
724 "tools/debugger",
725 "tools/timer",
726 ]
727 sources = [
728 "src/images/SkForceLinking.cpp",
729 "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to tools?
mtkleinb37c0342016-09-09 11:07:45 -0700730 "tools/AndroidSkDebugToStdOut.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700731 "tools/CrashHandler.cpp",
mtklein0590fa52016-09-01 07:06:54 -0700732 "tools/LsanSuppressions.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700733 "tools/ProcStats.cpp",
734 "tools/Resources.cpp",
735 "tools/ThermalManager.cpp",
736 "tools/UrlDataManager.cpp",
737 "tools/debugger/SkDebugCanvas.cpp",
738 "tools/debugger/SkDrawCommand.cpp",
739 "tools/debugger/SkJsonWriteBuffer.cpp",
740 "tools/debugger/SkObjectParser.cpp",
741 "tools/debugger/SkOverdrawMode.cpp",
742 "tools/picture_utils.cpp",
743 "tools/random_parse_path.cpp",
744 "tools/sk_tool_utils.cpp",
745 "tools/sk_tool_utils_font.cpp",
746 "tools/timer/Timer.cpp",
747 ]
748 deps = [
mtklein046cb562016-09-16 10:23:12 -0700749 ":common_flags",
mtkleinc095df52016-08-24 12:23:52 -0700750 ":flags",
751 "//third_party/libpng",
752 ]
753 public_deps = [
754 "//third_party/jsoncpp",
755 ]
756 }
mtklein25c81d42016-07-27 13:55:26 -0700757
mtkleinc095df52016-08-24 12:23:52 -0700758 gm_sources = exec_script("gyp/find.py",
759 [
760 "*.c*",
761 rebase_path("gm"),
762 ],
763 "list lines",
764 [])
765 test_lib("gm") {
766 public_include_dirs = [ "gm" ]
767 sources = gm_sources
768 deps = [
769 ":gpu_tool_utils",
770 ":skia",
771 ":tool_utils",
772 ]
773 }
mtklein25c81d42016-07-27 13:55:26 -0700774
mtkleinc095df52016-08-24 12:23:52 -0700775 tests_sources = exec_script("gyp/find.py",
776 [
777 "*.c*",
778 rebase_path("tests"),
779 ],
780 "list lines",
781 [])
mtklein2f3416d2016-08-02 16:02:05 -0700782
mtkleinc095df52016-08-24 12:23:52 -0700783 test_lib("tests") {
784 public_include_dirs = [ "tests" ]
mtkleina45be612016-08-29 15:22:10 -0700785 sources = tests_sources - [
786 rebase_path("tests/PathOpsSkpClipTest.cpp"), # alternate main
mtkleina45be612016-08-29 15:22:10 -0700787 rebase_path("tests/SkpSkGrTest.cpp"), # doesn't compile
788 rebase_path("tests/skia_test.cpp"), # alternate main
789 ]
790 if (!fontmgr_android_enabled) {
791 sources -= [ rebase_path("tests/FontMgrAndroidParserTest.cpp") ]
792 }
mtkleinc095df52016-08-24 12:23:52 -0700793 deps = [
fmalita6cf896d2016-08-25 08:44:35 -0700794 ":experimental_svg_model",
mtkleinc095df52016-08-24 12:23:52 -0700795 ":flags",
796 ":gpu_tool_utils",
797 ":skia",
798 ":tool_utils",
799 "//third_party/libpng",
800 "//third_party/zlib",
801 ]
802 }
mtklein2f3416d2016-08-02 16:02:05 -0700803
mtkleinc095df52016-08-24 12:23:52 -0700804 bench_sources = exec_script("gyp/find.py",
805 [
806 "*.c*",
807 rebase_path("bench"),
808 ],
809 "list lines",
810 [])
mtklein25c81d42016-07-27 13:55:26 -0700811
mtkleinc095df52016-08-24 12:23:52 -0700812 test_lib("bench") {
813 public_include_dirs = [ "bench" ]
814 sources = bench_sources
815 sources -= [
816 rebase_path("bench/nanobench.cpp"),
817 rebase_path("bench/nanobenchAndroid.cpp"),
818 ]
819 deps = [
820 ":flags",
821 ":gm",
822 ":gpu_tool_utils",
823 ":skia",
824 ":tool_utils",
825 ]
826 }
mtklein2b6870c2016-07-28 14:17:33 -0700827
mtkleinc095df52016-08-24 12:23:52 -0700828 test_lib("experimental_svg_model") {
829 public_include_dirs = [ "experimental/svg/model" ]
830 sources = [
831 "experimental/svg/model/SkSVGAttribute.cpp",
832 "experimental/svg/model/SkSVGAttributeParser.cpp",
833 "experimental/svg/model/SkSVGCircle.cpp",
834 "experimental/svg/model/SkSVGContainer.cpp",
835 "experimental/svg/model/SkSVGDOM.cpp",
836 "experimental/svg/model/SkSVGEllipse.cpp",
837 "experimental/svg/model/SkSVGLine.cpp",
fmalita28d5b722016-09-12 17:06:47 -0700838 "experimental/svg/model/SkSVGLinearGradient.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700839 "experimental/svg/model/SkSVGNode.cpp",
840 "experimental/svg/model/SkSVGPath.cpp",
841 "experimental/svg/model/SkSVGPoly.cpp",
842 "experimental/svg/model/SkSVGRect.cpp",
843 "experimental/svg/model/SkSVGRenderContext.cpp",
844 "experimental/svg/model/SkSVGSVG.cpp",
845 "experimental/svg/model/SkSVGShape.cpp",
fmalita28d5b722016-09-12 17:06:47 -0700846 "experimental/svg/model/SkSVGStop.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700847 "experimental/svg/model/SkSVGTransformableNode.cpp",
848 "experimental/svg/model/SkSVGValue.cpp",
849 ]
850 deps = [
851 ":skia",
852 ]
853 }
fmalitaa2b9fdf2016-08-03 19:53:36 -0700854
mtklein2b6870c2016-07-28 14:17:33 -0700855 executable("dm") {
856 sources = [
857 "dm/DM.cpp",
858 "dm/DMJsonWriter.cpp",
859 "dm/DMSrcSink.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700860 ]
861 include_dirs = [ "tests" ]
862 deps = [
mtklein046cb562016-09-16 10:23:12 -0700863 ":common_flags",
fmalitaa2b9fdf2016-08-03 19:53:36 -0700864 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700865 ":flags",
866 ":gm",
867 ":gpu_tool_utils",
868 ":skia",
mtklein2f3416d2016-08-02 16:02:05 -0700869 ":tests",
mtklein2b6870c2016-07-28 14:17:33 -0700870 ":tool_utils",
871 "//third_party/jsoncpp",
872 "//third_party/libpng",
873 ]
874 testonly = true
875 }
876
Mike Kleina3430172016-09-27 16:46:29 -0400877 if (!is_debug) { # I've benchmarked debug code once too many times...
878 executable("monobench") {
879 sources = [
880 "tools/monobench.cpp",
881 ]
882 deps = [
883 ":bench",
884 ":skia",
885 ]
886 testonly = true
887 }
mtklein2b6870c2016-07-28 14:17:33 -0700888 }
889
890 executable("nanobench") {
891 sources = [
892 "bench/nanobench.cpp",
893 ]
894 deps = [
895 ":bench",
mtklein046cb562016-09-16 10:23:12 -0700896 ":common_flags",
fmalita6519c212016-09-14 08:05:17 -0700897 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700898 ":flags",
899 ":gm",
900 ":gpu_tool_utils",
901 ":skia",
902 ":tool_utils",
903 "//third_party/jsoncpp",
904 ]
905 testonly = true
906 }
halcanary19a97202016-08-03 15:08:04 -0700907
mtklein38925aa2016-09-21 10:11:25 -0700908 if (skia_enable_gpu) {
909 executable("skpbench") {
910 sources = [
911 "tools/skpbench/skpbench.cpp",
912 ]
913 deps = [
914 ":flags",
915 ":gpu_tool_utils",
916 ":skia",
917 ":tool_utils",
918 ]
919 testonly = true
920 }
csmartdalton4b5179b2016-09-19 11:03:58 -0700921 }
922
mtklein6f5df6a2016-08-29 16:01:10 -0700923 if (current_cpu != "mipsel") { # Clang 3.8 crashes while compiling hb-icu.cc for mipsel.
halcanary3eee9d92016-09-10 07:01:53 -0700924 executable("sktexttopdf-hb") {
mtklein6f5df6a2016-08-29 16:01:10 -0700925 sources = [
926 "tools/SkShaper_harfbuzz.cpp",
927 "tools/using_skia_and_harfbuzz.cpp",
928 ]
929 deps = [
930 ":skia",
931 "//third_party/harfbuzz",
932 ]
933 testonly = true
934 }
halcanary19a97202016-08-03 15:08:04 -0700935 }
halcanary3eee9d92016-09-10 07:01:53 -0700936 executable("sktexttopdf") {
937 sources = [
938 "tools/SkShaper_primitive.cpp",
939 "tools/using_skia_and_harfbuzz.cpp",
940 ]
941 deps = [
942 ":skia",
943 ]
944 testonly = true
945 }
mtklein046cb562016-09-16 10:23:12 -0700946
947 executable("get_images_from_skps") {
948 sources = [
949 "tools/get_images_from_skps.cpp",
950 ]
951 deps = [
952 ":flags",
953 ":skia",
954 "//third_party/jsoncpp",
955 ]
956 testonly = true
957 }
mtkleinecbc5262016-09-22 11:51:24 -0700958
959 executable("skiaserve") {
960 sources = [
961 "tools/skiaserve/Request.cpp",
962 "tools/skiaserve/Response.cpp",
963 "tools/skiaserve/skiaserve.cpp",
964 "tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp",
965 "tools/skiaserve/urlhandlers/BatchesHandler.cpp",
966 "tools/skiaserve/urlhandlers/BreakHandler.cpp",
967 "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp",
968 "tools/skiaserve/urlhandlers/CmdHandler.cpp",
969 "tools/skiaserve/urlhandlers/ColorModeHandler.cpp",
970 "tools/skiaserve/urlhandlers/DataHandler.cpp",
971 "tools/skiaserve/urlhandlers/DownloadHandler.cpp",
972 "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp",
973 "tools/skiaserve/urlhandlers/ImgHandler.cpp",
974 "tools/skiaserve/urlhandlers/InfoHandler.cpp",
975 "tools/skiaserve/urlhandlers/PostHandler.cpp",
976 "tools/skiaserve/urlhandlers/QuitHandler.cpp",
977 "tools/skiaserve/urlhandlers/RootHandler.cpp",
978 ]
979 deps = [
980 ":flags",
981 ":gpu_tool_utils",
982 ":skia",
983 ":tool_utils",
984 "//third_party/jsoncpp",
985 "//third_party/libmicrohttpd",
986 "//third_party/libpng",
987 ]
988 testonly = true
989 }
kjlubick14f984b2016-10-03 11:49:45 -0700990
991 executable("fuzz") {
992 sources = [
993 "fuzz/FilterFuzz.cpp",
994 "fuzz/FuzzGradients.cpp",
995 "fuzz/FuzzParsePath.cpp",
996 "fuzz/FuzzPathop.cpp",
997 "fuzz/FuzzScaleToSides.cpp",
998 "fuzz/fuzz.cpp",
999 ]
1000 deps = [
1001 ":flags",
1002 ":skia",
1003 ]
1004 testonly = true
1005 }
mtklein25c81d42016-07-27 13:55:26 -07001006}