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