mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1 | # 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 | |
mikejurka | 8c24f4f | 2016-09-12 16:51:58 -0700 | [diff] [blame] | 6 | import("gn/shared_sources.gni") |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 7 | |
mtklein | 3e8012e | 2016-09-21 09:14:19 -0700 | [diff] [blame] | 8 | if (!defined(is_skia_standalone)) { |
| 9 | is_skia_standalone = false |
| 10 | } |
| 11 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 12 | declare_args() { |
mtklein | d68f9b0 | 2016-09-23 13:18:41 -0700 | [diff] [blame] | 13 | skia_use_angle = false |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 14 | skia_use_expat = true |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 15 | skia_use_fontconfig = is_linux |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 16 | skia_use_freetype = is_android || is_fuchsia || is_linux |
Mike Klein | 69f6ed4 | 2016-10-13 15:45:07 -0400 | [diff] [blame] | 17 | skia_use_gdi = false |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 18 | skia_use_giflib = !is_fuchsia |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 19 | skia_use_libjpeg_turbo = true |
| 20 | skia_use_libpng = true |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 21 | skia_use_libwebp = !is_fuchsia |
mtklein | a627b5c | 2016-09-20 13:36:47 -0700 | [diff] [blame] | 22 | skia_use_mesa = false |
Mike Klein | ae7e671 | 2016-10-11 17:49:33 -0400 | [diff] [blame] | 23 | skia_use_sfntly = !is_fuchsia && !is_win # TODO: icu on Windows, re-enable this. |
mtklein | f29180e | 2016-09-16 07:01:17 -0700 | [diff] [blame] | 24 | skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24 |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 25 | skia_use_zlib = true |
mtklein | 1bd72ba | 2016-09-16 07:45:52 -0700 | [diff] [blame] | 26 | |
| 27 | skia_enable_android_framework_defines = false |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 28 | skia_enable_gpu = true |
mtklein | 3e8012e | 2016-09-21 09:14:19 -0700 | [diff] [blame] | 29 | skia_enable_tools = is_skia_standalone |
| 30 | skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug |
Brian Salomon | 789e25e | 2016-09-30 13:41:03 -0400 | [diff] [blame] | 31 | skia_vulkan_sdk = "" |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 32 | } |
| 33 | |
Brian Salomon | 789e25e | 2016-09-30 13:41:03 -0400 | [diff] [blame] | 34 | skia_use_vulkan = skia_use_vulkan || skia_vulkan_sdk != "" |
| 35 | |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 36 | # Our tools require static linking (they use non-exported symbols). |
| 37 | skia_enable_tools = skia_enable_tools && !is_component_build |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 38 | |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 39 | fontmgr_android_enabled = skia_use_expat && skia_use_freetype |
| 40 | |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 41 | skia_public_includes = [ |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 42 | "include/android", |
mtklein | fa84d94 | 2016-07-28 09:45:14 -0700 | [diff] [blame] | 43 | "include/c", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 44 | "include/codec", |
| 45 | "include/config", |
| 46 | "include/core", |
| 47 | "include/effects", |
| 48 | "include/gpu", |
| 49 | "include/gpu/gl", |
| 50 | "include/images", |
| 51 | "include/pathops", |
| 52 | "include/ports", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 53 | "include/svg", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 54 | "include/utils", |
| 55 | "include/utils/mac", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 56 | "include/xml", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 57 | ] |
| 58 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 59 | # Skia public API, generally provided by :skia. |
| 60 | config("skia_public") { |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 61 | include_dirs = skia_public_includes |
Mike Klein | ae7e671 | 2016-10-11 17:49:33 -0400 | [diff] [blame] | 62 | defines = [] |
| 63 | if (is_component_build) { |
| 64 | defines += [ "SKIA_DLL" ] |
| 65 | } |
Mike Klein | c4cbd74 | 2016-09-26 21:37:09 -0400 | [diff] [blame] | 66 | if (is_fuchsia || is_linux) { |
jcgregorio | 5561e3d | 2016-08-25 09:25:11 -0700 | [diff] [blame] | 67 | defines += [ "SK_SAMPLES_FOR_X" ] |
| 68 | } |
mtklein | cae1be5 | 2016-09-20 08:24:34 -0700 | [diff] [blame] | 69 | if (skia_enable_android_framework_defines) { |
| 70 | defines += skia_android_framework_defines |
| 71 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 72 | if (!skia_enable_gpu) { |
| 73 | defines += [ "SK_SUPPORT_GPU=0" ] |
| 74 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | # Skia internal APIs, used by Skia itself and a few test tools. |
| 78 | config("skia_private") { |
| 79 | visibility = [ ":*" ] |
| 80 | |
| 81 | include_dirs = [ |
| 82 | "include/private", |
| 83 | "src/c", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 84 | "src/codec", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 85 | "src/config", |
| 86 | "src/core", |
| 87 | "src/effects", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 88 | "src/effects/gradients", |
| 89 | "src/fonts", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 90 | "src/gpu", |
| 91 | "src/image", |
| 92 | "src/images", |
| 93 | "src/lazy", |
| 94 | "src/opts", |
| 95 | "src/pathops", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 96 | "src/pdf", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 97 | "src/ports", |
| 98 | "src/sfnt", |
mtklein | 9e0d9dd | 2016-08-30 10:37:19 -0700 | [diff] [blame] | 99 | "src/sksl", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 100 | "src/utils", |
mtklein | 7a1f45f | 2016-08-04 06:19:33 -0700 | [diff] [blame] | 101 | "src/utils/win", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 102 | "third_party/etc1", |
| 103 | "third_party/ktx", |
| 104 | ] |
mtklein | 150d113 | 2016-08-01 06:56:40 -0700 | [diff] [blame] | 105 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 106 | defines = [ "SK_GAMMA_APPLY_TO_A8" ] |
mtklein | b37c034 | 2016-09-09 11:07:45 -0700 | [diff] [blame] | 107 | if (is_android) { |
| 108 | defines += [ |
| 109 | "SK_GAMMA_EXPONENT=1.4", |
| 110 | "SK_GAMMA_CONTRAST=0.0", |
| 111 | ] |
| 112 | } |
mtklein | 88a7ac0 | 2016-09-14 11:16:49 -0700 | [diff] [blame] | 113 | if (is_official_build || is_android) { |
| 114 | # TODO(bsalomon): it'd be nice to make Android normal. |
| 115 | defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ] |
| 116 | } |
Brian Salomon | 789e25e | 2016-09-30 13:41:03 -0400 | [diff] [blame] | 117 | libs = [] |
| 118 | lib_dirs = [] |
| 119 | if (skia_use_vulkan) { |
| 120 | if (skia_vulkan_sdk != "") { |
| 121 | include_dirs += [ "$skia_vulkan_sdk/x86_64/include/" ] |
| 122 | lib_dirs += [ "$skia_vulkan_sdk/x86_64/lib/" ] |
| 123 | } |
| 124 | libs += [ "vulkan" ] |
| 125 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 126 | } |
| 127 | |
| 128 | # Any code that's linked into Skia-the-library should use this config via += skia_library_configs. |
| 129 | config("skia_library") { |
| 130 | visibility = [ ":*" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 131 | defines = [ "SKIA_IMPLEMENTATION=1" ] |
| 132 | } |
| 133 | |
| 134 | skia_library_configs = [ |
| 135 | ":skia_public", |
| 136 | ":skia_private", |
| 137 | ":skia_library", |
| 138 | ] |
| 139 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 140 | # Use for CPU-specific Skia code that needs particular compiler flags. |
| 141 | template("opts") { |
| 142 | if (invoker.enabled) { |
| 143 | source_set(target_name) { |
| 144 | forward_variables_from(invoker, "*") |
| 145 | configs += skia_library_configs |
| 146 | } |
| 147 | } else { |
| 148 | # If not enabled, a phony empty target that swallows all otherwise unused variables. |
| 149 | source_set(target_name) { |
| 150 | forward_variables_from(invoker, |
| 151 | "*", |
| 152 | [ |
| 153 | "sources", |
| 154 | "cflags", |
| 155 | ]) |
| 156 | } |
| 157 | } |
anmittal | a7eaf2e | 2016-08-17 13:57:26 -0700 | [diff] [blame] | 158 | } |
| 159 | |
mtklein | 422310d | 2016-08-16 18:28:43 -0700 | [diff] [blame] | 160 | is_x86 = current_cpu == "x64" || current_cpu == "x86" |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 161 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 162 | opts("none") { |
| 163 | enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 164 | sources = skia_opts.none_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 165 | cflags = [] |
| 166 | } |
| 167 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 168 | opts("armv7") { |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 169 | enabled = current_cpu == "arm" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 170 | sources = skia_opts.armv7_sources + skia_opts.neon_sources |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 171 | cflags = [] |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | opts("arm64") { |
| 175 | enabled = current_cpu == "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 176 | sources = skia_opts.arm64_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 177 | cflags = [] |
| 178 | } |
| 179 | |
| 180 | opts("crc32") { |
| 181 | enabled = current_cpu == "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 182 | sources = skia_opts.crc32_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 183 | cflags = [ "-march=armv8-a+crc" ] |
| 184 | } |
| 185 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 186 | opts("sse2") { |
| 187 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 188 | sources = skia_opts.sse2_sources |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 189 | if (!is_win) { |
| 190 | cflags = [ "-msse2" ] |
| 191 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 192 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 193 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 194 | opts("ssse3") { |
| 195 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 196 | sources = skia_opts.ssse3_sources |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 197 | if (!is_win) { |
| 198 | cflags = [ "-mssse3" ] |
| 199 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 200 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 201 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 202 | opts("sse41") { |
| 203 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 204 | sources = skia_opts.sse41_sources |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 205 | if (!is_win) { |
| 206 | cflags = [ "-msse4.1" ] |
| 207 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 208 | } |
mtklein | 4e97607 | 2016-08-08 09:06:27 -0700 | [diff] [blame] | 209 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 210 | opts("sse42") { |
| 211 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 212 | sources = skia_opts.sse42_sources |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 213 | if (!is_win) { |
| 214 | cflags = [ "-msse4.2" ] |
| 215 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 216 | } |
| 217 | |
| 218 | opts("avx") { |
| 219 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 220 | sources = skia_opts.avx_sources |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 221 | if (is_win) { |
| 222 | cflags = [ "/arch:AVX" ] |
| 223 | } else { |
| 224 | cflags = [ "-mavx" ] |
| 225 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 226 | } |
| 227 | |
Mike Klein | 78d5a3b | 2016-09-30 10:48:01 -0400 | [diff] [blame] | 228 | opts("hsw") { |
| 229 | enabled = is_x86 |
| 230 | sources = skia_opts.hsw_sources |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 231 | if (is_win) { |
| 232 | cflags = [ "/arch:AVX2" ] |
| 233 | } else { |
| 234 | cflags = [ |
| 235 | "-mavx2", |
| 236 | "-mbmi", |
| 237 | "-mbmi2", |
| 238 | "-mf16c", |
| 239 | "-mfma", |
| 240 | ] |
| 241 | } |
Mike Klein | 78d5a3b | 2016-09-30 10:48:01 -0400 | [diff] [blame] | 242 | } |
| 243 | |
mtklein | 349cece | 2016-08-26 08:13:04 -0700 | [diff] [blame] | 244 | opts("dsp") { |
| 245 | enabled = current_cpu == "mipsel" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 246 | sources = skia_opts.mips_dsp_sources |
mtklein | b6064ef | 2016-08-30 11:49:24 -0700 | [diff] [blame] | 247 | cflags = [] |
mtklein | 349cece | 2016-08-26 08:13:04 -0700 | [diff] [blame] | 248 | } |
| 249 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 250 | # Any feature of Skia that requires third-party code should be optional and use this template. |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 251 | template("optional") { |
| 252 | if (invoker.enabled) { |
| 253 | config(target_name + "_public") { |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 254 | if (defined(invoker.public_defines)) { |
| 255 | defines = invoker.public_defines |
| 256 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 257 | } |
| 258 | source_set(target_name) { |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 259 | forward_variables_from(invoker, |
| 260 | "*", |
| 261 | [ |
| 262 | "public_defines", |
| 263 | "sources_when_disabled", |
| 264 | ]) |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 265 | all_dependent_configs = [ ":" + target_name + "_public" ] |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 266 | configs += skia_library_configs |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 267 | } |
| 268 | } else { |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 269 | source_set(target_name) { |
| 270 | forward_variables_from(invoker, |
| 271 | "*", |
| 272 | [ |
| 273 | "public_defines", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 274 | "deps", |
mtklein | 6ef6999 | 2016-09-14 06:12:09 -0700 | [diff] [blame] | 275 | "libs", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 276 | "sources", |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 277 | "sources_when_disabled", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 278 | ]) |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 279 | if (defined(invoker.sources_when_disabled)) { |
| 280 | sources = invoker.sources_when_disabled |
| 281 | } |
| 282 | configs += skia_library_configs |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 283 | } |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 284 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 285 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 286 | |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 287 | optional("fontmgr_android") { |
| 288 | enabled = fontmgr_android_enabled |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 289 | |
| 290 | deps = [ |
| 291 | "//third_party/expat", |
| 292 | "//third_party/freetype2", |
| 293 | ] |
| 294 | sources = [ |
| 295 | "src/ports/SkFontMgr_android.cpp", |
| 296 | "src/ports/SkFontMgr_android_factory.cpp", |
| 297 | "src/ports/SkFontMgr_android_parser.cpp", |
| 298 | ] |
| 299 | } |
| 300 | |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 301 | optional("fontmgr_custom") { |
| 302 | enabled = is_linux && skia_use_freetype && !skia_use_fontconfig |
| 303 | |
| 304 | deps = [ |
| 305 | "//third_party/freetype2", |
| 306 | ] |
| 307 | sources = [ |
| 308 | "src/ports/SkFontMgr_custom.cpp", |
| 309 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
| 310 | ] |
| 311 | } |
| 312 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 313 | optional("fontmgr_fontconfig") { |
| 314 | enabled = skia_use_freetype && skia_use_fontconfig |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 315 | |
| 316 | deps = [ |
| 317 | "//third_party:fontconfig", |
| 318 | "//third_party/freetype2", |
| 319 | ] |
| 320 | sources = [ |
bungeman | 1ae0e01 | 2016-09-19 12:13:16 -0700 | [diff] [blame] | 321 | "src/ports/SkFontConfigInterface.cpp", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 322 | "src/ports/SkFontConfigInterface_direct.cpp", |
| 323 | "src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 324 | "src/ports/SkFontMgr_FontConfigInterface.cpp", |
| 325 | "src/ports/SkFontMgr_fontconfig.cpp", |
| 326 | "src/ports/SkFontMgr_fontconfig_factory.cpp", |
| 327 | ] |
| 328 | } |
| 329 | |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 330 | optional("fontmgr_fuchsia") { |
| 331 | enabled = is_fuchsia && skia_use_freetype |
| 332 | |
| 333 | deps = [ |
| 334 | "//third_party/freetype2", |
| 335 | ] |
| 336 | sources = [ |
| 337 | "src/ports/SkFontMgr_custom.cpp", |
| 338 | "src/ports/SkFontMgr_custom_empty_factory.cpp", |
| 339 | ] |
| 340 | } |
| 341 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 342 | optional("gif") { |
| 343 | enabled = skia_use_giflib |
| 344 | public_defines = [ "SK_HAS_GIF_LIBRARY" ] |
| 345 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 346 | deps = [ |
| 347 | "//third_party/giflib", |
| 348 | ] |
| 349 | sources = [ |
| 350 | "src/codec/SkGifCodec.cpp", |
| 351 | ] |
| 352 | } |
| 353 | |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 354 | optional("gpu") { |
| 355 | enabled = skia_enable_gpu |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 356 | public_defines = [] |
| 357 | |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 358 | sources = skia_gpu_sources + [ "src/gpu/gl/GrGLDefaultInterface_native.cpp" ] |
| 359 | |
| 360 | # These paths need to be absolute to match the ones produced by shared_sources.gni. |
| 361 | sources -= get_path_info([ |
| 362 | "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", |
| 363 | "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
| 364 | ], |
| 365 | "abspath") |
Mike Klein | 703cf5a | 2016-10-13 17:18:04 -0400 | [diff] [blame] | 366 | libs = [] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 367 | if (is_android) { |
| 368 | sources += [ "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp" ] |
| 369 | } else if (is_linux) { |
| 370 | sources += [ "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp" ] |
| 371 | } else if (is_mac) { |
| 372 | sources += [ "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp" ] |
Mike Klein | 703cf5a | 2016-10-13 17:18:04 -0400 | [diff] [blame] | 373 | } else if (is_win) { |
| 374 | sources += [ "src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp" ] |
| 375 | libs += [ "OpenGL32.lib" ] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 376 | } else { |
| 377 | sources += [ "src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ] |
| 378 | } |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 379 | |
| 380 | if (skia_use_vulkan) { |
| 381 | public_defines += [ "SK_VULKAN" ] |
| 382 | sources += skia_vk_sources |
egdaniel | e4a9bd7 | 2016-09-21 07:36:14 -0700 | [diff] [blame] | 383 | if (skia_enable_vulkan_debug_layers) { |
| 384 | public_defines += [ "SK_ENABLE_VK_LAYERS" ] |
| 385 | } |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 386 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 387 | } |
| 388 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 389 | optional("jpeg") { |
| 390 | enabled = skia_use_libjpeg_turbo |
| 391 | public_defines = [ "SK_HAS_JPEG_LIBRARY" ] |
| 392 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 393 | deps = [ |
| 394 | "//third_party/libjpeg-turbo:libjpeg", |
| 395 | ] |
| 396 | sources = [ |
| 397 | "src/codec/SkJpegCodec.cpp", |
| 398 | "src/codec/SkJpegDecoderMgr.cpp", |
| 399 | "src/codec/SkJpegUtility.cpp", |
| 400 | "src/images/SkJPEGImageEncoder.cpp", |
| 401 | "src/images/SkJPEGWriteUtility.cpp", |
| 402 | ] |
| 403 | } |
| 404 | |
| 405 | optional("pdf") { |
| 406 | enabled = skia_use_zlib |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 407 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 408 | deps = [ |
| 409 | "//third_party/zlib", |
| 410 | ] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 411 | sources = skia_pdf_sources |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 412 | sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 413 | |
| 414 | if (skia_use_sfntly) { |
| 415 | deps += [ "//third_party/sfntly" ] |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 416 | public_defines = [ "SK_PDF_USE_SFNTLY" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 417 | } |
| 418 | } |
| 419 | |
| 420 | optional("png") { |
| 421 | enabled = skia_use_libpng |
| 422 | public_defines = [ "SK_HAS_PNG_LIBRARY" ] |
| 423 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 424 | deps = [ |
| 425 | "//third_party/libpng", |
| 426 | ] |
| 427 | sources = [ |
| 428 | "src/codec/SkIcoCodec.cpp", |
| 429 | "src/codec/SkPngCodec.cpp", |
| 430 | "src/images/SkPNGImageEncoder.cpp", |
| 431 | ] |
| 432 | } |
| 433 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 434 | optional("typeface_freetype") { |
| 435 | enabled = skia_use_freetype |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 436 | |
| 437 | deps = [ |
| 438 | "//third_party/freetype2", |
| 439 | ] |
| 440 | sources = [ |
| 441 | "src/ports/SkFontHost_FreeType.cpp", |
| 442 | "src/ports/SkFontHost_FreeType_common.cpp", |
| 443 | ] |
| 444 | } |
| 445 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 446 | optional("webp") { |
| 447 | enabled = skia_use_libwebp |
| 448 | public_defines = [ "SK_HAS_WEBP_LIBRARY" ] |
| 449 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 450 | deps = [ |
| 451 | "//third_party/libwebp", |
| 452 | ] |
| 453 | sources = [ |
| 454 | "src/codec/SkWebpAdapterCodec.cpp", |
| 455 | "src/codec/SkWebpCodec.cpp", |
| 456 | "src/images/SkWEBPImageEncoder.cpp", |
| 457 | ] |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 458 | } |
| 459 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 460 | optional("xml") { |
| 461 | enabled = skia_use_expat |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 462 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 463 | deps = [ |
| 464 | "//third_party/expat", |
| 465 | ] |
| 466 | sources = [ |
| 467 | "src/xml/SkDOM.cpp", |
| 468 | "src/xml/SkXMLParser.cpp", |
| 469 | "src/xml/SkXMLWriter.cpp", |
| 470 | ] |
| 471 | } |
| 472 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 473 | component("skia") { |
| 474 | public_configs = [ ":skia_public" ] |
| 475 | configs += skia_library_configs |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 476 | |
| 477 | deps = [ |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 478 | ":arm64", |
| 479 | ":armv7", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 480 | ":avx", |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 481 | ":crc32", |
mtklein | 349cece | 2016-08-26 08:13:04 -0700 | [diff] [blame] | 482 | ":dsp", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 483 | ":fontmgr_android", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 484 | ":fontmgr_custom", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 485 | ":fontmgr_fontconfig", |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 486 | ":fontmgr_fuchsia", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 487 | ":gif", |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 488 | ":gpu", |
Mike Klein | 78d5a3b | 2016-09-30 10:48:01 -0400 | [diff] [blame] | 489 | ":hsw", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 490 | ":jpeg", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 491 | ":none", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 492 | ":pdf", |
| 493 | ":png", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 494 | ":sse2", |
| 495 | ":sse41", |
| 496 | ":sse42", |
| 497 | ":ssse3", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 498 | ":typeface_freetype", |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 499 | ":webp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 500 | ":xml", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 501 | ] |
| 502 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 503 | sources = [] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 504 | sources += skia_core_sources |
| 505 | sources += skia_effects_sources |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 506 | sources += skia_sksl_sources |
| 507 | sources += skia_utils_sources |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 508 | sources += [ |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 509 | "src/android/SkBitmapRegionCodec.cpp", |
| 510 | "src/android/SkBitmapRegionDecoder.cpp", |
| 511 | "src/codec/SkAndroidCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 512 | "src/codec/SkBmpCodec.cpp", |
| 513 | "src/codec/SkBmpMaskCodec.cpp", |
| 514 | "src/codec/SkBmpRLECodec.cpp", |
| 515 | "src/codec/SkBmpStandardCodec.cpp", |
| 516 | "src/codec/SkCodec.cpp", |
| 517 | "src/codec/SkCodecImageGenerator.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 518 | "src/codec/SkMaskSwizzler.cpp", |
| 519 | "src/codec/SkMasks.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 520 | "src/codec/SkSampledCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 521 | "src/codec/SkSampler.cpp", |
| 522 | "src/codec/SkSwizzler.cpp", |
| 523 | "src/codec/SkWbmpCodec.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 524 | "src/images/SkImageEncoder.cpp", |
| 525 | "src/images/SkImageEncoder_Factory.cpp", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 526 | "src/images/SkKTXImageEncoder.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 527 | "src/ports/SkDiscardableMemory_none.cpp", |
| 528 | "src/ports/SkGlobalInitialization_default.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 529 | "src/ports/SkImageGenerator_skia.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 530 | "src/ports/SkMemory_malloc.cpp", |
| 531 | "src/ports/SkOSFile_stdio.cpp", |
| 532 | "src/sfnt/SkOTTable_name.cpp", |
| 533 | "src/sfnt/SkOTUtils.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 534 | "src/svg/SkSVGCanvas.cpp", |
| 535 | "src/svg/SkSVGDevice.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 536 | "src/utils/mac/SkStream_mac.cpp", |
| 537 | "third_party/etc1/etc1.cpp", |
| 538 | "third_party/ktx/ktx.cpp", |
| 539 | ] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 540 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 541 | libs = [] |
| 542 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 543 | if (is_win) { |
| 544 | sources += [ |
Mike Klein | ae7e671 | 2016-10-11 17:49:33 -0400 | [diff] [blame] | 545 | "src/fonts/SkFontMgr_indirect.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 546 | "src/ports/SkDebug_win.cpp", |
| 547 | "src/ports/SkFontHost_win.cpp", |
| 548 | "src/ports/SkFontMgr_win_dw.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 549 | "src/ports/SkImageEncoder_WIC.cpp", |
| 550 | "src/ports/SkImageGeneratorWIC.cpp", |
| 551 | "src/ports/SkOSFile_win.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 552 | "src/ports/SkOSLibrary_win.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 553 | "src/ports/SkScalerContext_win_dw.cpp", |
| 554 | "src/ports/SkTLS_win.cpp", |
| 555 | "src/ports/SkTypeface_win_dw.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 556 | "src/xps/SkDocument_XPS.cpp", |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 557 | "src/xps/SkXPSDevice.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 558 | ] |
Mike Klein | 69f6ed4 | 2016-10-13 15:45:07 -0400 | [diff] [blame] | 559 | if (skia_use_gdi) { |
| 560 | sources += [ "src/ports/SkFontMgr_win_gdi_factory.cpp" ] |
| 561 | libs += [ |
| 562 | "Gdi32.lib", |
| 563 | "Usp10.lib", |
| 564 | ] |
| 565 | } else { |
| 566 | sources += [ "src/ports/SkFontMgr_win_dw_factory.cpp" ] |
| 567 | } |
mtklein | b9be979 | 2016-09-16 14:44:18 -0700 | [diff] [blame] | 568 | sources -= |
| 569 | [ get_path_info("src/utils/SkThreadUtils_pthread.cpp", "abspath") ] |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 570 | libs += [ |
| 571 | "FontSub.lib", |
| 572 | "Ole32.lib", |
| 573 | "OleAut32.lib", |
| 574 | "User32.lib", |
| 575 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 576 | } else { |
| 577 | sources += [ |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 578 | "src/ports/SkOSFile_posix.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 579 | "src/ports/SkOSLibrary_posix.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 580 | "src/ports/SkTLS_pthread.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 581 | "src/xps/SkDocument_XPS_None.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 582 | ] |
| 583 | } |
| 584 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 585 | if (is_android) { |
| 586 | deps += [ |
| 587 | "//third_party/cpu-features", |
| 588 | "//third_party/expat", |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 589 | ] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 590 | sources += [ "src/ports/SkDebug_android.cpp" ] |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 591 | libs += [ |
| 592 | "EGL", |
| 593 | "GLESv2", |
| 594 | "log", |
| 595 | ] |
| 596 | } |
| 597 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 598 | if (is_linux) { |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 599 | libs += [ |
| 600 | "GL", |
| 601 | "GLU", |
| 602 | "X11", |
| 603 | ] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 604 | sources += [ "src/ports/SkDebug_stdio.cpp" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 605 | } |
| 606 | |
| 607 | if (is_mac) { |
| 608 | sources += [ |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 609 | "src/ports/SkDebug_stdio.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 610 | "src/ports/SkFontHost_mac.cpp", |
| 611 | "src/ports/SkImageEncoder_CG.cpp", |
| 612 | "src/ports/SkImageGeneratorCG.cpp", |
| 613 | ] |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 614 | libs += [ |
| 615 | "ApplicationServices.framework", |
| 616 | "OpenGL.framework", |
| 617 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 618 | } |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 619 | |
| 620 | if (is_fuchsia) { |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 621 | sources += [ "src/ports/SkDebug_stdio.cpp" ] |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 622 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 623 | } |
| 624 | |
mtklein | ada5a44 | 2016-08-02 14:28:26 -0700 | [diff] [blame] | 625 | skia_h_headers = exec_script("gyp/find.py", |
| 626 | [ "*.h" ] + rebase_path(skia_public_includes), |
| 627 | "list lines", |
| 628 | []) - |
| 629 | [ |
| 630 | rebase_path("include/gpu/gl/GrGLConfig_chrome.h"), |
| 631 | rebase_path("include/gpu/vk/GrVkBackendContext.h"), |
| 632 | rebase_path("include/gpu/vk/GrVkDefines.h"), |
| 633 | rebase_path("include/gpu/vk/GrVkInterface.h"), |
| 634 | rebase_path("include/gpu/vk/GrVkTypes.h"), |
| 635 | rebase_path("include/ports/SkFontMgr_fontconfig.h"), |
| 636 | ] |
| 637 | |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 638 | action("skia.h") { |
| 639 | script = "gn/echo_headers.py" |
| 640 | args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] + |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 641 | rebase_path(skia_h_headers, target_gen_dir) |
Ben Wagner | bc34404 | 2016-09-29 15:41:53 -0400 | [diff] [blame] | 642 | inputs = skia_h_headers |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 643 | outputs = [ |
| 644 | "$target_gen_dir/skia.h", |
| 645 | ] |
| 646 | } |
| 647 | |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 648 | if (skia_enable_gpu && target_cpu == "x64") { |
mtklein | 1fbdf98 | 2016-09-15 12:07:48 -0700 | [diff] [blame] | 649 | # Our bots only have 64-bit libOSMesa installed. |
| 650 | # TODO: worth fixing? |
| 651 | executable("fiddle") { |
| 652 | include_dirs = [ "$target_gen_dir" ] |
| 653 | libs = [] |
| 654 | if (is_linux) { |
| 655 | libs += [ "OSMesa" ] |
| 656 | } |
mtklein | 56d5669 | 2016-09-15 11:18:55 -0700 | [diff] [blame] | 657 | |
mtklein | 1fbdf98 | 2016-09-15 12:07:48 -0700 | [diff] [blame] | 658 | sources = [ |
| 659 | "src/images/SkForceLinking.cpp", |
| 660 | "tools/fiddle/draw.cpp", |
| 661 | "tools/fiddle/fiddle_main.cpp", |
| 662 | ] |
| 663 | deps = [ |
| 664 | ":skia", |
| 665 | ":skia.h", |
| 666 | ] |
| 667 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 668 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 669 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 670 | # Targets guarded by skia_enable_tools may use //third_party freely. |
| 671 | if (skia_enable_tools) { |
| 672 | template("test_lib") { |
| 673 | config(target_name + "_config") { |
| 674 | include_dirs = invoker.public_include_dirs |
mtklein | a627b5c | 2016-09-20 13:36:47 -0700 | [diff] [blame] | 675 | if (defined(invoker.public_defines)) { |
| 676 | defines = invoker.public_defines |
| 677 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 678 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 679 | source_set(target_name) { |
| 680 | forward_variables_from(invoker, "*", [ "public_include_dirs" ]) |
| 681 | public_configs = [ |
| 682 | ":" + target_name + "_config", |
| 683 | ":skia_private", |
| 684 | ] |
| 685 | |
| 686 | if (!defined(deps)) { |
| 687 | deps = [] |
| 688 | } |
| 689 | deps += [ ":skia" ] |
| 690 | testonly = true |
| 691 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 692 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 693 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 694 | test_lib("gpu_tool_utils") { |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 695 | public_include_dirs = [] |
| 696 | if (skia_enable_gpu) { |
| 697 | public_defines = [] |
| 698 | public_include_dirs += [ "tools/gpu" ] |
mtklein | d68f9b0 | 2016-09-23 13:18:41 -0700 | [diff] [blame] | 699 | |
| 700 | deps = [] |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 701 | sources = [ |
| 702 | "tools/gpu/GrContextFactory.cpp", |
| 703 | "tools/gpu/GrTest.cpp", |
| 704 | "tools/gpu/TestContext.cpp", |
| 705 | "tools/gpu/gl/GLTestContext.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 706 | "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp", |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 707 | "tools/gpu/gl/debug/DebugGLTestContext.cpp", |
| 708 | "tools/gpu/gl/debug/GrBufferObj.cpp", |
| 709 | "tools/gpu/gl/debug/GrFrameBufferObj.cpp", |
| 710 | "tools/gpu/gl/debug/GrProgramObj.cpp", |
| 711 | "tools/gpu/gl/debug/GrShaderObj.cpp", |
| 712 | "tools/gpu/gl/debug/GrTextureObj.cpp", |
| 713 | "tools/gpu/gl/debug/GrTextureUnitObj.cpp", |
| 714 | "tools/gpu/gl/null/NullGLTestContext.cpp", |
| 715 | ] |
| 716 | libs = [] |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 717 | |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 718 | if (is_android) { |
| 719 | sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] |
| 720 | } else if (is_linux) { |
| 721 | sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] |
| 722 | } else if (is_mac) { |
| 723 | sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 724 | } else if (is_win) { |
| 725 | sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ] |
| 726 | libs += [ |
| 727 | "Gdi32.lib", |
| 728 | "OpenGL32.lib", |
| 729 | ] |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 730 | } |
mtklein | 6ef6999 | 2016-09-14 06:12:09 -0700 | [diff] [blame] | 731 | |
mtklein | d68f9b0 | 2016-09-23 13:18:41 -0700 | [diff] [blame] | 732 | if (skia_use_angle) { |
| 733 | public_defines += [ "SK_ANGLE" ] |
| 734 | deps += [ "//third_party/angle2" ] |
| 735 | sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ] |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 736 | } |
| 737 | if (skia_use_mesa) { |
| 738 | public_defines += [ "SK_MESA" ] |
| 739 | sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ] |
| 740 | libs += [ "OSMesa" ] |
| 741 | } |
mtklein | d68f9b0 | 2016-09-23 13:18:41 -0700 | [diff] [blame] | 742 | if (skia_use_vulkan) { |
| 743 | sources += [ "tools/gpu/vk/VkTestContext.cpp" ] |
| 744 | } |
mtklein | a627b5c | 2016-09-20 13:36:47 -0700 | [diff] [blame] | 745 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 746 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 747 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 748 | test_lib("flags") { |
| 749 | public_include_dirs = [ "tools/flags" ] |
| 750 | sources = [ |
| 751 | "tools/flags/SkCommandLineFlags.cpp", |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 752 | ] |
| 753 | } |
| 754 | test_lib("common_flags") { |
| 755 | public_include_dirs = [ "tools/flags" ] |
| 756 | sources = [ |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 757 | "tools/flags/SkCommonFlags.cpp", |
| 758 | "tools/flags/SkCommonFlagsConfig.cpp", |
| 759 | ] |
| 760 | deps = [ |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 761 | ":flags", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 762 | ":gpu_tool_utils", |
| 763 | ] |
| 764 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 765 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 766 | test_lib("tool_utils") { |
| 767 | public_include_dirs = [ |
| 768 | "tools", |
| 769 | "tools/debugger", |
| 770 | "tools/timer", |
| 771 | ] |
| 772 | sources = [ |
| 773 | "src/images/SkForceLinking.cpp", |
| 774 | "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to tools? |
mtklein | b37c034 | 2016-09-09 11:07:45 -0700 | [diff] [blame] | 775 | "tools/AndroidSkDebugToStdOut.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 776 | "tools/CrashHandler.cpp", |
mtklein | 0590fa5 | 2016-09-01 07:06:54 -0700 | [diff] [blame] | 777 | "tools/LsanSuppressions.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 778 | "tools/ProcStats.cpp", |
| 779 | "tools/Resources.cpp", |
| 780 | "tools/ThermalManager.cpp", |
| 781 | "tools/UrlDataManager.cpp", |
| 782 | "tools/debugger/SkDebugCanvas.cpp", |
| 783 | "tools/debugger/SkDrawCommand.cpp", |
| 784 | "tools/debugger/SkJsonWriteBuffer.cpp", |
| 785 | "tools/debugger/SkObjectParser.cpp", |
| 786 | "tools/debugger/SkOverdrawMode.cpp", |
| 787 | "tools/picture_utils.cpp", |
| 788 | "tools/random_parse_path.cpp", |
| 789 | "tools/sk_tool_utils.cpp", |
| 790 | "tools/sk_tool_utils_font.cpp", |
| 791 | "tools/timer/Timer.cpp", |
| 792 | ] |
| 793 | deps = [ |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 794 | ":common_flags", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 795 | ":flags", |
| 796 | "//third_party/libpng", |
| 797 | ] |
| 798 | public_deps = [ |
| 799 | "//third_party/jsoncpp", |
| 800 | ] |
| 801 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 802 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 803 | gm_sources = exec_script("gyp/find.py", |
| 804 | [ |
| 805 | "*.c*", |
| 806 | rebase_path("gm"), |
| 807 | ], |
| 808 | "list lines", |
| 809 | []) |
| 810 | test_lib("gm") { |
| 811 | public_include_dirs = [ "gm" ] |
| 812 | sources = gm_sources |
| 813 | deps = [ |
| 814 | ":gpu_tool_utils", |
| 815 | ":skia", |
| 816 | ":tool_utils", |
| 817 | ] |
| 818 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 819 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 820 | tests_sources = exec_script("gyp/find.py", |
| 821 | [ |
| 822 | "*.c*", |
| 823 | rebase_path("tests"), |
| 824 | ], |
| 825 | "list lines", |
| 826 | []) |
mtklein | 2f3416d | 2016-08-02 16:02:05 -0700 | [diff] [blame] | 827 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 828 | test_lib("tests") { |
| 829 | public_include_dirs = [ "tests" ] |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 830 | sources = tests_sources - [ |
| 831 | rebase_path("tests/PathOpsSkpClipTest.cpp"), # alternate main |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 832 | rebase_path("tests/SkpSkGrTest.cpp"), # doesn't compile |
| 833 | rebase_path("tests/skia_test.cpp"), # alternate main |
| 834 | ] |
| 835 | if (!fontmgr_android_enabled) { |
| 836 | sources -= [ rebase_path("tests/FontMgrAndroidParserTest.cpp") ] |
| 837 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 838 | deps = [ |
fmalita | 6cf896d | 2016-08-25 08:44:35 -0700 | [diff] [blame] | 839 | ":experimental_svg_model", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 840 | ":flags", |
| 841 | ":gpu_tool_utils", |
| 842 | ":skia", |
| 843 | ":tool_utils", |
| 844 | "//third_party/libpng", |
| 845 | "//third_party/zlib", |
| 846 | ] |
| 847 | } |
mtklein | 2f3416d | 2016-08-02 16:02:05 -0700 | [diff] [blame] | 848 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 849 | bench_sources = exec_script("gyp/find.py", |
| 850 | [ |
| 851 | "*.c*", |
| 852 | rebase_path("bench"), |
| 853 | ], |
| 854 | "list lines", |
| 855 | []) |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 856 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 857 | test_lib("bench") { |
| 858 | public_include_dirs = [ "bench" ] |
| 859 | sources = bench_sources |
| 860 | sources -= [ |
| 861 | rebase_path("bench/nanobench.cpp"), |
| 862 | rebase_path("bench/nanobenchAndroid.cpp"), |
| 863 | ] |
| 864 | deps = [ |
| 865 | ":flags", |
| 866 | ":gm", |
| 867 | ":gpu_tool_utils", |
| 868 | ":skia", |
| 869 | ":tool_utils", |
| 870 | ] |
| 871 | } |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 872 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 873 | test_lib("experimental_svg_model") { |
| 874 | public_include_dirs = [ "experimental/svg/model" ] |
| 875 | sources = [ |
| 876 | "experimental/svg/model/SkSVGAttribute.cpp", |
| 877 | "experimental/svg/model/SkSVGAttributeParser.cpp", |
| 878 | "experimental/svg/model/SkSVGCircle.cpp", |
| 879 | "experimental/svg/model/SkSVGContainer.cpp", |
| 880 | "experimental/svg/model/SkSVGDOM.cpp", |
| 881 | "experimental/svg/model/SkSVGEllipse.cpp", |
| 882 | "experimental/svg/model/SkSVGLine.cpp", |
fmalita | 28d5b72 | 2016-09-12 17:06:47 -0700 | [diff] [blame] | 883 | "experimental/svg/model/SkSVGLinearGradient.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 884 | "experimental/svg/model/SkSVGNode.cpp", |
| 885 | "experimental/svg/model/SkSVGPath.cpp", |
| 886 | "experimental/svg/model/SkSVGPoly.cpp", |
| 887 | "experimental/svg/model/SkSVGRect.cpp", |
| 888 | "experimental/svg/model/SkSVGRenderContext.cpp", |
| 889 | "experimental/svg/model/SkSVGSVG.cpp", |
| 890 | "experimental/svg/model/SkSVGShape.cpp", |
fmalita | 28d5b72 | 2016-09-12 17:06:47 -0700 | [diff] [blame] | 891 | "experimental/svg/model/SkSVGStop.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 892 | "experimental/svg/model/SkSVGTransformableNode.cpp", |
| 893 | "experimental/svg/model/SkSVGValue.cpp", |
| 894 | ] |
| 895 | deps = [ |
| 896 | ":skia", |
| 897 | ] |
| 898 | } |
fmalita | a2b9fdf | 2016-08-03 19:53:36 -0700 | [diff] [blame] | 899 | |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 900 | executable("dm") { |
| 901 | sources = [ |
| 902 | "dm/DM.cpp", |
| 903 | "dm/DMJsonWriter.cpp", |
| 904 | "dm/DMSrcSink.cpp", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 905 | ] |
| 906 | include_dirs = [ "tests" ] |
| 907 | deps = [ |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 908 | ":common_flags", |
fmalita | a2b9fdf | 2016-08-03 19:53:36 -0700 | [diff] [blame] | 909 | ":experimental_svg_model", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 910 | ":flags", |
| 911 | ":gm", |
| 912 | ":gpu_tool_utils", |
| 913 | ":skia", |
mtklein | 2f3416d | 2016-08-02 16:02:05 -0700 | [diff] [blame] | 914 | ":tests", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 915 | ":tool_utils", |
| 916 | "//third_party/jsoncpp", |
| 917 | "//third_party/libpng", |
| 918 | ] |
| 919 | testonly = true |
| 920 | } |
| 921 | |
Mike Klein | a343017 | 2016-09-27 16:46:29 -0400 | [diff] [blame] | 922 | if (!is_debug) { # I've benchmarked debug code once too many times... |
| 923 | executable("monobench") { |
| 924 | sources = [ |
| 925 | "tools/monobench.cpp", |
| 926 | ] |
| 927 | deps = [ |
| 928 | ":bench", |
| 929 | ":skia", |
| 930 | ] |
| 931 | testonly = true |
| 932 | } |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 933 | } |
| 934 | |
| 935 | executable("nanobench") { |
| 936 | sources = [ |
| 937 | "bench/nanobench.cpp", |
| 938 | ] |
| 939 | deps = [ |
| 940 | ":bench", |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 941 | ":common_flags", |
fmalita | 6519c21 | 2016-09-14 08:05:17 -0700 | [diff] [blame] | 942 | ":experimental_svg_model", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 943 | ":flags", |
| 944 | ":gm", |
| 945 | ":gpu_tool_utils", |
| 946 | ":skia", |
| 947 | ":tool_utils", |
| 948 | "//third_party/jsoncpp", |
| 949 | ] |
| 950 | testonly = true |
| 951 | } |
halcanary | 19a9720 | 2016-08-03 15:08:04 -0700 | [diff] [blame] | 952 | |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 953 | if (skia_enable_gpu) { |
| 954 | executable("skpbench") { |
| 955 | sources = [ |
| 956 | "tools/skpbench/skpbench.cpp", |
| 957 | ] |
| 958 | deps = [ |
| 959 | ":flags", |
| 960 | ":gpu_tool_utils", |
| 961 | ":skia", |
| 962 | ":tool_utils", |
| 963 | ] |
| 964 | testonly = true |
| 965 | } |
csmartdalton | 4b5179b | 2016-09-19 11:03:58 -0700 | [diff] [blame] | 966 | } |
| 967 | |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 968 | # We can't yet build ICU on Windows. |
Mike Klein | 768bdfc | 2016-10-11 19:59:22 -0400 | [diff] [blame] | 969 | if (!is_win) { |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 970 | executable("sktexttopdf-hb") { |
mtklein | 6f5df6a | 2016-08-29 16:01:10 -0700 | [diff] [blame] | 971 | sources = [ |
| 972 | "tools/SkShaper_harfbuzz.cpp", |
| 973 | "tools/using_skia_and_harfbuzz.cpp", |
| 974 | ] |
| 975 | deps = [ |
| 976 | ":skia", |
| 977 | "//third_party/harfbuzz", |
| 978 | ] |
| 979 | testonly = true |
| 980 | } |
halcanary | 19a9720 | 2016-08-03 15:08:04 -0700 | [diff] [blame] | 981 | } |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 982 | executable("sktexttopdf") { |
| 983 | sources = [ |
| 984 | "tools/SkShaper_primitive.cpp", |
| 985 | "tools/using_skia_and_harfbuzz.cpp", |
| 986 | ] |
| 987 | deps = [ |
| 988 | ":skia", |
| 989 | ] |
| 990 | testonly = true |
| 991 | } |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 992 | |
| 993 | executable("get_images_from_skps") { |
| 994 | sources = [ |
| 995 | "tools/get_images_from_skps.cpp", |
| 996 | ] |
| 997 | deps = [ |
| 998 | ":flags", |
| 999 | ":skia", |
| 1000 | "//third_party/jsoncpp", |
| 1001 | ] |
| 1002 | testonly = true |
| 1003 | } |
mtklein | ecbc526 | 2016-09-22 11:51:24 -0700 | [diff] [blame] | 1004 | |
| 1005 | executable("skiaserve") { |
| 1006 | sources = [ |
| 1007 | "tools/skiaserve/Request.cpp", |
| 1008 | "tools/skiaserve/Response.cpp", |
| 1009 | "tools/skiaserve/skiaserve.cpp", |
| 1010 | "tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp", |
| 1011 | "tools/skiaserve/urlhandlers/BatchesHandler.cpp", |
| 1012 | "tools/skiaserve/urlhandlers/BreakHandler.cpp", |
| 1013 | "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp", |
| 1014 | "tools/skiaserve/urlhandlers/CmdHandler.cpp", |
| 1015 | "tools/skiaserve/urlhandlers/ColorModeHandler.cpp", |
| 1016 | "tools/skiaserve/urlhandlers/DataHandler.cpp", |
| 1017 | "tools/skiaserve/urlhandlers/DownloadHandler.cpp", |
| 1018 | "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp", |
| 1019 | "tools/skiaserve/urlhandlers/ImgHandler.cpp", |
| 1020 | "tools/skiaserve/urlhandlers/InfoHandler.cpp", |
| 1021 | "tools/skiaserve/urlhandlers/PostHandler.cpp", |
| 1022 | "tools/skiaserve/urlhandlers/QuitHandler.cpp", |
| 1023 | "tools/skiaserve/urlhandlers/RootHandler.cpp", |
| 1024 | ] |
| 1025 | deps = [ |
| 1026 | ":flags", |
| 1027 | ":gpu_tool_utils", |
| 1028 | ":skia", |
| 1029 | ":tool_utils", |
| 1030 | "//third_party/jsoncpp", |
| 1031 | "//third_party/libmicrohttpd", |
| 1032 | "//third_party/libpng", |
| 1033 | ] |
| 1034 | testonly = true |
| 1035 | } |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1036 | |
| 1037 | executable("fuzz") { |
| 1038 | sources = [ |
| 1039 | "fuzz/FilterFuzz.cpp", |
| 1040 | "fuzz/FuzzGradients.cpp", |
| 1041 | "fuzz/FuzzParsePath.cpp", |
| 1042 | "fuzz/FuzzPathop.cpp", |
| 1043 | "fuzz/FuzzScaleToSides.cpp", |
| 1044 | "fuzz/fuzz.cpp", |
| 1045 | ] |
| 1046 | deps = [ |
| 1047 | ":flags", |
| 1048 | ":skia", |
| 1049 | ] |
| 1050 | testonly = true |
| 1051 | } |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 1052 | |
| 1053 | executable("dump_record") { |
| 1054 | sources = [ |
| 1055 | "tools/DumpRecord.cpp", |
| 1056 | "tools/dump_record.cpp", |
| 1057 | ] |
| 1058 | deps = [ |
| 1059 | ":flags", |
| 1060 | ":skia", |
| 1061 | ] |
| 1062 | testonly = true |
| 1063 | } |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 1064 | |
| 1065 | executable("skdiff") { |
| 1066 | sources = [ |
| 1067 | "tools/skdiff/skdiff.cpp", |
| 1068 | "tools/skdiff/skdiff_html.cpp", |
| 1069 | "tools/skdiff/skdiff_main.cpp", |
| 1070 | "tools/skdiff/skdiff_utils.cpp", |
| 1071 | ] |
| 1072 | deps = [ |
| 1073 | ":skia", |
| 1074 | ":tool_utils", |
| 1075 | ] |
| 1076 | testonly = true |
| 1077 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1078 | } |