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