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 | |
| 6 | declare_args() { |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 7 | skia_enable_tools = !is_fuchsia && !is_component_build |
| 8 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 9 | skia_use_expat = true |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 10 | skia_use_fontconfig = is_linux |
| 11 | skia_use_freetype = is_android || is_linux |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 12 | skia_use_giflib = !is_fuchsia |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 13 | skia_use_libjpeg_turbo = true |
| 14 | skia_use_libpng = true |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 15 | skia_use_libwebp = !is_fuchsia |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 16 | skia_use_sfntly = !is_fuchsia |
| 17 | skia_use_zlib = true |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 18 | } |
| 19 | |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 20 | fontmgr_android_enabled = skia_use_expat && skia_use_freetype |
| 21 | |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 22 | skia_public_includes = [ |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 23 | "include/android", |
mtklein | fa84d94 | 2016-07-28 09:45:14 -0700 | [diff] [blame] | 24 | "include/c", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 25 | "include/codec", |
| 26 | "include/config", |
| 27 | "include/core", |
| 28 | "include/effects", |
| 29 | "include/gpu", |
| 30 | "include/gpu/gl", |
| 31 | "include/images", |
| 32 | "include/pathops", |
| 33 | "include/ports", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 34 | "include/svg", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 35 | "include/utils", |
| 36 | "include/utils/mac", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 37 | "include/xml", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 38 | ] |
| 39 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 40 | # Skia public API, generally provided by :skia. |
| 41 | config("skia_public") { |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 42 | include_dirs = skia_public_includes |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 43 | defines = [ "SKIA_DLL" ] |
jcgregorio | 5561e3d | 2016-08-25 09:25:11 -0700 | [diff] [blame] | 44 | if (is_linux) { |
| 45 | defines += [ "SK_SAMPLES_FOR_X" ] |
| 46 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | # Skia internal APIs, used by Skia itself and a few test tools. |
| 50 | config("skia_private") { |
| 51 | visibility = [ ":*" ] |
| 52 | |
| 53 | include_dirs = [ |
| 54 | "include/private", |
| 55 | "src/c", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 56 | "src/codec", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 57 | "src/config", |
| 58 | "src/core", |
| 59 | "src/effects", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 60 | "src/effects/gradients", |
| 61 | "src/fonts", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 62 | "src/gpu", |
| 63 | "src/image", |
| 64 | "src/images", |
| 65 | "src/lazy", |
| 66 | "src/opts", |
| 67 | "src/pathops", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 68 | "src/pdf", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 69 | "src/ports", |
| 70 | "src/sfnt", |
| 71 | "src/utils", |
mtklein | 7a1f45f | 2016-08-04 06:19:33 -0700 | [diff] [blame] | 72 | "src/utils/win", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 73 | "third_party/etc1", |
| 74 | "third_party/ktx", |
| 75 | ] |
mtklein | 150d113 | 2016-08-01 06:56:40 -0700 | [diff] [blame] | 76 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 77 | defines = [ "SK_GAMMA_APPLY_TO_A8" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | # Any code that's linked into Skia-the-library should use this config via += skia_library_configs. |
| 81 | config("skia_library") { |
| 82 | visibility = [ ":*" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 83 | defines = [ "SKIA_IMPLEMENTATION=1" ] |
| 84 | } |
| 85 | |
| 86 | skia_library_configs = [ |
| 87 | ":skia_public", |
| 88 | ":skia_private", |
| 89 | ":skia_library", |
| 90 | ] |
| 91 | |
mtklein | 7fbfbbe | 2016-07-21 12:25:45 -0700 | [diff] [blame] | 92 | core_gypi = exec_script("gn/gypi_to_gn.py", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 93 | [ |
| 94 | rebase_path("gyp/core.gypi"), |
| 95 | "--replace=<(skia_include_path)=include", |
| 96 | "--replace=<(skia_src_path)=src", |
| 97 | ], |
| 98 | "scope", |
| 99 | [ "gyp/core.gypi" ]) |
| 100 | |
mtklein | 7fbfbbe | 2016-07-21 12:25:45 -0700 | [diff] [blame] | 101 | effects_gypi = exec_script("gn/gypi_to_gn.py", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 102 | [ |
| 103 | rebase_path("gyp/effects.gypi"), |
| 104 | "--replace=<(skia_include_path)=include", |
| 105 | "--replace=<(skia_src_path)=src", |
| 106 | ], |
| 107 | "scope", |
| 108 | [ "gyp/effects.gypi" ]) |
| 109 | |
mtklein | 7fbfbbe | 2016-07-21 12:25:45 -0700 | [diff] [blame] | 110 | gpu_gypi = exec_script("gn/gypi_to_gn.py", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 111 | [ |
| 112 | rebase_path("gyp/gpu.gypi"), |
| 113 | "--replace=<(skia_include_path)=include", |
| 114 | "--replace=<(skia_src_path)=src", |
| 115 | ], |
| 116 | "scope", |
| 117 | [ "gyp/gpu.gypi" ]) |
| 118 | |
mtklein | 7fbfbbe | 2016-07-21 12:25:45 -0700 | [diff] [blame] | 119 | opts_gypi = exec_script("gn/gypi_to_gn.py", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 120 | [ |
| 121 | rebase_path("gyp/opts.gypi"), |
| 122 | "--replace=<(skia_include_path)=include", |
| 123 | "--replace=<(skia_src_path)=src", |
| 124 | ], |
| 125 | "scope", |
| 126 | [ "gyp/opts.gypi" ]) |
| 127 | |
mtklein | 7fbfbbe | 2016-07-21 12:25:45 -0700 | [diff] [blame] | 128 | pdf_gypi = exec_script("gn/gypi_to_gn.py", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 129 | [ |
| 130 | rebase_path("gyp/pdf.gypi"), |
| 131 | "--replace=<(skia_include_path)=include", |
| 132 | "--replace=<(skia_src_path)=src", |
| 133 | ], |
| 134 | "scope", |
| 135 | [ "gyp/pdf.gypi" ]) |
| 136 | |
mtklein | 7fbfbbe | 2016-07-21 12:25:45 -0700 | [diff] [blame] | 137 | utils_gypi = exec_script("gn/gypi_to_gn.py", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 138 | [ |
| 139 | rebase_path("gyp/utils.gypi"), |
| 140 | "--replace=<(skia_include_path)=include", |
| 141 | "--replace=<(skia_src_path)=src", |
| 142 | ], |
| 143 | "scope", |
| 144 | [ "gyp/utils.gypi" ]) |
| 145 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 146 | # Use for CPU-specific Skia code that needs particular compiler flags. |
| 147 | template("opts") { |
| 148 | if (invoker.enabled) { |
| 149 | source_set(target_name) { |
| 150 | forward_variables_from(invoker, "*") |
| 151 | configs += skia_library_configs |
| 152 | } |
| 153 | } else { |
| 154 | # If not enabled, a phony empty target that swallows all otherwise unused variables. |
| 155 | source_set(target_name) { |
| 156 | forward_variables_from(invoker, |
| 157 | "*", |
| 158 | [ |
| 159 | "sources", |
| 160 | "cflags", |
| 161 | ]) |
| 162 | } |
| 163 | } |
anmittal | a7eaf2e | 2016-08-17 13:57:26 -0700 | [diff] [blame] | 164 | } |
| 165 | |
mtklein | 422310d | 2016-08-16 18:28:43 -0700 | [diff] [blame] | 166 | is_x86 = current_cpu == "x64" || current_cpu == "x86" |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 167 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 168 | opts("none") { |
| 169 | enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64" |
| 170 | sources = opts_gypi.none_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 171 | cflags = [] |
| 172 | } |
| 173 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 174 | opts("armv7") { |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 175 | enabled = current_cpu == "arm" |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 176 | sources = opts_gypi.armv7_sources + opts_gypi.neon_sources |
| 177 | cflags = [] |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 178 | } |
| 179 | |
| 180 | opts("arm64") { |
| 181 | enabled = current_cpu == "arm64" |
| 182 | sources = opts_gypi.arm64_sources |
| 183 | cflags = [] |
| 184 | } |
| 185 | |
| 186 | opts("crc32") { |
| 187 | enabled = current_cpu == "arm64" |
| 188 | sources = opts_gypi.crc32_sources |
| 189 | cflags = [ "-march=armv8-a+crc" ] |
| 190 | } |
| 191 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 192 | opts("sse2") { |
| 193 | enabled = is_x86 |
| 194 | sources = opts_gypi.sse2_sources |
| 195 | cflags = [ "-msse2" ] |
| 196 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 197 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 198 | opts("ssse3") { |
| 199 | enabled = is_x86 |
| 200 | sources = opts_gypi.ssse3_sources |
| 201 | cflags = [ "-mssse3" ] |
| 202 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 203 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 204 | opts("sse41") { |
| 205 | enabled = is_x86 |
| 206 | sources = opts_gypi.sse41_sources |
| 207 | cflags = [ "-msse4.1" ] |
| 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 |
| 212 | sources = opts_gypi.sse42_sources |
| 213 | cflags = [ "-msse4.2" ] |
| 214 | } |
| 215 | |
| 216 | opts("avx") { |
| 217 | enabled = is_x86 |
| 218 | sources = opts_gypi.avx_sources |
| 219 | cflags = [ "-mavx" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 220 | } |
| 221 | |
mtklein | 349cece | 2016-08-26 08:13:04 -0700 | [diff] [blame] | 222 | opts("dsp") { |
| 223 | enabled = current_cpu == "mipsel" |
| 224 | sources = opts_gypi.mips_dsp_sources |
| 225 | cflags = [ "-Wno-deprecated-register" ] # FIXME |
| 226 | } |
| 227 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 228 | # 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] | 229 | template("optional") { |
| 230 | if (invoker.enabled) { |
| 231 | config(target_name + "_public") { |
| 232 | defines = invoker.public_defines |
| 233 | } |
| 234 | source_set(target_name) { |
| 235 | forward_variables_from(invoker, "*", [ "public_defines" ]) |
| 236 | all_dependent_configs = [ ":" + target_name + "_public" ] |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 237 | configs += skia_library_configs |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 238 | } |
| 239 | } else { |
| 240 | # If not enabled, a phony empty target that swallows all otherwise unused variables. |
| 241 | source_set(target_name) { |
| 242 | forward_variables_from(invoker, |
| 243 | "*", |
| 244 | [ |
| 245 | "public_defines", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 246 | "deps", |
| 247 | "sources", |
| 248 | ]) |
| 249 | } |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 250 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 251 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 252 | |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 253 | optional("fontmgr_android") { |
| 254 | enabled = fontmgr_android_enabled |
| 255 | public_defines = [] |
| 256 | |
| 257 | deps = [ |
| 258 | "//third_party/expat", |
| 259 | "//third_party/freetype2", |
| 260 | ] |
| 261 | sources = [ |
| 262 | "src/ports/SkFontMgr_android.cpp", |
| 263 | "src/ports/SkFontMgr_android_factory.cpp", |
| 264 | "src/ports/SkFontMgr_android_parser.cpp", |
| 265 | ] |
| 266 | } |
| 267 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 268 | optional("fontmgr_fontconfig") { |
| 269 | enabled = skia_use_freetype && skia_use_fontconfig |
| 270 | public_defines = [] |
| 271 | |
| 272 | deps = [ |
| 273 | "//third_party:fontconfig", |
| 274 | "//third_party/freetype2", |
| 275 | ] |
| 276 | sources = [ |
| 277 | "src/ports/SkFontConfigInterface_direct.cpp", |
| 278 | "src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 279 | "src/ports/SkFontMgr_FontConfigInterface.cpp", |
| 280 | "src/ports/SkFontMgr_fontconfig.cpp", |
| 281 | "src/ports/SkFontMgr_fontconfig_factory.cpp", |
| 282 | ] |
| 283 | } |
| 284 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 285 | optional("gif") { |
| 286 | enabled = skia_use_giflib |
| 287 | public_defines = [ "SK_HAS_GIF_LIBRARY" ] |
| 288 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 289 | deps = [ |
| 290 | "//third_party/giflib", |
| 291 | ] |
| 292 | sources = [ |
| 293 | "src/codec/SkGifCodec.cpp", |
| 294 | ] |
| 295 | } |
| 296 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 297 | optional("jpeg") { |
| 298 | enabled = skia_use_libjpeg_turbo |
| 299 | public_defines = [ "SK_HAS_JPEG_LIBRARY" ] |
| 300 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 301 | deps = [ |
| 302 | "//third_party/libjpeg-turbo:libjpeg", |
| 303 | ] |
| 304 | sources = [ |
| 305 | "src/codec/SkJpegCodec.cpp", |
| 306 | "src/codec/SkJpegDecoderMgr.cpp", |
| 307 | "src/codec/SkJpegUtility.cpp", |
| 308 | "src/images/SkJPEGImageEncoder.cpp", |
| 309 | "src/images/SkJPEGWriteUtility.cpp", |
| 310 | ] |
| 311 | } |
| 312 | |
| 313 | optional("pdf") { |
| 314 | enabled = skia_use_zlib |
| 315 | public_defines = [] |
| 316 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 317 | deps = [ |
| 318 | "//third_party/zlib", |
| 319 | ] |
| 320 | sources = pdf_gypi.sources |
| 321 | |
| 322 | if (skia_use_sfntly) { |
| 323 | deps += [ "//third_party/sfntly" ] |
halcanary | 650e20d | 2016-08-25 09:07:02 -0700 | [diff] [blame] | 324 | public_defines += [ "SK_PDF_USE_SFNTLY" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 325 | } |
| 326 | } |
| 327 | |
| 328 | optional("png") { |
| 329 | enabled = skia_use_libpng |
| 330 | public_defines = [ "SK_HAS_PNG_LIBRARY" ] |
| 331 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 332 | deps = [ |
| 333 | "//third_party/libpng", |
| 334 | ] |
| 335 | sources = [ |
| 336 | "src/codec/SkIcoCodec.cpp", |
| 337 | "src/codec/SkPngCodec.cpp", |
| 338 | "src/images/SkPNGImageEncoder.cpp", |
| 339 | ] |
| 340 | } |
| 341 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 342 | optional("typeface_freetype") { |
| 343 | enabled = skia_use_freetype |
| 344 | public_defines = [] |
| 345 | |
| 346 | deps = [ |
| 347 | "//third_party/freetype2", |
| 348 | ] |
| 349 | sources = [ |
| 350 | "src/ports/SkFontHost_FreeType.cpp", |
| 351 | "src/ports/SkFontHost_FreeType_common.cpp", |
| 352 | ] |
| 353 | } |
| 354 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 355 | optional("webp") { |
| 356 | enabled = skia_use_libwebp |
| 357 | public_defines = [ "SK_HAS_WEBP_LIBRARY" ] |
| 358 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 359 | deps = [ |
| 360 | "//third_party/libwebp", |
| 361 | ] |
| 362 | sources = [ |
| 363 | "src/codec/SkWebpAdapterCodec.cpp", |
| 364 | "src/codec/SkWebpCodec.cpp", |
| 365 | "src/images/SkWEBPImageEncoder.cpp", |
| 366 | ] |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 367 | } |
| 368 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 369 | optional("xml") { |
| 370 | enabled = skia_use_expat |
| 371 | public_defines = [] |
| 372 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 373 | deps = [ |
| 374 | "//third_party/expat", |
| 375 | ] |
| 376 | sources = [ |
| 377 | "src/xml/SkDOM.cpp", |
| 378 | "src/xml/SkXMLParser.cpp", |
| 379 | "src/xml/SkXMLWriter.cpp", |
| 380 | ] |
| 381 | } |
| 382 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 383 | component("skia") { |
| 384 | public_configs = [ ":skia_public" ] |
| 385 | configs += skia_library_configs |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 386 | |
| 387 | deps = [ |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 388 | ":arm64", |
| 389 | ":armv7", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 390 | ":avx", |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 391 | ":crc32", |
mtklein | 349cece | 2016-08-26 08:13:04 -0700 | [diff] [blame] | 392 | ":dsp", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 393 | ":fontmgr_android", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 394 | ":fontmgr_fontconfig", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 395 | ":gif", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 396 | ":jpeg", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 397 | ":none", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 398 | ":pdf", |
| 399 | ":png", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 400 | ":sse2", |
| 401 | ":sse41", |
| 402 | ":sse42", |
| 403 | ":ssse3", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 404 | ":typeface_freetype", |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 405 | ":webp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 406 | ":xml", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 407 | ] |
| 408 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 409 | sources = [] |
| 410 | sources += core_gypi.sources |
| 411 | sources += effects_gypi.sources |
| 412 | sources += gpu_gypi.skgpu_sources |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 413 | sources += utils_gypi.sources |
| 414 | sources += [ |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 415 | "src/android/SkBitmapRegionCodec.cpp", |
| 416 | "src/android/SkBitmapRegionDecoder.cpp", |
| 417 | "src/codec/SkAndroidCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 418 | "src/codec/SkBmpCodec.cpp", |
| 419 | "src/codec/SkBmpMaskCodec.cpp", |
| 420 | "src/codec/SkBmpRLECodec.cpp", |
| 421 | "src/codec/SkBmpStandardCodec.cpp", |
| 422 | "src/codec/SkCodec.cpp", |
| 423 | "src/codec/SkCodecImageGenerator.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 424 | "src/codec/SkMaskSwizzler.cpp", |
| 425 | "src/codec/SkMasks.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 426 | "src/codec/SkSampledCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 427 | "src/codec/SkSampler.cpp", |
| 428 | "src/codec/SkSwizzler.cpp", |
| 429 | "src/codec/SkWbmpCodec.cpp", |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 430 | "src/gpu/gl/GrGLDefaultInterface_native.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 431 | "src/images/SkImageEncoder.cpp", |
| 432 | "src/images/SkImageEncoder_Factory.cpp", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 433 | "src/images/SkKTXImageEncoder.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 434 | "src/ports/SkDiscardableMemory_none.cpp", |
| 435 | "src/ports/SkGlobalInitialization_default.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 436 | "src/ports/SkImageGenerator_skia.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 437 | "src/ports/SkMemory_malloc.cpp", |
| 438 | "src/ports/SkOSFile_stdio.cpp", |
| 439 | "src/sfnt/SkOTTable_name.cpp", |
| 440 | "src/sfnt/SkOTUtils.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 441 | "src/svg/SkSVGCanvas.cpp", |
| 442 | "src/svg/SkSVGDevice.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 443 | "src/utils/mac/SkStream_mac.cpp", |
| 444 | "third_party/etc1/etc1.cpp", |
| 445 | "third_party/ktx/ktx.cpp", |
| 446 | ] |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 447 | sources -= [ |
| 448 | "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", |
| 449 | "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
| 450 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 451 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 452 | libs = [] |
| 453 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 454 | if (is_win) { |
| 455 | sources += [ |
| 456 | "src/ports/SkDebug_win.cpp", |
| 457 | "src/ports/SkFontHost_win.cpp", |
| 458 | "src/ports/SkFontMgr_win_dw.cpp", |
| 459 | "src/ports/SkFontMgr_win_dw_factory.cpp", |
| 460 | "src/ports/SkImageEncoder_WIC.cpp", |
| 461 | "src/ports/SkImageGeneratorWIC.cpp", |
| 462 | "src/ports/SkOSFile_win.cpp", |
| 463 | "src/ports/SkScalerContext_win_dw.cpp", |
| 464 | "src/ports/SkTLS_win.cpp", |
| 465 | "src/ports/SkTypeface_win_dw.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 466 | "src/xps/SkDocument_XPS.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 467 | ] |
mtklein | 7a1f45f | 2016-08-04 06:19:33 -0700 | [diff] [blame] | 468 | sources -= [ "src/utils/SkThreadUtils_pthread.cpp" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 469 | } else { |
| 470 | sources += [ |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 471 | "src/ports/SkOSFile_posix.cpp", |
| 472 | "src/ports/SkTLS_pthread.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 473 | "src/xps/SkDocument_XPS_None.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 474 | ] |
| 475 | } |
| 476 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 477 | if (is_android) { |
| 478 | deps += [ |
| 479 | "//third_party/cpu-features", |
| 480 | "//third_party/expat", |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 481 | ] |
| 482 | sources += [ |
| 483 | "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp", |
| 484 | "src/ports/SkDebug_android.cpp", |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 485 | ] |
| 486 | libs += [ |
| 487 | "EGL", |
| 488 | "GLESv2", |
| 489 | "log", |
| 490 | ] |
| 491 | } |
| 492 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 493 | if (is_linux) { |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 494 | libs += [ |
| 495 | "GL", |
| 496 | "GLU", |
| 497 | "X11", |
| 498 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 499 | sources += [ |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 500 | "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp", |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 501 | "src/ports/SkDebug_stdio.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 502 | ] |
| 503 | } |
| 504 | |
| 505 | if (is_mac) { |
| 506 | sources += [ |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 507 | "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp", |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 508 | "src/ports/SkDebug_stdio.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 509 | "src/ports/SkFontHost_mac.cpp", |
| 510 | "src/ports/SkImageEncoder_CG.cpp", |
| 511 | "src/ports/SkImageGeneratorCG.cpp", |
| 512 | ] |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 513 | libs += [ |
| 514 | "ApplicationServices.framework", |
| 515 | "OpenGL.framework", |
| 516 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 517 | } |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 518 | |
| 519 | if (is_fuchsia) { |
mtklein | 2ff47c2 | 2016-08-24 10:27:13 -0700 | [diff] [blame] | 520 | sources += [ |
| 521 | "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 522 | "src/ports/SkDebug_stdio.cpp", |
mtklein | 2ff47c2 | 2016-08-24 10:27:13 -0700 | [diff] [blame] | 523 | "src/ports/SkFontMgr_empty_factory.cpp", |
| 524 | ] |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 525 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 526 | } |
| 527 | |
mtklein | ada5a44 | 2016-08-02 14:28:26 -0700 | [diff] [blame] | 528 | skia_h_headers = exec_script("gyp/find.py", |
| 529 | [ "*.h" ] + rebase_path(skia_public_includes), |
| 530 | "list lines", |
| 531 | []) - |
| 532 | [ |
| 533 | rebase_path("include/gpu/gl/GrGLConfig_chrome.h"), |
| 534 | rebase_path("include/gpu/vk/GrVkBackendContext.h"), |
| 535 | rebase_path("include/gpu/vk/GrVkDefines.h"), |
| 536 | rebase_path("include/gpu/vk/GrVkInterface.h"), |
| 537 | rebase_path("include/gpu/vk/GrVkTypes.h"), |
| 538 | rebase_path("include/ports/SkFontMgr_fontconfig.h"), |
| 539 | ] |
| 540 | |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 541 | action("skia.h") { |
| 542 | script = "gn/echo_headers.py" |
| 543 | args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] + |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 544 | rebase_path(skia_h_headers, target_gen_dir) |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 545 | outputs = [ |
| 546 | "$target_gen_dir/skia.h", |
| 547 | ] |
| 548 | } |
| 549 | |
| 550 | executable("fiddle") { |
| 551 | include_dirs = [ "$target_gen_dir" ] |
mtklein | 7d10b9f | 2016-07-27 11:17:18 -0700 | [diff] [blame] | 552 | libs = [] |
| 553 | if (is_linux) { |
| 554 | libs += [ "OSMesa" ] |
| 555 | } |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 556 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 557 | sources = [ |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 558 | "src/images/SkForceLinking.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 559 | "tools/fiddle/draw.cpp", |
| 560 | "tools/fiddle/fiddle_main.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 561 | ] |
| 562 | deps = [ |
| 563 | ":skia", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 564 | ":skia.h", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 565 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 566 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 567 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 568 | # Targets guarded by skia_enable_tools may use //third_party freely. |
| 569 | if (skia_enable_tools) { |
| 570 | template("test_lib") { |
| 571 | config(target_name + "_config") { |
| 572 | include_dirs = invoker.public_include_dirs |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 573 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 574 | source_set(target_name) { |
| 575 | forward_variables_from(invoker, "*", [ "public_include_dirs" ]) |
| 576 | public_configs = [ |
| 577 | ":" + target_name + "_config", |
| 578 | ":skia_private", |
| 579 | ] |
| 580 | |
| 581 | if (!defined(deps)) { |
| 582 | deps = [] |
| 583 | } |
| 584 | deps += [ ":skia" ] |
| 585 | testonly = true |
| 586 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 587 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 588 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 589 | test_lib("gpu_tool_utils") { |
| 590 | public_include_dirs = [ "tools/gpu" ] |
| 591 | sources = [ |
| 592 | "tools/gpu/GrContextFactory.cpp", |
| 593 | "tools/gpu/GrTest.cpp", |
| 594 | "tools/gpu/TestContext.cpp", |
| 595 | "tools/gpu/gl/GLTestContext.cpp", |
| 596 | "tools/gpu/gl/debug/DebugGLTestContext.cpp", |
| 597 | "tools/gpu/gl/debug/GrBufferObj.cpp", |
| 598 | "tools/gpu/gl/debug/GrFrameBufferObj.cpp", |
| 599 | "tools/gpu/gl/debug/GrProgramObj.cpp", |
| 600 | "tools/gpu/gl/debug/GrShaderObj.cpp", |
| 601 | "tools/gpu/gl/debug/GrTextureObj.cpp", |
| 602 | "tools/gpu/gl/debug/GrTextureUnitObj.cpp", |
| 603 | "tools/gpu/gl/null/NullGLTestContext.cpp", |
| 604 | ] |
| 605 | libs = [] |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 606 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 607 | if (is_android) { |
| 608 | sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] |
| 609 | } else if (is_linux) { |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 610 | sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] |
| 611 | } else if (is_mac) { |
| 612 | sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] |
| 613 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 614 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 615 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 616 | test_lib("flags") { |
| 617 | public_include_dirs = [ "tools/flags" ] |
| 618 | sources = [ |
| 619 | "tools/flags/SkCommandLineFlags.cpp", |
| 620 | "tools/flags/SkCommonFlags.cpp", |
| 621 | "tools/flags/SkCommonFlagsConfig.cpp", |
| 622 | ] |
| 623 | deps = [ |
| 624 | ":gpu_tool_utils", |
| 625 | ] |
| 626 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 627 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 628 | test_lib("tool_utils") { |
| 629 | public_include_dirs = [ |
| 630 | "tools", |
| 631 | "tools/debugger", |
| 632 | "tools/timer", |
| 633 | ] |
| 634 | sources = [ |
| 635 | "src/images/SkForceLinking.cpp", |
| 636 | "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to tools? |
| 637 | "tools/CrashHandler.cpp", |
| 638 | "tools/ProcStats.cpp", |
| 639 | "tools/Resources.cpp", |
| 640 | "tools/ThermalManager.cpp", |
| 641 | "tools/UrlDataManager.cpp", |
| 642 | "tools/debugger/SkDebugCanvas.cpp", |
| 643 | "tools/debugger/SkDrawCommand.cpp", |
| 644 | "tools/debugger/SkJsonWriteBuffer.cpp", |
| 645 | "tools/debugger/SkObjectParser.cpp", |
| 646 | "tools/debugger/SkOverdrawMode.cpp", |
| 647 | "tools/picture_utils.cpp", |
| 648 | "tools/random_parse_path.cpp", |
| 649 | "tools/sk_tool_utils.cpp", |
| 650 | "tools/sk_tool_utils_font.cpp", |
| 651 | "tools/timer/Timer.cpp", |
| 652 | ] |
| 653 | deps = [ |
| 654 | ":flags", |
| 655 | "//third_party/libpng", |
| 656 | ] |
| 657 | public_deps = [ |
| 658 | "//third_party/jsoncpp", |
| 659 | ] |
| 660 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 661 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 662 | gm_sources = exec_script("gyp/find.py", |
| 663 | [ |
| 664 | "*.c*", |
| 665 | rebase_path("gm"), |
| 666 | ], |
| 667 | "list lines", |
| 668 | []) |
| 669 | test_lib("gm") { |
| 670 | public_include_dirs = [ "gm" ] |
| 671 | sources = gm_sources |
| 672 | deps = [ |
| 673 | ":gpu_tool_utils", |
| 674 | ":skia", |
| 675 | ":tool_utils", |
| 676 | ] |
| 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 | tests_sources = exec_script("gyp/find.py", |
| 680 | [ |
| 681 | "*.c*", |
| 682 | rebase_path("tests"), |
| 683 | ], |
| 684 | "list lines", |
| 685 | []) |
mtklein | 2f3416d | 2016-08-02 16:02:05 -0700 | [diff] [blame] | 686 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 687 | test_lib("tests") { |
| 688 | public_include_dirs = [ "tests" ] |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 689 | sources = tests_sources - [ |
| 690 | rebase_path("tests/PathOpsSkpClipTest.cpp"), # alternate main |
| 691 | rebase_path("tests/SkSLErrorTest.cpp"), # TODO: make work |
| 692 | rebase_path("tests/SkSLGLSLTest.cpp"), # TODO: make work |
| 693 | rebase_path("tests/SkpSkGrTest.cpp"), # doesn't compile |
| 694 | rebase_path("tests/skia_test.cpp"), # alternate main |
| 695 | ] |
| 696 | if (!fontmgr_android_enabled) { |
| 697 | sources -= [ rebase_path("tests/FontMgrAndroidParserTest.cpp") ] |
| 698 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 699 | deps = [ |
fmalita | 6cf896d | 2016-08-25 08:44:35 -0700 | [diff] [blame] | 700 | ":experimental_svg_model", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 701 | ":flags", |
| 702 | ":gpu_tool_utils", |
| 703 | ":skia", |
| 704 | ":tool_utils", |
| 705 | "//third_party/libpng", |
| 706 | "//third_party/zlib", |
| 707 | ] |
| 708 | } |
mtklein | 2f3416d | 2016-08-02 16:02:05 -0700 | [diff] [blame] | 709 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 710 | bench_sources = exec_script("gyp/find.py", |
| 711 | [ |
| 712 | "*.c*", |
| 713 | rebase_path("bench"), |
| 714 | ], |
| 715 | "list lines", |
| 716 | []) |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 717 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 718 | test_lib("bench") { |
| 719 | public_include_dirs = [ "bench" ] |
| 720 | sources = bench_sources |
| 721 | sources -= [ |
| 722 | rebase_path("bench/nanobench.cpp"), |
| 723 | rebase_path("bench/nanobenchAndroid.cpp"), |
| 724 | ] |
| 725 | deps = [ |
| 726 | ":flags", |
| 727 | ":gm", |
| 728 | ":gpu_tool_utils", |
| 729 | ":skia", |
| 730 | ":tool_utils", |
| 731 | ] |
| 732 | } |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 733 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 734 | test_lib("experimental_svg_model") { |
| 735 | public_include_dirs = [ "experimental/svg/model" ] |
| 736 | sources = [ |
| 737 | "experimental/svg/model/SkSVGAttribute.cpp", |
| 738 | "experimental/svg/model/SkSVGAttributeParser.cpp", |
| 739 | "experimental/svg/model/SkSVGCircle.cpp", |
| 740 | "experimental/svg/model/SkSVGContainer.cpp", |
| 741 | "experimental/svg/model/SkSVGDOM.cpp", |
| 742 | "experimental/svg/model/SkSVGEllipse.cpp", |
| 743 | "experimental/svg/model/SkSVGLine.cpp", |
| 744 | "experimental/svg/model/SkSVGNode.cpp", |
| 745 | "experimental/svg/model/SkSVGPath.cpp", |
| 746 | "experimental/svg/model/SkSVGPoly.cpp", |
| 747 | "experimental/svg/model/SkSVGRect.cpp", |
| 748 | "experimental/svg/model/SkSVGRenderContext.cpp", |
| 749 | "experimental/svg/model/SkSVGSVG.cpp", |
| 750 | "experimental/svg/model/SkSVGShape.cpp", |
| 751 | "experimental/svg/model/SkSVGTransformableNode.cpp", |
| 752 | "experimental/svg/model/SkSVGValue.cpp", |
| 753 | ] |
| 754 | deps = [ |
| 755 | ":skia", |
| 756 | ] |
| 757 | } |
fmalita | a2b9fdf | 2016-08-03 19:53:36 -0700 | [diff] [blame] | 758 | |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 759 | executable("dm") { |
| 760 | sources = [ |
| 761 | "dm/DM.cpp", |
| 762 | "dm/DMJsonWriter.cpp", |
| 763 | "dm/DMSrcSink.cpp", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 764 | ] |
| 765 | include_dirs = [ "tests" ] |
| 766 | deps = [ |
fmalita | a2b9fdf | 2016-08-03 19:53:36 -0700 | [diff] [blame] | 767 | ":experimental_svg_model", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 768 | ":flags", |
| 769 | ":gm", |
| 770 | ":gpu_tool_utils", |
| 771 | ":skia", |
mtklein | 2f3416d | 2016-08-02 16:02:05 -0700 | [diff] [blame] | 772 | ":tests", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 773 | ":tool_utils", |
| 774 | "//third_party/jsoncpp", |
| 775 | "//third_party/libpng", |
| 776 | ] |
| 777 | testonly = true |
| 778 | } |
| 779 | |
| 780 | executable("monobench") { |
| 781 | sources = [ |
| 782 | "tools/monobench.cpp", |
| 783 | ] |
| 784 | deps = [ |
| 785 | ":bench", |
| 786 | ":skia", |
| 787 | ] |
| 788 | testonly = true |
| 789 | } |
| 790 | |
| 791 | executable("nanobench") { |
| 792 | sources = [ |
| 793 | "bench/nanobench.cpp", |
| 794 | ] |
| 795 | deps = [ |
| 796 | ":bench", |
| 797 | ":flags", |
| 798 | ":gm", |
| 799 | ":gpu_tool_utils", |
| 800 | ":skia", |
| 801 | ":tool_utils", |
| 802 | "//third_party/jsoncpp", |
| 803 | ] |
| 804 | testonly = true |
| 805 | } |
halcanary | 19a9720 | 2016-08-03 15:08:04 -0700 | [diff] [blame] | 806 | |
mtklein | 6f5df6a | 2016-08-29 16:01:10 -0700 | [diff] [blame] | 807 | if (current_cpu != "mipsel") { # Clang 3.8 crashes while compiling hb-icu.cc for mipsel. |
| 808 | executable("sktexttopdf") { |
| 809 | sources = [ |
| 810 | "tools/SkShaper_harfbuzz.cpp", |
| 811 | "tools/using_skia_and_harfbuzz.cpp", |
| 812 | ] |
| 813 | deps = [ |
| 814 | ":skia", |
| 815 | "//third_party/harfbuzz", |
| 816 | ] |
| 817 | testonly = true |
| 818 | } |
halcanary | 19a9720 | 2016-08-03 15:08:04 -0700 | [diff] [blame] | 819 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 820 | } |