blob: 3f88df5d279f4c6473054c6007bde952c14513f6 [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
Mike Kleinae7e6712016-10-11 17:49:33 -040022 skia_use_sfntly = !is_fuchsia && !is_win # TODO: icu on Windows, re-enable this.
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
Mike Kleinae7e6712016-10-11 17:49:33 -040061 defines = []
62 if (is_component_build) {
63 defines += [ "SKIA_DLL" ]
64 }
Mike Kleinc4cbd742016-09-26 21:37:09 -040065 if (is_fuchsia || is_linux) {
jcgregorio5561e3d2016-08-25 09:25:11 -070066 defines += [ "SK_SAMPLES_FOR_X" ]
67 }
mtkleincae1be52016-09-20 08:24:34 -070068 if (skia_enable_android_framework_defines) {
69 defines += skia_android_framework_defines
70 }
mtklein06c35c02016-09-20 12:28:12 -070071 if (!skia_enable_gpu) {
72 defines += [ "SK_SUPPORT_GPU=0" ]
73 }
mtkleinc04ff472016-06-23 10:29:30 -070074}
75
76# Skia internal APIs, used by Skia itself and a few test tools.
77config("skia_private") {
78 visibility = [ ":*" ]
79
80 include_dirs = [
81 "include/private",
82 "src/c",
mtklein1211e0c2016-07-26 13:55:45 -070083 "src/codec",
mtkleinc04ff472016-06-23 10:29:30 -070084 "src/config",
85 "src/core",
86 "src/effects",
mtklein25c81d42016-07-27 13:55:26 -070087 "src/effects/gradients",
88 "src/fonts",
mtkleinc04ff472016-06-23 10:29:30 -070089 "src/gpu",
90 "src/image",
91 "src/images",
92 "src/lazy",
93 "src/opts",
94 "src/pathops",
mtklein2b6870c2016-07-28 14:17:33 -070095 "src/pdf",
mtkleinc04ff472016-06-23 10:29:30 -070096 "src/ports",
97 "src/sfnt",
mtklein9e0d9dd2016-08-30 10:37:19 -070098 "src/sksl",
mtkleinc04ff472016-06-23 10:29:30 -070099 "src/utils",
mtklein7a1f45f2016-08-04 06:19:33 -0700100 "src/utils/win",
mtkleinc04ff472016-06-23 10:29:30 -0700101 "third_party/etc1",
102 "third_party/ktx",
103 ]
mtklein150d1132016-08-01 06:56:40 -0700104
mtklein63213812016-08-24 09:55:56 -0700105 defines = [ "SK_GAMMA_APPLY_TO_A8" ]
mtkleinb37c0342016-09-09 11:07:45 -0700106 if (is_android) {
107 defines += [
108 "SK_GAMMA_EXPONENT=1.4",
109 "SK_GAMMA_CONTRAST=0.0",
110 ]
111 }
mtklein88a7ac02016-09-14 11:16:49 -0700112 if (is_official_build || is_android) {
113 # TODO(bsalomon): it'd be nice to make Android normal.
114 defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
115 }
Brian Salomon789e25e2016-09-30 13:41:03 -0400116 libs = []
117 lib_dirs = []
118 if (skia_use_vulkan) {
119 if (skia_vulkan_sdk != "") {
120 include_dirs += [ "$skia_vulkan_sdk/x86_64/include/" ]
121 lib_dirs += [ "$skia_vulkan_sdk/x86_64/lib/" ]
122 }
123 libs += [ "vulkan" ]
124 }
mtkleinc04ff472016-06-23 10:29:30 -0700125}
126
127# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
128config("skia_library") {
129 visibility = [ ":*" ]
mtkleinc04ff472016-06-23 10:29:30 -0700130 defines = [ "SKIA_IMPLEMENTATION=1" ]
131}
132
133skia_library_configs = [
134 ":skia_public",
135 ":skia_private",
136 ":skia_library",
137]
138
mtklein9b8583d2016-08-24 17:32:30 -0700139# Use for CPU-specific Skia code that needs particular compiler flags.
140template("opts") {
141 if (invoker.enabled) {
142 source_set(target_name) {
143 forward_variables_from(invoker, "*")
144 configs += skia_library_configs
145 }
146 } else {
147 # If not enabled, a phony empty target that swallows all otherwise unused variables.
148 source_set(target_name) {
149 forward_variables_from(invoker,
150 "*",
151 [
152 "sources",
153 "cflags",
154 ])
155 }
156 }
anmittala7eaf2e2016-08-17 13:57:26 -0700157}
158
mtklein422310d2016-08-16 18:28:43 -0700159is_x86 = current_cpu == "x64" || current_cpu == "x86"
mtkleinc04ff472016-06-23 10:29:30 -0700160
mtklein7d6fb2c2016-08-25 14:50:44 -0700161opts("none") {
162 enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64"
brettwb9447282016-09-01 14:24:39 -0700163 sources = skia_opts.none_sources
anmittalb8b3f712016-08-25 04:55:19 -0700164 cflags = []
165}
166
mtklein7d6fb2c2016-08-25 14:50:44 -0700167opts("armv7") {
anmittalb8b3f712016-08-25 04:55:19 -0700168 enabled = current_cpu == "arm"
brettwb9447282016-09-01 14:24:39 -0700169 sources = skia_opts.armv7_sources + skia_opts.neon_sources
mtklein7d6fb2c2016-08-25 14:50:44 -0700170 cflags = []
anmittalb8b3f712016-08-25 04:55:19 -0700171}
172
173opts("arm64") {
174 enabled = current_cpu == "arm64"
brettwb9447282016-09-01 14:24:39 -0700175 sources = skia_opts.arm64_sources
anmittalb8b3f712016-08-25 04:55:19 -0700176 cflags = []
177}
178
179opts("crc32") {
180 enabled = current_cpu == "arm64"
brettwb9447282016-09-01 14:24:39 -0700181 sources = skia_opts.crc32_sources
anmittalb8b3f712016-08-25 04:55:19 -0700182 cflags = [ "-march=armv8-a+crc" ]
183}
184
mtklein9b8583d2016-08-24 17:32:30 -0700185opts("sse2") {
186 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700187 sources = skia_opts.sse2_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400188 if (!is_win) {
189 cflags = [ "-msse2" ]
190 }
mtklein9b8583d2016-08-24 17:32:30 -0700191}
mtkleinc04ff472016-06-23 10:29:30 -0700192
mtklein9b8583d2016-08-24 17:32:30 -0700193opts("ssse3") {
194 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700195 sources = skia_opts.ssse3_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400196 if (!is_win) {
197 cflags = [ "-mssse3" ]
198 }
mtklein9b8583d2016-08-24 17:32:30 -0700199}
mtkleinc04ff472016-06-23 10:29:30 -0700200
mtklein9b8583d2016-08-24 17:32:30 -0700201opts("sse41") {
202 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700203 sources = skia_opts.sse41_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400204 if (!is_win) {
205 cflags = [ "-msse4.1" ]
206 }
mtklein9b8583d2016-08-24 17:32:30 -0700207}
mtklein4e976072016-08-08 09:06:27 -0700208
mtklein9b8583d2016-08-24 17:32:30 -0700209opts("sse42") {
210 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700211 sources = skia_opts.sse42_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400212 if (!is_win) {
213 cflags = [ "-msse4.2" ]
214 }
mtklein9b8583d2016-08-24 17:32:30 -0700215}
216
217opts("avx") {
218 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700219 sources = skia_opts.avx_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400220 if (is_win) {
221 cflags = [ "/arch:AVX" ]
222 } else {
223 cflags = [ "-mavx" ]
224 }
mtkleinc04ff472016-06-23 10:29:30 -0700225}
226
Mike Klein78d5a3b2016-09-30 10:48:01 -0400227opts("hsw") {
228 enabled = is_x86
229 sources = skia_opts.hsw_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400230 if (is_win) {
231 cflags = [ "/arch:AVX2" ]
232 } else {
233 cflags = [
234 "-mavx2",
235 "-mbmi",
236 "-mbmi2",
237 "-mf16c",
238 "-mfma",
239 ]
240 }
Mike Klein78d5a3b2016-09-30 10:48:01 -0400241}
242
mtklein349cece2016-08-26 08:13:04 -0700243opts("dsp") {
244 enabled = current_cpu == "mipsel"
brettwb9447282016-09-01 14:24:39 -0700245 sources = skia_opts.mips_dsp_sources
mtkleinb6064ef2016-08-30 11:49:24 -0700246 cflags = []
mtklein349cece2016-08-26 08:13:04 -0700247}
248
mtkleinc095df52016-08-24 12:23:52 -0700249# Any feature of Skia that requires third-party code should be optional and use this template.
mtklein457b42a2016-08-23 13:56:37 -0700250template("optional") {
251 if (invoker.enabled) {
252 config(target_name + "_public") {
mtkleincd01b032016-08-31 04:58:19 -0700253 if (defined(invoker.public_defines)) {
254 defines = invoker.public_defines
255 }
mtklein457b42a2016-08-23 13:56:37 -0700256 }
257 source_set(target_name) {
mtkleincd01b032016-08-31 04:58:19 -0700258 forward_variables_from(invoker,
259 "*",
260 [
261 "public_defines",
262 "sources_when_disabled",
263 ])
mtklein457b42a2016-08-23 13:56:37 -0700264 all_dependent_configs = [ ":" + target_name + "_public" ]
mtklein9b8583d2016-08-24 17:32:30 -0700265 configs += skia_library_configs
mtklein457b42a2016-08-23 13:56:37 -0700266 }
267 } else {
mtklein457b42a2016-08-23 13:56:37 -0700268 source_set(target_name) {
269 forward_variables_from(invoker,
270 "*",
271 [
272 "public_defines",
mtklein457b42a2016-08-23 13:56:37 -0700273 "deps",
mtklein6ef69992016-09-14 06:12:09 -0700274 "libs",
mtklein457b42a2016-08-23 13:56:37 -0700275 "sources",
mtkleincd01b032016-08-31 04:58:19 -0700276 "sources_when_disabled",
mtklein457b42a2016-08-23 13:56:37 -0700277 ])
mtkleincd01b032016-08-31 04:58:19 -0700278 if (defined(invoker.sources_when_disabled)) {
279 sources = invoker.sources_when_disabled
280 }
281 configs += skia_library_configs
mtklein457b42a2016-08-23 13:56:37 -0700282 }
mtkleineb3c4252016-08-23 07:38:09 -0700283 }
mtklein457b42a2016-08-23 13:56:37 -0700284}
mtklein457b42a2016-08-23 13:56:37 -0700285
mtkleina45be612016-08-29 15:22:10 -0700286optional("fontmgr_android") {
287 enabled = fontmgr_android_enabled
mtkleina45be612016-08-29 15:22:10 -0700288
289 deps = [
290 "//third_party/expat",
291 "//third_party/freetype2",
292 ]
293 sources = [
294 "src/ports/SkFontMgr_android.cpp",
295 "src/ports/SkFontMgr_android_factory.cpp",
296 "src/ports/SkFontMgr_android_parser.cpp",
297 ]
298}
299
mtkleind2e39db2016-09-07 07:52:55 -0700300optional("fontmgr_custom") {
301 enabled = is_linux && skia_use_freetype && !skia_use_fontconfig
302
303 deps = [
304 "//third_party/freetype2",
305 ]
306 sources = [
307 "src/ports/SkFontMgr_custom.cpp",
308 "src/ports/SkFontMgr_custom_directory_factory.cpp",
309 ]
310}
311
mtklein3cc22182016-08-29 13:26:14 -0700312optional("fontmgr_fontconfig") {
313 enabled = skia_use_freetype && skia_use_fontconfig
mtklein3cc22182016-08-29 13:26:14 -0700314
315 deps = [
316 "//third_party:fontconfig",
317 "//third_party/freetype2",
318 ]
319 sources = [
bungeman1ae0e012016-09-19 12:13:16 -0700320 "src/ports/SkFontConfigInterface.cpp",
mtklein3cc22182016-08-29 13:26:14 -0700321 "src/ports/SkFontConfigInterface_direct.cpp",
322 "src/ports/SkFontConfigInterface_direct_factory.cpp",
323 "src/ports/SkFontMgr_FontConfigInterface.cpp",
324 "src/ports/SkFontMgr_fontconfig.cpp",
325 "src/ports/SkFontMgr_fontconfig_factory.cpp",
326 ]
327}
328
mtkleincdedd0e2016-09-12 15:15:44 -0700329optional("fontmgr_fuchsia") {
330 enabled = is_fuchsia && skia_use_freetype
331
332 deps = [
333 "//third_party/freetype2",
334 ]
335 sources = [
336 "src/ports/SkFontMgr_custom.cpp",
337 "src/ports/SkFontMgr_custom_empty_factory.cpp",
338 ]
339}
340
mtklein457b42a2016-08-23 13:56:37 -0700341optional("gif") {
342 enabled = skia_use_giflib
343 public_defines = [ "SK_HAS_GIF_LIBRARY" ]
344
mtklein457b42a2016-08-23 13:56:37 -0700345 deps = [
346 "//third_party/giflib",
347 ]
348 sources = [
349 "src/codec/SkGifCodec.cpp",
350 ]
351}
352
mtklein06c35c02016-09-20 12:28:12 -0700353optional("gpu") {
354 enabled = skia_enable_gpu
mtkleine9fb3d52016-09-20 15:11:46 -0700355 public_defines = []
356
mtklein06c35c02016-09-20 12:28:12 -0700357 sources = skia_gpu_sources + [ "src/gpu/gl/GrGLDefaultInterface_native.cpp" ]
358
359 # These paths need to be absolute to match the ones produced by shared_sources.gni.
360 sources -= get_path_info([
361 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
362 "src/gpu/gl/GrGLDefaultInterface_none.cpp",
363 ],
364 "abspath")
365 if (is_android) {
366 sources += [ "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp" ]
367 } else if (is_linux) {
368 sources += [ "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp" ]
369 } else if (is_mac) {
370 sources += [ "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp" ]
371 } else {
372 sources += [ "src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ]
373 }
mtkleine9fb3d52016-09-20 15:11:46 -0700374 libs = []
375
376 if (skia_use_vulkan) {
377 public_defines += [ "SK_VULKAN" ]
378 sources += skia_vk_sources
egdaniele4a9bd72016-09-21 07:36:14 -0700379 if (skia_enable_vulkan_debug_layers) {
380 public_defines += [ "SK_ENABLE_VK_LAYERS" ]
381 }
mtkleine9fb3d52016-09-20 15:11:46 -0700382 }
mtklein06c35c02016-09-20 12:28:12 -0700383}
384
mtklein63213812016-08-24 09:55:56 -0700385optional("jpeg") {
386 enabled = skia_use_libjpeg_turbo
387 public_defines = [ "SK_HAS_JPEG_LIBRARY" ]
388
mtklein63213812016-08-24 09:55:56 -0700389 deps = [
390 "//third_party/libjpeg-turbo:libjpeg",
391 ]
392 sources = [
393 "src/codec/SkJpegCodec.cpp",
394 "src/codec/SkJpegDecoderMgr.cpp",
395 "src/codec/SkJpegUtility.cpp",
396 "src/images/SkJPEGImageEncoder.cpp",
397 "src/images/SkJPEGWriteUtility.cpp",
398 ]
399}
400
401optional("pdf") {
402 enabled = skia_use_zlib
mtklein63213812016-08-24 09:55:56 -0700403
mtklein63213812016-08-24 09:55:56 -0700404 deps = [
405 "//third_party/zlib",
406 ]
brettwb9447282016-09-01 14:24:39 -0700407 sources = skia_pdf_sources
mtkleincd01b032016-08-31 04:58:19 -0700408 sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]
mtklein63213812016-08-24 09:55:56 -0700409
410 if (skia_use_sfntly) {
411 deps += [ "//third_party/sfntly" ]
mtkleincd01b032016-08-31 04:58:19 -0700412 public_defines = [ "SK_PDF_USE_SFNTLY" ]
mtklein63213812016-08-24 09:55:56 -0700413 }
414}
415
416optional("png") {
417 enabled = skia_use_libpng
418 public_defines = [ "SK_HAS_PNG_LIBRARY" ]
419
mtklein63213812016-08-24 09:55:56 -0700420 deps = [
421 "//third_party/libpng",
422 ]
423 sources = [
424 "src/codec/SkIcoCodec.cpp",
425 "src/codec/SkPngCodec.cpp",
426 "src/images/SkPNGImageEncoder.cpp",
427 ]
428}
429
mtklein3cc22182016-08-29 13:26:14 -0700430optional("typeface_freetype") {
431 enabled = skia_use_freetype
mtklein3cc22182016-08-29 13:26:14 -0700432
433 deps = [
434 "//third_party/freetype2",
435 ]
436 sources = [
437 "src/ports/SkFontHost_FreeType.cpp",
438 "src/ports/SkFontHost_FreeType_common.cpp",
439 ]
440}
441
mtklein457b42a2016-08-23 13:56:37 -0700442optional("webp") {
443 enabled = skia_use_libwebp
444 public_defines = [ "SK_HAS_WEBP_LIBRARY" ]
445
mtklein457b42a2016-08-23 13:56:37 -0700446 deps = [
447 "//third_party/libwebp",
448 ]
449 sources = [
450 "src/codec/SkWebpAdapterCodec.cpp",
451 "src/codec/SkWebpCodec.cpp",
452 "src/images/SkWEBPImageEncoder.cpp",
453 ]
mtkleineb3c4252016-08-23 07:38:09 -0700454}
455
mtklein63213812016-08-24 09:55:56 -0700456optional("xml") {
457 enabled = skia_use_expat
mtklein63213812016-08-24 09:55:56 -0700458
mtklein63213812016-08-24 09:55:56 -0700459 deps = [
460 "//third_party/expat",
461 ]
462 sources = [
463 "src/xml/SkDOM.cpp",
464 "src/xml/SkXMLParser.cpp",
465 "src/xml/SkXMLWriter.cpp",
466 ]
467}
468
mtkleinc04ff472016-06-23 10:29:30 -0700469component("skia") {
470 public_configs = [ ":skia_public" ]
471 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700472
473 deps = [
anmittalb8b3f712016-08-25 04:55:19 -0700474 ":arm64",
475 ":armv7",
mtklein9b8583d2016-08-24 17:32:30 -0700476 ":avx",
anmittalb8b3f712016-08-25 04:55:19 -0700477 ":crc32",
mtklein349cece2016-08-26 08:13:04 -0700478 ":dsp",
mtkleina45be612016-08-29 15:22:10 -0700479 ":fontmgr_android",
mtkleind2e39db2016-09-07 07:52:55 -0700480 ":fontmgr_custom",
mtklein3cc22182016-08-29 13:26:14 -0700481 ":fontmgr_fontconfig",
mtkleincdedd0e2016-09-12 15:15:44 -0700482 ":fontmgr_fuchsia",
mtklein457b42a2016-08-23 13:56:37 -0700483 ":gif",
mtklein06c35c02016-09-20 12:28:12 -0700484 ":gpu",
Mike Klein78d5a3b2016-09-30 10:48:01 -0400485 ":hsw",
mtklein63213812016-08-24 09:55:56 -0700486 ":jpeg",
mtklein9b8583d2016-08-24 17:32:30 -0700487 ":none",
mtklein63213812016-08-24 09:55:56 -0700488 ":pdf",
489 ":png",
mtklein9b8583d2016-08-24 17:32:30 -0700490 ":sse2",
491 ":sse41",
492 ":sse42",
493 ":ssse3",
mtklein3cc22182016-08-29 13:26:14 -0700494 ":typeface_freetype",
mtkleineb3c4252016-08-23 07:38:09 -0700495 ":webp",
mtklein63213812016-08-24 09:55:56 -0700496 ":xml",
mtkleinc04ff472016-06-23 10:29:30 -0700497 ]
498
mtkleinc04ff472016-06-23 10:29:30 -0700499 sources = []
brettwb9447282016-09-01 14:24:39 -0700500 sources += skia_core_sources
501 sources += skia_effects_sources
brettwb9447282016-09-01 14:24:39 -0700502 sources += skia_sksl_sources
503 sources += skia_utils_sources
mtkleinc04ff472016-06-23 10:29:30 -0700504 sources += [
mtklein25c81d42016-07-27 13:55:26 -0700505 "src/android/SkBitmapRegionCodec.cpp",
506 "src/android/SkBitmapRegionDecoder.cpp",
507 "src/codec/SkAndroidCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700508 "src/codec/SkBmpCodec.cpp",
509 "src/codec/SkBmpMaskCodec.cpp",
510 "src/codec/SkBmpRLECodec.cpp",
511 "src/codec/SkBmpStandardCodec.cpp",
512 "src/codec/SkCodec.cpp",
513 "src/codec/SkCodecImageGenerator.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700514 "src/codec/SkMaskSwizzler.cpp",
515 "src/codec/SkMasks.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700516 "src/codec/SkSampledCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700517 "src/codec/SkSampler.cpp",
518 "src/codec/SkSwizzler.cpp",
519 "src/codec/SkWbmpCodec.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700520 "src/images/SkImageEncoder.cpp",
521 "src/images/SkImageEncoder_Factory.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700522 "src/images/SkKTXImageEncoder.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700523 "src/ports/SkDiscardableMemory_none.cpp",
524 "src/ports/SkGlobalInitialization_default.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700525 "src/ports/SkImageGenerator_skia.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700526 "src/ports/SkMemory_malloc.cpp",
527 "src/ports/SkOSFile_stdio.cpp",
528 "src/sfnt/SkOTTable_name.cpp",
529 "src/sfnt/SkOTUtils.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700530 "src/svg/SkSVGCanvas.cpp",
531 "src/svg/SkSVGDevice.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700532 "src/utils/mac/SkStream_mac.cpp",
533 "third_party/etc1/etc1.cpp",
534 "third_party/ktx/ktx.cpp",
535 ]
brettwb9447282016-09-01 14:24:39 -0700536
mtklein7d6fb2c2016-08-25 14:50:44 -0700537 libs = []
538
mtkleinc04ff472016-06-23 10:29:30 -0700539 if (is_win) {
540 sources += [
Mike Kleinae7e6712016-10-11 17:49:33 -0400541 "src/fonts/SkFontMgr_indirect.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700542 "src/ports/SkDebug_win.cpp",
543 "src/ports/SkFontHost_win.cpp",
544 "src/ports/SkFontMgr_win_dw.cpp",
545 "src/ports/SkFontMgr_win_dw_factory.cpp",
546 "src/ports/SkImageEncoder_WIC.cpp",
547 "src/ports/SkImageGeneratorWIC.cpp",
548 "src/ports/SkOSFile_win.cpp",
mtklein605d9522016-09-21 14:01:32 -0700549 "src/ports/SkOSLibrary_win.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700550 "src/ports/SkScalerContext_win_dw.cpp",
551 "src/ports/SkTLS_win.cpp",
552 "src/ports/SkTypeface_win_dw.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700553 "src/xps/SkDocument_XPS.cpp",
Mike Klein4b167fc2016-10-11 18:13:53 -0400554 "src/xps/SkXPSDevice.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700555 ]
mtkleinb9be9792016-09-16 14:44:18 -0700556 sources -=
557 [ get_path_info("src/utils/SkThreadUtils_pthread.cpp", "abspath") ]
Mike Klein4b167fc2016-10-11 18:13:53 -0400558 libs += [
559 "FontSub.lib",
560 "Ole32.lib",
561 "OleAut32.lib",
562 "User32.lib",
563 ]
mtkleinc04ff472016-06-23 10:29:30 -0700564 } else {
565 sources += [
mtkleinc04ff472016-06-23 10:29:30 -0700566 "src/ports/SkOSFile_posix.cpp",
mtklein605d9522016-09-21 14:01:32 -0700567 "src/ports/SkOSLibrary_posix.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700568 "src/ports/SkTLS_pthread.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700569 "src/xps/SkDocument_XPS_None.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700570 ]
571 }
572
mtklein7d6fb2c2016-08-25 14:50:44 -0700573 if (is_android) {
574 deps += [
575 "//third_party/cpu-features",
576 "//third_party/expat",
mtklein7d6fb2c2016-08-25 14:50:44 -0700577 ]
mtklein06c35c02016-09-20 12:28:12 -0700578 sources += [ "src/ports/SkDebug_android.cpp" ]
mtklein7d6fb2c2016-08-25 14:50:44 -0700579 libs += [
580 "EGL",
581 "GLESv2",
582 "log",
583 ]
584 }
585
mtkleinc04ff472016-06-23 10:29:30 -0700586 if (is_linux) {
mtklein09e61f72016-08-23 13:35:28 -0700587 libs += [
588 "GL",
589 "GLU",
590 "X11",
591 ]
mtklein06c35c02016-09-20 12:28:12 -0700592 sources += [ "src/ports/SkDebug_stdio.cpp" ]
mtkleinc04ff472016-06-23 10:29:30 -0700593 }
594
595 if (is_mac) {
596 sources += [
mtklein7d6fb2c2016-08-25 14:50:44 -0700597 "src/ports/SkDebug_stdio.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700598 "src/ports/SkFontHost_mac.cpp",
599 "src/ports/SkImageEncoder_CG.cpp",
600 "src/ports/SkImageGeneratorCG.cpp",
601 ]
mtklein09e61f72016-08-23 13:35:28 -0700602 libs += [
603 "ApplicationServices.framework",
604 "OpenGL.framework",
605 ]
mtkleinc04ff472016-06-23 10:29:30 -0700606 }
abarth6fc8ff02016-07-15 15:15:15 -0700607
608 if (is_fuchsia) {
mtklein06c35c02016-09-20 12:28:12 -0700609 sources += [ "src/ports/SkDebug_stdio.cpp" ]
abarth6fc8ff02016-07-15 15:15:15 -0700610 }
mtkleinc04ff472016-06-23 10:29:30 -0700611}
612
mtkleinada5a442016-08-02 14:28:26 -0700613skia_h_headers = exec_script("gyp/find.py",
614 [ "*.h" ] + rebase_path(skia_public_includes),
615 "list lines",
616 []) -
617 [
618 rebase_path("include/gpu/gl/GrGLConfig_chrome.h"),
619 rebase_path("include/gpu/vk/GrVkBackendContext.h"),
620 rebase_path("include/gpu/vk/GrVkDefines.h"),
621 rebase_path("include/gpu/vk/GrVkInterface.h"),
622 rebase_path("include/gpu/vk/GrVkTypes.h"),
623 rebase_path("include/ports/SkFontMgr_fontconfig.h"),
624 ]
625
mtklein1211e0c2016-07-26 13:55:45 -0700626action("skia.h") {
627 script = "gn/echo_headers.py"
628 args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] +
mtkleinc095df52016-08-24 12:23:52 -0700629 rebase_path(skia_h_headers, target_gen_dir)
Ben Wagnerbc344042016-09-29 15:41:53 -0400630 inputs = skia_h_headers
mtklein1211e0c2016-07-26 13:55:45 -0700631 outputs = [
632 "$target_gen_dir/skia.h",
633 ]
634}
635
mtklein06c35c02016-09-20 12:28:12 -0700636if (skia_enable_gpu && target_cpu == "x64") {
mtklein1fbdf982016-09-15 12:07:48 -0700637 # Our bots only have 64-bit libOSMesa installed.
638 # TODO: worth fixing?
639 executable("fiddle") {
640 include_dirs = [ "$target_gen_dir" ]
641 libs = []
642 if (is_linux) {
643 libs += [ "OSMesa" ]
644 }
mtklein56d56692016-09-15 11:18:55 -0700645
mtklein1fbdf982016-09-15 12:07:48 -0700646 sources = [
647 "src/images/SkForceLinking.cpp",
648 "tools/fiddle/draw.cpp",
649 "tools/fiddle/fiddle_main.cpp",
650 ]
651 deps = [
652 ":skia",
653 ":skia.h",
654 ]
655 }
mtkleinc04ff472016-06-23 10:29:30 -0700656}
mtklein25c81d42016-07-27 13:55:26 -0700657
mtkleinc095df52016-08-24 12:23:52 -0700658# Targets guarded by skia_enable_tools may use //third_party freely.
659if (skia_enable_tools) {
660 template("test_lib") {
661 config(target_name + "_config") {
662 include_dirs = invoker.public_include_dirs
mtkleina627b5c2016-09-20 13:36:47 -0700663 if (defined(invoker.public_defines)) {
664 defines = invoker.public_defines
665 }
mtklein25c81d42016-07-27 13:55:26 -0700666 }
mtkleinc095df52016-08-24 12:23:52 -0700667 source_set(target_name) {
668 forward_variables_from(invoker, "*", [ "public_include_dirs" ])
669 public_configs = [
670 ":" + target_name + "_config",
671 ":skia_private",
672 ]
673
674 if (!defined(deps)) {
675 deps = []
676 }
677 deps += [ ":skia" ]
678 testonly = true
679 }
mtklein25c81d42016-07-27 13:55:26 -0700680 }
mtklein25c81d42016-07-27 13:55:26 -0700681
mtkleinc095df52016-08-24 12:23:52 -0700682 test_lib("gpu_tool_utils") {
mtklein38925aa2016-09-21 10:11:25 -0700683 public_include_dirs = []
684 if (skia_enable_gpu) {
685 public_defines = []
686 public_include_dirs += [ "tools/gpu" ]
mtkleind68f9b02016-09-23 13:18:41 -0700687
688 deps = []
mtklein38925aa2016-09-21 10:11:25 -0700689 sources = [
690 "tools/gpu/GrContextFactory.cpp",
691 "tools/gpu/GrTest.cpp",
692 "tools/gpu/TestContext.cpp",
693 "tools/gpu/gl/GLTestContext.cpp",
mtklein605d9522016-09-21 14:01:32 -0700694 "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
mtklein38925aa2016-09-21 10:11:25 -0700695 "tools/gpu/gl/debug/DebugGLTestContext.cpp",
696 "tools/gpu/gl/debug/GrBufferObj.cpp",
697 "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
698 "tools/gpu/gl/debug/GrProgramObj.cpp",
699 "tools/gpu/gl/debug/GrShaderObj.cpp",
700 "tools/gpu/gl/debug/GrTextureObj.cpp",
701 "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
702 "tools/gpu/gl/null/NullGLTestContext.cpp",
703 ]
704 libs = []
mtklein25c81d42016-07-27 13:55:26 -0700705
mtklein38925aa2016-09-21 10:11:25 -0700706 if (is_android) {
707 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
708 } else if (is_linux) {
709 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
710 } else if (is_mac) {
711 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
Mike Klein4b167fc2016-10-11 18:13:53 -0400712 } else if (is_win) {
713 sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
714 libs += [
715 "Gdi32.lib",
716 "OpenGL32.lib",
717 ]
mtklein38925aa2016-09-21 10:11:25 -0700718 }
mtklein6ef69992016-09-14 06:12:09 -0700719
mtkleind68f9b02016-09-23 13:18:41 -0700720 if (skia_use_angle) {
721 public_defines += [ "SK_ANGLE" ]
722 deps += [ "//third_party/angle2" ]
723 sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
mtklein38925aa2016-09-21 10:11:25 -0700724 }
725 if (skia_use_mesa) {
726 public_defines += [ "SK_MESA" ]
727 sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ]
728 libs += [ "OSMesa" ]
729 }
mtkleind68f9b02016-09-23 13:18:41 -0700730 if (skia_use_vulkan) {
731 sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
732 }
mtkleina627b5c2016-09-20 13:36:47 -0700733 }
mtklein25c81d42016-07-27 13:55:26 -0700734 }
mtklein25c81d42016-07-27 13:55:26 -0700735
mtkleinc095df52016-08-24 12:23:52 -0700736 test_lib("flags") {
737 public_include_dirs = [ "tools/flags" ]
738 sources = [
739 "tools/flags/SkCommandLineFlags.cpp",
mtklein046cb562016-09-16 10:23:12 -0700740 ]
741 }
742 test_lib("common_flags") {
743 public_include_dirs = [ "tools/flags" ]
744 sources = [
mtkleinc095df52016-08-24 12:23:52 -0700745 "tools/flags/SkCommonFlags.cpp",
746 "tools/flags/SkCommonFlagsConfig.cpp",
747 ]
748 deps = [
mtklein046cb562016-09-16 10:23:12 -0700749 ":flags",
mtkleinc095df52016-08-24 12:23:52 -0700750 ":gpu_tool_utils",
751 ]
752 }
mtklein25c81d42016-07-27 13:55:26 -0700753
mtkleinc095df52016-08-24 12:23:52 -0700754 test_lib("tool_utils") {
755 public_include_dirs = [
756 "tools",
757 "tools/debugger",
758 "tools/timer",
759 ]
760 sources = [
761 "src/images/SkForceLinking.cpp",
762 "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to tools?
mtkleinb37c0342016-09-09 11:07:45 -0700763 "tools/AndroidSkDebugToStdOut.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700764 "tools/CrashHandler.cpp",
mtklein0590fa52016-09-01 07:06:54 -0700765 "tools/LsanSuppressions.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700766 "tools/ProcStats.cpp",
767 "tools/Resources.cpp",
768 "tools/ThermalManager.cpp",
769 "tools/UrlDataManager.cpp",
770 "tools/debugger/SkDebugCanvas.cpp",
771 "tools/debugger/SkDrawCommand.cpp",
772 "tools/debugger/SkJsonWriteBuffer.cpp",
773 "tools/debugger/SkObjectParser.cpp",
774 "tools/debugger/SkOverdrawMode.cpp",
775 "tools/picture_utils.cpp",
776 "tools/random_parse_path.cpp",
777 "tools/sk_tool_utils.cpp",
778 "tools/sk_tool_utils_font.cpp",
779 "tools/timer/Timer.cpp",
780 ]
781 deps = [
mtklein046cb562016-09-16 10:23:12 -0700782 ":common_flags",
mtkleinc095df52016-08-24 12:23:52 -0700783 ":flags",
784 "//third_party/libpng",
785 ]
786 public_deps = [
787 "//third_party/jsoncpp",
788 ]
789 }
mtklein25c81d42016-07-27 13:55:26 -0700790
mtkleinc095df52016-08-24 12:23:52 -0700791 gm_sources = exec_script("gyp/find.py",
792 [
793 "*.c*",
794 rebase_path("gm"),
795 ],
796 "list lines",
797 [])
798 test_lib("gm") {
799 public_include_dirs = [ "gm" ]
800 sources = gm_sources
801 deps = [
802 ":gpu_tool_utils",
803 ":skia",
804 ":tool_utils",
805 ]
806 }
mtklein25c81d42016-07-27 13:55:26 -0700807
mtkleinc095df52016-08-24 12:23:52 -0700808 tests_sources = exec_script("gyp/find.py",
809 [
810 "*.c*",
811 rebase_path("tests"),
812 ],
813 "list lines",
814 [])
mtklein2f3416d2016-08-02 16:02:05 -0700815
mtkleinc095df52016-08-24 12:23:52 -0700816 test_lib("tests") {
817 public_include_dirs = [ "tests" ]
mtkleina45be612016-08-29 15:22:10 -0700818 sources = tests_sources - [
819 rebase_path("tests/PathOpsSkpClipTest.cpp"), # alternate main
mtkleina45be612016-08-29 15:22:10 -0700820 rebase_path("tests/SkpSkGrTest.cpp"), # doesn't compile
821 rebase_path("tests/skia_test.cpp"), # alternate main
822 ]
823 if (!fontmgr_android_enabled) {
824 sources -= [ rebase_path("tests/FontMgrAndroidParserTest.cpp") ]
825 }
mtkleinc095df52016-08-24 12:23:52 -0700826 deps = [
fmalita6cf896d2016-08-25 08:44:35 -0700827 ":experimental_svg_model",
mtkleinc095df52016-08-24 12:23:52 -0700828 ":flags",
829 ":gpu_tool_utils",
830 ":skia",
831 ":tool_utils",
832 "//third_party/libpng",
833 "//third_party/zlib",
834 ]
835 }
mtklein2f3416d2016-08-02 16:02:05 -0700836
mtkleinc095df52016-08-24 12:23:52 -0700837 bench_sources = exec_script("gyp/find.py",
838 [
839 "*.c*",
840 rebase_path("bench"),
841 ],
842 "list lines",
843 [])
mtklein25c81d42016-07-27 13:55:26 -0700844
mtkleinc095df52016-08-24 12:23:52 -0700845 test_lib("bench") {
846 public_include_dirs = [ "bench" ]
847 sources = bench_sources
848 sources -= [
849 rebase_path("bench/nanobench.cpp"),
850 rebase_path("bench/nanobenchAndroid.cpp"),
851 ]
852 deps = [
853 ":flags",
854 ":gm",
855 ":gpu_tool_utils",
856 ":skia",
857 ":tool_utils",
858 ]
859 }
mtklein2b6870c2016-07-28 14:17:33 -0700860
mtkleinc095df52016-08-24 12:23:52 -0700861 test_lib("experimental_svg_model") {
862 public_include_dirs = [ "experimental/svg/model" ]
863 sources = [
864 "experimental/svg/model/SkSVGAttribute.cpp",
865 "experimental/svg/model/SkSVGAttributeParser.cpp",
866 "experimental/svg/model/SkSVGCircle.cpp",
867 "experimental/svg/model/SkSVGContainer.cpp",
868 "experimental/svg/model/SkSVGDOM.cpp",
869 "experimental/svg/model/SkSVGEllipse.cpp",
870 "experimental/svg/model/SkSVGLine.cpp",
fmalita28d5b722016-09-12 17:06:47 -0700871 "experimental/svg/model/SkSVGLinearGradient.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700872 "experimental/svg/model/SkSVGNode.cpp",
873 "experimental/svg/model/SkSVGPath.cpp",
874 "experimental/svg/model/SkSVGPoly.cpp",
875 "experimental/svg/model/SkSVGRect.cpp",
876 "experimental/svg/model/SkSVGRenderContext.cpp",
877 "experimental/svg/model/SkSVGSVG.cpp",
878 "experimental/svg/model/SkSVGShape.cpp",
fmalita28d5b722016-09-12 17:06:47 -0700879 "experimental/svg/model/SkSVGStop.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700880 "experimental/svg/model/SkSVGTransformableNode.cpp",
881 "experimental/svg/model/SkSVGValue.cpp",
882 ]
883 deps = [
884 ":skia",
885 ]
886 }
fmalitaa2b9fdf2016-08-03 19:53:36 -0700887
mtklein2b6870c2016-07-28 14:17:33 -0700888 executable("dm") {
889 sources = [
890 "dm/DM.cpp",
891 "dm/DMJsonWriter.cpp",
892 "dm/DMSrcSink.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700893 ]
894 include_dirs = [ "tests" ]
895 deps = [
mtklein046cb562016-09-16 10:23:12 -0700896 ":common_flags",
fmalitaa2b9fdf2016-08-03 19:53:36 -0700897 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700898 ":flags",
899 ":gm",
900 ":gpu_tool_utils",
901 ":skia",
mtklein2f3416d2016-08-02 16:02:05 -0700902 ":tests",
mtklein2b6870c2016-07-28 14:17:33 -0700903 ":tool_utils",
904 "//third_party/jsoncpp",
905 "//third_party/libpng",
906 ]
907 testonly = true
908 }
909
Mike Kleina3430172016-09-27 16:46:29 -0400910 if (!is_debug) { # I've benchmarked debug code once too many times...
911 executable("monobench") {
912 sources = [
913 "tools/monobench.cpp",
914 ]
915 deps = [
916 ":bench",
917 ":skia",
918 ]
919 testonly = true
920 }
mtklein2b6870c2016-07-28 14:17:33 -0700921 }
922
923 executable("nanobench") {
924 sources = [
925 "bench/nanobench.cpp",
926 ]
927 deps = [
928 ":bench",
mtklein046cb562016-09-16 10:23:12 -0700929 ":common_flags",
fmalita6519c212016-09-14 08:05:17 -0700930 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700931 ":flags",
932 ":gm",
933 ":gpu_tool_utils",
934 ":skia",
935 ":tool_utils",
936 "//third_party/jsoncpp",
937 ]
938 testonly = true
939 }
halcanary19a97202016-08-03 15:08:04 -0700940
mtklein38925aa2016-09-21 10:11:25 -0700941 if (skia_enable_gpu) {
942 executable("skpbench") {
943 sources = [
944 "tools/skpbench/skpbench.cpp",
945 ]
946 deps = [
947 ":flags",
948 ":gpu_tool_utils",
949 ":skia",
950 ":tool_utils",
951 ]
952 testonly = true
953 }
csmartdalton4b5179b2016-09-19 11:03:58 -0700954 }
955
Mike Klein4b167fc2016-10-11 18:13:53 -0400956 # We can't yet build ICU on Windows.
Mike Klein768bdfc2016-10-11 19:59:22 -0400957 if (!is_win) {
halcanary3eee9d92016-09-10 07:01:53 -0700958 executable("sktexttopdf-hb") {
mtklein6f5df6a2016-08-29 16:01:10 -0700959 sources = [
960 "tools/SkShaper_harfbuzz.cpp",
961 "tools/using_skia_and_harfbuzz.cpp",
962 ]
963 deps = [
964 ":skia",
965 "//third_party/harfbuzz",
966 ]
967 testonly = true
968 }
halcanary19a97202016-08-03 15:08:04 -0700969 }
halcanary3eee9d92016-09-10 07:01:53 -0700970 executable("sktexttopdf") {
971 sources = [
972 "tools/SkShaper_primitive.cpp",
973 "tools/using_skia_and_harfbuzz.cpp",
974 ]
975 deps = [
976 ":skia",
977 ]
978 testonly = true
979 }
mtklein046cb562016-09-16 10:23:12 -0700980
981 executable("get_images_from_skps") {
982 sources = [
983 "tools/get_images_from_skps.cpp",
984 ]
985 deps = [
986 ":flags",
987 ":skia",
988 "//third_party/jsoncpp",
989 ]
990 testonly = true
991 }
mtkleinecbc5262016-09-22 11:51:24 -0700992
993 executable("skiaserve") {
994 sources = [
995 "tools/skiaserve/Request.cpp",
996 "tools/skiaserve/Response.cpp",
997 "tools/skiaserve/skiaserve.cpp",
998 "tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp",
999 "tools/skiaserve/urlhandlers/BatchesHandler.cpp",
1000 "tools/skiaserve/urlhandlers/BreakHandler.cpp",
1001 "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp",
1002 "tools/skiaserve/urlhandlers/CmdHandler.cpp",
1003 "tools/skiaserve/urlhandlers/ColorModeHandler.cpp",
1004 "tools/skiaserve/urlhandlers/DataHandler.cpp",
1005 "tools/skiaserve/urlhandlers/DownloadHandler.cpp",
1006 "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp",
1007 "tools/skiaserve/urlhandlers/ImgHandler.cpp",
1008 "tools/skiaserve/urlhandlers/InfoHandler.cpp",
1009 "tools/skiaserve/urlhandlers/PostHandler.cpp",
1010 "tools/skiaserve/urlhandlers/QuitHandler.cpp",
1011 "tools/skiaserve/urlhandlers/RootHandler.cpp",
1012 ]
1013 deps = [
1014 ":flags",
1015 ":gpu_tool_utils",
1016 ":skia",
1017 ":tool_utils",
1018 "//third_party/jsoncpp",
1019 "//third_party/libmicrohttpd",
1020 "//third_party/libpng",
1021 ]
1022 testonly = true
1023 }
kjlubick14f984b2016-10-03 11:49:45 -07001024
1025 executable("fuzz") {
1026 sources = [
1027 "fuzz/FilterFuzz.cpp",
1028 "fuzz/FuzzGradients.cpp",
1029 "fuzz/FuzzParsePath.cpp",
1030 "fuzz/FuzzPathop.cpp",
1031 "fuzz/FuzzScaleToSides.cpp",
1032 "fuzz/fuzz.cpp",
1033 ]
1034 deps = [
1035 ":flags",
1036 ":skia",
1037 ]
1038 testonly = true
1039 }
Mike Klein38312422016-10-05 15:41:01 -04001040
1041 executable("dump_record") {
1042 sources = [
1043 "tools/DumpRecord.cpp",
1044 "tools/dump_record.cpp",
1045 ]
1046 deps = [
1047 ":flags",
1048 ":skia",
1049 ]
1050 testonly = true
1051 }
mtklein25c81d42016-07-27 13:55:26 -07001052}