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 | |
Brian Osman | f2c9014 | 2017-07-13 15:50:03 -0400 | [diff] [blame] | 6 | import("gn/flutter_defines.gni") |
mikejurka | 8c24f4f | 2016-09-12 16:51:58 -0700 | [diff] [blame] | 7 | import("gn/shared_sources.gni") |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 8 | |
Forrest Reiling | 30229ac | 2017-04-17 13:36:39 -0700 | [diff] [blame] | 9 | if (is_fuchsia) { |
| 10 | import("//build/vulkan/config.gni") |
| 11 | } |
| 12 | |
Mike Klein | 3669a82 | 2017-03-03 10:55:02 -0500 | [diff] [blame] | 13 | if (!defined(is_skia_standalone)) { |
| 14 | is_skia_standalone = false |
| 15 | } |
| 16 | is_skia_dev_build = is_skia_standalone && !is_official_build |
| 17 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 18 | declare_args() { |
Mike Klein | c168a3a | 2016-11-14 14:53:13 +0000 | [diff] [blame] | 19 | skia_use_angle = false |
Kevin Lubick | 4a24e10 | 2017-03-29 11:19:01 -0400 | [diff] [blame] | 20 | skia_use_egl = false |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 21 | skia_use_expat = true |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 22 | skia_use_fontconfig = is_linux |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 23 | skia_use_freetype = is_android || is_fuchsia || is_linux |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 24 | skia_use_icu = !is_fuchsia && !is_ios && !is_win # TODO: Windows |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 25 | skia_use_libjpeg_turbo = true |
| 26 | skia_use_libpng = true |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 27 | skia_use_libwebp = !is_fuchsia |
Mike Klein | fae86b7 | 2018-01-08 15:49:09 -0500 | [diff] [blame] | 28 | skia_use_lua = is_skia_dev_build && !is_ios |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 29 | skia_use_piex = !is_win |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 30 | skia_use_zlib = true |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 31 | skia_use_metal = false |
Mike Klein | 36f182f | 2017-10-20 12:33:53 -0400 | [diff] [blame] | 32 | skia_use_libheif = is_skia_dev_build |
Mike Klein | fb33355 | 2018-01-25 12:49:37 -0500 | [diff] [blame] | 33 | skia_use_skcms = is_skia_dev_build |
mtklein | 1bd72ba | 2016-09-16 07:45:52 -0700 | [diff] [blame] | 34 | |
Mike Klein | 7d92103 | 2017-01-05 12:20:41 -0500 | [diff] [blame] | 35 | skia_android_serial = "" |
Brian Osman | 3f375d0 | 2016-12-28 11:19:22 -0500 | [diff] [blame] | 36 | skia_enable_discrete_gpu = true |
Mike Klein | a04bb45 | 2017-02-09 12:24:07 -0500 | [diff] [blame] | 37 | skia_enable_effects = true |
Brian Osman | f2c9014 | 2017-07-13 15:50:03 -0400 | [diff] [blame] | 38 | skia_enable_flutter_defines = false |
Hal Canary | ff2742e | 2018-01-30 11:35:47 -0500 | [diff] [blame] | 39 | skia_enable_fontmgr_empty = false |
Brian Osman | 7451101 | 2018-04-02 20:13:46 +0000 | [diff] [blame] | 40 | skia_enable_gpu = true |
Hal Canary | 43fb7a0 | 2016-12-30 13:09:03 -0500 | [diff] [blame] | 41 | skia_enable_pdf = true |
Ethan Nicholas | a6ae1f7 | 2017-03-16 09:56:54 -0400 | [diff] [blame] | 42 | skia_enable_spirv_validation = is_skia_dev_build && is_debug |
Mike Klein | 3669a82 | 2017-03-03 10:55:02 -0500 | [diff] [blame] | 43 | skia_enable_tools = is_skia_dev_build |
| 44 | skia_enable_vulkan_debug_layers = is_skia_dev_build && is_debug |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 45 | skia_vulkan_header = "" |
Greg Daniel | 686bb21 | 2016-10-27 10:48:48 -0400 | [diff] [blame] | 46 | skia_vulkan_sdk = getenv("VULKAN_SDK") |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 47 | skia_qt_path = getenv("QT_PATH") |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 48 | skia_compile_processors = false |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 49 | skia_lex = false |
Mike Klein | c55a6cb | 2017-06-28 13:21:47 -0400 | [diff] [blame] | 50 | |
Hal Canary | 4689b54 | 2018-01-31 11:54:14 -0500 | [diff] [blame] | 51 | skia_skqp_enable_driver_correctness_workarounds = false |
Hal Canary | 2331c82 | 2018-02-01 14:06:13 -0500 | [diff] [blame] | 52 | skia_skqp_global_error_tolerance = 0 |
Ethan Nicholas | 26a9aad | 2018-03-27 14:10:52 -0400 | [diff] [blame] | 53 | |
| 54 | skia_llvm_path = "" |
| 55 | skia_llvm_lib = "LLVM" |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 56 | } |
Brian Salomon | 23d73ea | 2016-10-27 13:31:37 -0400 | [diff] [blame] | 57 | declare_args() { |
Matt Sarett | 189491c | 2017-03-20 18:09:30 -0400 | [diff] [blame] | 58 | skia_use_dng_sdk = !is_fuchsia && skia_use_libjpeg_turbo && skia_use_zlib |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 59 | skia_use_sfntly = skia_use_icu |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 60 | skia_enable_atlas_text = is_skia_dev_build && skia_enable_gpu |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 61 | |
Brian Salomon | 5f33a8c | 2018-02-26 14:32:39 -0500 | [diff] [blame] | 62 | skia_use_legacy_gpu_pixel_ops = is_skia_dev_build && is_win # Arbitrary to keep old code path tested until deletion. |
| 63 | |
Mike Klein | 4d598a3 | 2016-10-31 13:44:49 -0400 | [diff] [blame] | 64 | if (is_android) { |
| 65 | skia_use_vulkan = defined(ndk_api) && ndk_api >= 24 |
Forrest Reiling | 30229ac | 2017-04-17 13:36:39 -0700 | [diff] [blame] | 66 | } else if (is_fuchsia) { |
| 67 | skia_use_vulkan = fuchsia_use_vulkan |
Mike Klein | 4d598a3 | 2016-10-31 13:44:49 -0400 | [diff] [blame] | 68 | } else { |
| 69 | skia_use_vulkan = skia_vulkan_sdk != "" |
| 70 | } |
Jim Van Verth | 4e50297 | 2017-12-07 15:16:10 -0500 | [diff] [blame] | 71 | |
| 72 | if (is_ios) { |
| 73 | skia_ios_identity = ".*Google.*" |
| 74 | skia_ios_profile = "Google Development" |
| 75 | } |
Brian Salomon | 23d73ea | 2016-10-27 13:31:37 -0400 | [diff] [blame] | 76 | } |
Greg Daniel | ec6ae52 | 2017-04-25 13:38:26 -0400 | [diff] [blame] | 77 | declare_args() { |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 78 | skia_tools_vulkan_header_dir = "" |
Greg Daniel | ec6ae52 | 2017-04-25 13:38:26 -0400 | [diff] [blame] | 79 | if (skia_use_vulkan) { |
Robert Phillips | fcd5fdd | 2017-06-14 01:43:29 +0000 | [diff] [blame] | 80 | # When buliding on Android we get the header via the NDK so no need for any extra path. |
Greg Daniel | ec6ae52 | 2017-04-25 13:38:26 -0400 | [diff] [blame] | 81 | if (is_fuchsia) { |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 82 | skia_tools_vulkan_header_dir = "$fuchsia_vulkan_sdk/include" |
Greg Daniel | ec6ae52 | 2017-04-25 13:38:26 -0400 | [diff] [blame] | 83 | } else if (is_linux || is_win) { |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 84 | skia_tools_vulkan_header_dir = "$skia_vulkan_sdk/include" |
Greg Daniel | ec6ae52 | 2017-04-25 13:38:26 -0400 | [diff] [blame] | 85 | } |
Greg Daniel | ec6ae52 | 2017-04-25 13:38:26 -0400 | [diff] [blame] | 86 | } |
| 87 | } |
Brian Salomon | 789e25e | 2016-09-30 13:41:03 -0400 | [diff] [blame] | 88 | |
Adam Barth | 54ef74a | 2017-10-13 10:59:38 -0700 | [diff] [blame] | 89 | if (defined(skia_settings)) { |
| 90 | import(skia_settings) |
| 91 | } |
| 92 | |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 93 | # Our tools require static linking (they use non-exported symbols). |
| 94 | skia_enable_tools = skia_enable_tools && !is_component_build |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 95 | |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 96 | fontmgr_android_enabled = skia_use_expat && skia_use_freetype |
| 97 | |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 98 | skia_public_includes = [ |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 99 | "include/android", |
mtklein | fa84d94 | 2016-07-28 09:45:14 -0700 | [diff] [blame] | 100 | "include/c", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 101 | "include/codec", |
| 102 | "include/config", |
| 103 | "include/core", |
| 104 | "include/effects", |
Matt Sarett | 94fd06f | 2017-05-08 17:31:00 -0400 | [diff] [blame] | 105 | "include/encode", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 106 | "include/gpu", |
| 107 | "include/gpu/gl", |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 108 | "include/atlastext", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 109 | "include/pathops", |
| 110 | "include/ports", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 111 | "include/svg", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 112 | "include/utils", |
| 113 | "include/utils/mac", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 114 | ] |
| 115 | |
Robert Phillips | fcd5fdd | 2017-06-14 01:43:29 +0000 | [diff] [blame] | 116 | if (skia_use_vulkan) { |
| 117 | skia_public_includes += [ "include/gpu/vk" ] |
| 118 | } |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 119 | if (skia_enable_atlas_text) { |
| 120 | skia_public_includes += [ "include/atlastext" ] |
| 121 | } |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 122 | if (skia_use_metal) { |
| 123 | skia_public_includes += [ "include/gpu/mtl" ] |
| 124 | } |
Robert Phillips | fcd5fdd | 2017-06-14 01:43:29 +0000 | [diff] [blame] | 125 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 126 | # Skia public API, generally provided by :skia. |
| 127 | config("skia_public") { |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 128 | include_dirs = skia_public_includes |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 129 | if (skia_tools_vulkan_header_dir != "") { |
| 130 | include_dirs += [ skia_tools_vulkan_header_dir ] |
Greg Daniel | ec6ae52 | 2017-04-25 13:38:26 -0400 | [diff] [blame] | 131 | } |
Mike Klein | ae7e671 | 2016-10-11 17:49:33 -0400 | [diff] [blame] | 132 | defines = [] |
| 133 | if (is_component_build) { |
| 134 | defines += [ "SKIA_DLL" ] |
| 135 | } |
Mike Klein | c4cbd74 | 2016-09-26 21:37:09 -0400 | [diff] [blame] | 136 | if (is_fuchsia || is_linux) { |
jcgregorio | 5561e3d | 2016-08-25 09:25:11 -0700 | [diff] [blame] | 137 | defines += [ "SK_SAMPLES_FOR_X" ] |
| 138 | } |
Brian Osman | f2c9014 | 2017-07-13 15:50:03 -0400 | [diff] [blame] | 139 | if (skia_enable_flutter_defines) { |
| 140 | defines += flutter_defines |
| 141 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 142 | if (!skia_enable_gpu) { |
| 143 | defines += [ "SK_SUPPORT_GPU=0" ] |
| 144 | } |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 145 | if (skia_enable_atlas_text) { |
| 146 | defines += [ "SK_SUPPORT_ATLAS_TEXT=1" ] |
| 147 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 148 | } |
| 149 | |
| 150 | # Skia internal APIs, used by Skia itself and a few test tools. |
| 151 | config("skia_private") { |
| 152 | visibility = [ ":*" ] |
| 153 | |
| 154 | include_dirs = [ |
| 155 | "include/private", |
| 156 | "src/c", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 157 | "src/codec", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 158 | "src/core", |
| 159 | "src/effects", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 160 | "src/fonts", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 161 | "src/image", |
| 162 | "src/images", |
| 163 | "src/lazy", |
| 164 | "src/opts", |
| 165 | "src/pathops", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 166 | "src/pdf", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 167 | "src/ports", |
| 168 | "src/sfnt", |
Florin Malita | 5edba45 | 2017-05-30 16:39:47 -0400 | [diff] [blame] | 169 | "src/shaders", |
| 170 | "src/shaders/gradients", |
mtklein | 9e0d9dd | 2016-08-30 10:37:19 -0700 | [diff] [blame] | 171 | "src/sksl", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 172 | "src/utils", |
mtklein | 7a1f45f | 2016-08-04 06:19:33 -0700 | [diff] [blame] | 173 | "src/utils/win", |
Herb Derby | 5a8fe97 | 2017-02-14 14:42:30 -0500 | [diff] [blame] | 174 | "src/xml", |
scroggo | 19b9153 | 2016-10-24 09:03:26 -0700 | [diff] [blame] | 175 | "third_party/gif", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 176 | ] |
Ethan Nicholas | 26a9aad | 2018-03-27 14:10:52 -0400 | [diff] [blame] | 177 | if (skia_llvm_path != "") { |
| 178 | include_dirs += [ "$skia_llvm_path/include" ] |
| 179 | } |
mtklein | 150d113 | 2016-08-01 06:56:40 -0700 | [diff] [blame] | 180 | |
Mike Reed | a9e241d | 2017-05-03 10:52:00 -0400 | [diff] [blame] | 181 | defines = [ "SK_GAMMA_APPLY_TO_A8" ] |
mtklein | b37c034 | 2016-09-09 11:07:45 -0700 | [diff] [blame] | 182 | if (is_android) { |
| 183 | defines += [ |
| 184 | "SK_GAMMA_EXPONENT=1.4", |
| 185 | "SK_GAMMA_CONTRAST=0.0", |
| 186 | ] |
| 187 | } |
mtklein | 88a7ac0 | 2016-09-14 11:16:49 -0700 | [diff] [blame] | 188 | if (is_official_build || is_android) { |
| 189 | # TODO(bsalomon): it'd be nice to make Android normal. |
| 190 | defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ] |
| 191 | } |
Brian Salomon | 789e25e | 2016-09-30 13:41:03 -0400 | [diff] [blame] | 192 | libs = [] |
| 193 | lib_dirs = [] |
Brian Salomon | 03e0584 | 2017-02-23 12:23:47 -0500 | [diff] [blame] | 194 | if (skia_enable_gpu) { |
| 195 | include_dirs += [ "src/gpu" ] |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 196 | if (is_skia_dev_build && skia_use_vulkan) { |
| 197 | include_dirs += [ "tools/gpu/vk" ] |
| 198 | } |
Brian Salomon | 03e0584 | 2017-02-23 12:23:47 -0500 | [diff] [blame] | 199 | } |
Brian Osman | 34755e2 | 2016-12-05 09:46:02 -0500 | [diff] [blame] | 200 | if (skia_use_angle) { |
| 201 | defines += [ "SK_ANGLE" ] |
| 202 | } |
Brian Osman | 3f375d0 | 2016-12-28 11:19:22 -0500 | [diff] [blame] | 203 | if (skia_enable_discrete_gpu) { |
| 204 | defines += [ "SK_ENABLE_DISCRETE_GPU" ] |
| 205 | } |
Brian Salomon | 0c26a9d | 2017-07-06 10:09:38 -0400 | [diff] [blame] | 206 | if (!is_official_build) { |
| 207 | defines += [ "GR_TEST_UTILS=1" ] |
| 208 | } |
Ethan Nicholas | 26a9aad | 2018-03-27 14:10:52 -0400 | [diff] [blame] | 209 | if (skia_llvm_path != "") { |
| 210 | defines += [ "SK_LLVM_AVAILABLE" ] |
| 211 | include_dirs += [ "$skia_llvm_path/include" ] |
| 212 | libs += [ skia_llvm_lib ] |
| 213 | lib_dirs += [ "$skia_llvm_path/lib/" ] |
| 214 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | # Any code that's linked into Skia-the-library should use this config via += skia_library_configs. |
| 218 | config("skia_library") { |
| 219 | visibility = [ ":*" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 220 | defines = [ "SKIA_IMPLEMENTATION=1" ] |
| 221 | } |
| 222 | |
| 223 | skia_library_configs = [ |
| 224 | ":skia_public", |
| 225 | ":skia_private", |
| 226 | ":skia_library", |
| 227 | ] |
| 228 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 229 | # Use for CPU-specific Skia code that needs particular compiler flags. |
| 230 | template("opts") { |
| 231 | if (invoker.enabled) { |
| 232 | source_set(target_name) { |
| 233 | forward_variables_from(invoker, "*") |
| 234 | configs += skia_library_configs |
| 235 | } |
| 236 | } else { |
| 237 | # If not enabled, a phony empty target that swallows all otherwise unused variables. |
| 238 | source_set(target_name) { |
| 239 | forward_variables_from(invoker, |
| 240 | "*", |
| 241 | [ |
| 242 | "sources", |
| 243 | "cflags", |
| 244 | ]) |
| 245 | } |
| 246 | } |
anmittal | a7eaf2e | 2016-08-17 13:57:26 -0700 | [diff] [blame] | 247 | } |
| 248 | |
mtklein | 422310d | 2016-08-16 18:28:43 -0700 | [diff] [blame] | 249 | is_x86 = current_cpu == "x64" || current_cpu == "x86" |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 250 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 251 | opts("none") { |
| 252 | enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 253 | sources = skia_opts.none_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 254 | cflags = [] |
| 255 | } |
| 256 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 257 | opts("armv7") { |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 258 | enabled = current_cpu == "arm" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 259 | sources = skia_opts.armv7_sources + skia_opts.neon_sources |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 260 | cflags = [] |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 261 | } |
| 262 | |
| 263 | opts("arm64") { |
| 264 | enabled = current_cpu == "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 265 | sources = skia_opts.arm64_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 266 | cflags = [] |
| 267 | } |
| 268 | |
| 269 | opts("crc32") { |
| 270 | enabled = current_cpu == "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 271 | sources = skia_opts.crc32_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 272 | cflags = [ "-march=armv8-a+crc" ] |
| 273 | } |
| 274 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 275 | opts("sse2") { |
| 276 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 277 | sources = skia_opts.sse2_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 278 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 279 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2" ] |
| 280 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 281 | cflags = [ "-msse2" ] |
| 282 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 283 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 284 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 285 | opts("ssse3") { |
| 286 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 287 | sources = skia_opts.ssse3_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 288 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 289 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSSE3" ] |
| 290 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 291 | cflags = [ "-mssse3" ] |
| 292 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 293 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 294 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 295 | opts("sse41") { |
| 296 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 297 | sources = skia_opts.sse41_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 298 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 299 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41" ] |
| 300 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 301 | cflags = [ "-msse4.1" ] |
| 302 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 303 | } |
mtklein | 4e97607 | 2016-08-08 09:06:27 -0700 | [diff] [blame] | 304 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 305 | opts("sse42") { |
| 306 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 307 | sources = skia_opts.sse42_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 308 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 309 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE42" ] |
| 310 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 311 | cflags = [ "-msse4.2" ] |
| 312 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 313 | } |
| 314 | |
| 315 | opts("avx") { |
| 316 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 317 | sources = skia_opts.avx_sources |
Mike Klein | 4d4b3aa | 2018-03-21 13:07:35 -0400 | [diff] [blame] | 318 | if (is_win) { |
Mike Klein | 17b6e48 | 2016-11-18 22:11:41 +0000 | [diff] [blame] | 319 | cflags = [ "/arch:AVX" ] |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 320 | } else { |
| 321 | cflags = [ "-mavx" ] |
| 322 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 323 | } |
| 324 | |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 325 | opts("hsw") { |
| 326 | enabled = is_x86 |
| 327 | sources = skia_opts.hsw_sources |
Mike Klein | 4d4b3aa | 2018-03-21 13:07:35 -0400 | [diff] [blame] | 328 | if (is_win) { |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 329 | cflags = [ "/arch:AVX2" ] |
| 330 | } else { |
Mike Klein | e87c486 | 2018-03-23 00:13:58 +0000 | [diff] [blame] | 331 | cflags = [ "-march=haswell" ] |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 332 | } |
| 333 | |
| 334 | # Oddly, clang-cl doesn't recognize this as a valid flag. |
| 335 | # If it ever does, it'd nice to move this up with -mavx2 and co. |
| 336 | if (is_clang && !is_win) { |
| 337 | # This flag lets Clang generate FMAs when it sees a mul-then-add. It's optional, |
| 338 | # but nice to have, generating slightly better code for paths without explicit FMAs. |
| 339 | cflags += [ "-ffp-contract=fast" ] |
| 340 | } |
| 341 | } |
| 342 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 343 | # 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] | 344 | template("optional") { |
| 345 | if (invoker.enabled) { |
| 346 | config(target_name + "_public") { |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 347 | if (defined(invoker.public_defines)) { |
| 348 | defines = invoker.public_defines |
| 349 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 350 | } |
| 351 | source_set(target_name) { |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 352 | forward_variables_from(invoker, |
| 353 | "*", |
| 354 | [ |
| 355 | "public_defines", |
| 356 | "sources_when_disabled", |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 357 | "configs_to_remove", |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 358 | ]) |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 359 | all_dependent_configs = [ ":" + target_name + "_public" ] |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 360 | configs += skia_library_configs |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 361 | if (defined(invoker.configs_to_remove)) { |
| 362 | configs -= invoker.configs_to_remove |
| 363 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 364 | } |
| 365 | } else { |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 366 | source_set(target_name) { |
| 367 | forward_variables_from(invoker, |
| 368 | "*", |
| 369 | [ |
| 370 | "public_defines", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 371 | "deps", |
mtklein | 6ef6999 | 2016-09-14 06:12:09 -0700 | [diff] [blame] | 372 | "libs", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 373 | "sources", |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 374 | "sources_when_disabled", |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 375 | "configs_to_remove", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 376 | ]) |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 377 | if (defined(invoker.sources_when_disabled)) { |
| 378 | sources = invoker.sources_when_disabled |
| 379 | } |
| 380 | configs += skia_library_configs |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 381 | } |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 382 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 383 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 384 | |
Mike Klein | a04bb45 | 2017-02-09 12:24:07 -0500 | [diff] [blame] | 385 | optional("effects") { |
| 386 | enabled = skia_enable_effects |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 387 | deps = [ |
| 388 | ":compile_processors", |
| 389 | ] |
Mike Klein | a04bb45 | 2017-02-09 12:24:07 -0500 | [diff] [blame] | 390 | sources = |
| 391 | skia_effects_sources + [ "src/ports/SkGlobalInitialization_default.cpp" ] |
| 392 | sources_when_disabled = [ "src/ports/SkGlobalInitialization_none.cpp" ] |
| 393 | } |
| 394 | |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 395 | optional("fontmgr_android") { |
| 396 | enabled = fontmgr_android_enabled |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 397 | |
| 398 | deps = [ |
Ben Wagner | fc49734 | 2017-02-24 11:15:26 -0500 | [diff] [blame] | 399 | ":typeface_freetype", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 400 | "//third_party/expat", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 401 | ] |
| 402 | sources = [ |
| 403 | "src/ports/SkFontMgr_android.cpp", |
| 404 | "src/ports/SkFontMgr_android_factory.cpp", |
| 405 | "src/ports/SkFontMgr_android_parser.cpp", |
| 406 | ] |
| 407 | } |
| 408 | |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 409 | optional("fontmgr_custom") { |
| 410 | enabled = is_linux && skia_use_freetype && !skia_use_fontconfig |
| 411 | |
| 412 | deps = [ |
Ben Wagner | fc49734 | 2017-02-24 11:15:26 -0500 | [diff] [blame] | 413 | ":typeface_freetype", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 414 | ] |
| 415 | sources = [ |
| 416 | "src/ports/SkFontMgr_custom.cpp", |
Ben Wagner | 8ab590f | 2017-02-08 17:29:33 -0500 | [diff] [blame] | 417 | "src/ports/SkFontMgr_custom.h", |
| 418 | "src/ports/SkFontMgr_custom_directory.cpp", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 419 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
Ben Wagner | 8ab590f | 2017-02-08 17:29:33 -0500 | [diff] [blame] | 420 | "src/ports/SkFontMgr_custom_embedded.cpp", |
| 421 | "src/ports/SkFontMgr_custom_empty.cpp", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 422 | ] |
| 423 | } |
| 424 | |
Hal Canary | ff2742e | 2018-01-30 11:35:47 -0500 | [diff] [blame] | 425 | optional("fontmgr_empty") { |
| 426 | enabled = skia_enable_fontmgr_empty |
| 427 | sources = [ |
| 428 | "src/ports/SkFontMgr_empty_factory.cpp", |
| 429 | ] |
| 430 | } |
| 431 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 432 | optional("fontmgr_fontconfig") { |
| 433 | enabled = skia_use_freetype && skia_use_fontconfig |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 434 | |
| 435 | deps = [ |
Ben Wagner | fc49734 | 2017-02-24 11:15:26 -0500 | [diff] [blame] | 436 | ":typeface_freetype", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 437 | "//third_party:fontconfig", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 438 | ] |
| 439 | sources = [ |
bungeman | 1ae0e01 | 2016-09-19 12:13:16 -0700 | [diff] [blame] | 440 | "src/ports/SkFontConfigInterface.cpp", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 441 | "src/ports/SkFontConfigInterface_direct.cpp", |
| 442 | "src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 443 | "src/ports/SkFontMgr_FontConfigInterface.cpp", |
| 444 | "src/ports/SkFontMgr_fontconfig.cpp", |
| 445 | "src/ports/SkFontMgr_fontconfig_factory.cpp", |
| 446 | ] |
| 447 | } |
| 448 | |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 449 | optional("fontmgr_fuchsia") { |
| 450 | enabled = is_fuchsia && skia_use_freetype |
| 451 | |
| 452 | deps = [ |
Ben Wagner | fc49734 | 2017-02-24 11:15:26 -0500 | [diff] [blame] | 453 | ":typeface_freetype", |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 454 | ] |
| 455 | sources = [ |
| 456 | "src/ports/SkFontMgr_custom.cpp", |
Ben Wagner | 8ab590f | 2017-02-08 17:29:33 -0500 | [diff] [blame] | 457 | "src/ports/SkFontMgr_custom_empty.cpp", |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 458 | "src/ports/SkFontMgr_custom_empty_factory.cpp", |
| 459 | ] |
| 460 | } |
| 461 | |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 462 | if (skia_lex) { |
Ethan Nicholas | ca82a92 | 2017-09-07 09:39:50 -0400 | [diff] [blame] | 463 | executable("sksllex") { |
| 464 | sources = [ |
| 465 | "src/sksl/lex/Main.cpp", |
| 466 | "src/sksl/lex/NFA.cpp", |
| 467 | "src/sksl/lex/RegexNode.cpp", |
| 468 | "src/sksl/lex/RegexParser.cpp", |
| 469 | ] |
| 470 | include_dirs = [ "src/sksl/lex" ] |
| 471 | } |
| 472 | |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 473 | action("run_sksllex") { |
| 474 | script = "gn/run_sksllex.py" |
Ethan Nicholas | e148bf7 | 2017-10-06 14:22:22 -0400 | [diff] [blame] | 475 | deps = [ |
| 476 | ":sksllex(//gn/toolchain:$host_toolchain)", |
| 477 | ] |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 478 | sources = [ |
| 479 | "src/sksl/lex/layout.lex", |
| 480 | "src/sksl/lex/sksl.lex", |
| 481 | ] |
| 482 | |
| 483 | # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a |
| 484 | # path that starts with target_out_dir and then uses ".." to back up into the src dir. |
| 485 | outputs = [ |
| 486 | "$target_out_dir/" + |
| 487 | rebase_path("src/sksl/lex/SkSLLexer.h", target_out_dir), |
| 488 | # the script also modifies the corresponding .cpp file, but if we tell GN that it gets |
| 489 | # confused due to the same file being named by two different paths |
| 490 | ] |
| 491 | sksllex_path = "$root_out_dir/" |
| 492 | sksllex_path += "sksllex" |
| 493 | if (host_os == "win") { |
| 494 | sksllex_path += ".exe" |
| 495 | } |
| 496 | args = [ |
| 497 | rebase_path(sksllex_path), |
| 498 | rebase_path("bin/clang-format"), |
| 499 | rebase_path("src"), |
| 500 | ] |
| 501 | } |
| 502 | } else { |
| 503 | group("run_sksllex") { |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | if (skia_compile_processors) { |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 508 | executable("skslc") { |
| 509 | defines = [ "SKSL_STANDALONE" ] |
| 510 | sources = [ |
| 511 | "src/sksl/SkSLMain.cpp", |
| 512 | ] |
| 513 | sources += skia_sksl_sources |
| 514 | include_dirs = [ |
| 515 | "src/gpu", |
| 516 | "src/sksl", |
| 517 | ] |
| 518 | deps = [ |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 519 | ":run_sksllex", |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 520 | "//third_party/spirv-tools", |
| 521 | ] |
| 522 | } |
| 523 | |
| 524 | skia_gpu_processor_outputs = [] |
| 525 | foreach(src, skia_gpu_processor_sources) { |
| 526 | dir = get_path_info(src, "dir") |
| 527 | name = get_path_info(src, "name") |
| 528 | |
| 529 | # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a |
| 530 | # path that starts with target_out_dir and then uses ".." to back up into the src dir. |
| 531 | skia_gpu_processor_outputs += [ |
| 532 | "$target_out_dir/" + rebase_path("$dir/$name.h", target_out_dir), |
| 533 | # the script also modifies the corresponding .cpp file, but if we tell GN that it gets |
| 534 | # confused due to the same file being named by two different paths |
| 535 | ] |
| 536 | } |
| 537 | |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 538 | action("create_sksl_enums") { |
| 539 | script = "gn/create_sksl_enums.py" |
| 540 | sources = [ |
| 541 | "include/private/GrSharedEnums.h", |
| 542 | ] |
| 543 | outputs = [ |
| 544 | "$target_out_dir/" + |
Ben Wagner | a56c4d2 | 2018-01-24 17:32:17 -0500 | [diff] [blame] | 545 | rebase_path("src/sksl/sksl_enums.inc", target_out_dir), |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 546 | ] |
| 547 | args = [ |
| 548 | rebase_path(sources[0]), |
| 549 | rebase_path(outputs[0]), |
| 550 | ] |
| 551 | } |
| 552 | |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 553 | action("compile_processors") { |
| 554 | script = "gn/compile_processors.py" |
| 555 | deps = [ |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 556 | ":create_sksl_enums", |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 557 | ":skslc(//gn/toolchain:$host_toolchain)", |
| 558 | ] |
| 559 | sources = skia_gpu_processor_sources |
| 560 | outputs = skia_gpu_processor_outputs |
| 561 | skslc_path = "$root_out_dir/" |
| 562 | if (host_toolchain != default_toolchain_name) { |
| 563 | skslc_path += "$host_toolchain/" |
| 564 | } |
| 565 | skslc_path += "skslc" |
| 566 | if (host_os == "win") { |
| 567 | skslc_path += ".exe" |
| 568 | } |
Ethan Nicholas | b9f6afb | 2017-07-27 16:02:37 -0400 | [diff] [blame] | 569 | args = [ |
| 570 | rebase_path(skslc_path), |
Eric Boren | b121be7 | 2017-07-28 10:00:51 -0400 | [diff] [blame] | 571 | rebase_path("bin/clang-format"), |
Ethan Nicholas | b9f6afb | 2017-07-27 16:02:37 -0400 | [diff] [blame] | 572 | ] |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 573 | args += rebase_path(skia_gpu_processor_sources) |
| 574 | } |
| 575 | } else { |
| 576 | skia_gpu_processor_outputs = [] |
| 577 | group("compile_processors") { |
| 578 | } |
| 579 | } |
| 580 | |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 581 | optional("gpu") { |
| 582 | enabled = skia_enable_gpu |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 583 | deps = [ |
| 584 | ":compile_processors", |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 585 | ":run_sksllex", |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 586 | ] |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 587 | public_defines = [] |
| 588 | |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 589 | sources = skia_gpu_sources + skia_sksl_sources + skia_gpu_processor_outputs |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 590 | |
| 591 | # These paths need to be absolute to match the ones produced by shared_sources.gni. |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 592 | sources -= get_path_info([ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ], |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 593 | "abspath") |
Mike Klein | 703cf5a | 2016-10-13 17:18:04 -0400 | [diff] [blame] | 594 | libs = [] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 595 | if (is_android) { |
Hal Canary | 25375e8 | 2018-03-14 15:16:56 -0400 | [diff] [blame] | 596 | sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ] |
Derek Sollenberger | 7a86987 | 2017-06-27 15:37:25 -0400 | [diff] [blame] | 597 | |
| 598 | # this lib is required to link against AHardwareBuffer |
| 599 | if (defined(ndk_api) && ndk_api >= 26) { |
| 600 | libs += [ "android" ] |
| 601 | } |
Kevin Lubick | 4a24e10 | 2017-03-29 11:19:01 -0400 | [diff] [blame] | 602 | } else if (skia_use_egl) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 603 | sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ] |
Kevin Lubick | 4a24e10 | 2017-03-29 11:19:01 -0400 | [diff] [blame] | 604 | libs += [ "EGL" ] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 605 | } else if (is_linux) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 606 | sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ] |
Mike Klein | a979a1d | 2017-02-23 10:31:13 -0500 | [diff] [blame] | 607 | libs += [ |
| 608 | "GL", |
| 609 | "GLU", |
| 610 | ] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 611 | } else if (is_mac) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 612 | sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ] |
Chinmay Garde | 130a118 | 2016-11-23 11:43:56 -0800 | [diff] [blame] | 613 | } else if (is_ios) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 614 | sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ] |
Mike Klein | 703cf5a | 2016-10-13 17:18:04 -0400 | [diff] [blame] | 615 | } else if (is_win) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 616 | sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ] |
Mike Klein | 703cf5a | 2016-10-13 17:18:04 -0400 | [diff] [blame] | 617 | libs += [ "OpenGL32.lib" ] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 618 | } else { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 619 | sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 620 | } |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 621 | |
| 622 | if (skia_use_vulkan) { |
| 623 | public_defines += [ "SK_VULKAN" ] |
| 624 | sources += skia_vk_sources |
egdaniel | e4a9bd7 | 2016-09-21 07:36:14 -0700 | [diff] [blame] | 625 | if (skia_enable_vulkan_debug_layers) { |
| 626 | public_defines += [ "SK_ENABLE_VK_LAYERS" ] |
| 627 | } |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 628 | if (skia_vulkan_header != "") { |
| 629 | public_defines += [ "SK_VULKAN_HEADER=\"$skia_vulkan_header\"" ] |
| 630 | } else { |
| 631 | if (is_skia_dev_build) { |
| 632 | public_defines += [ "SK_VULKAN_HEADER=\"GrVulkanDefines.h\"" ] |
| 633 | } |
| 634 | } |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 635 | } |
Brian Salomon | 5f33a8c | 2018-02-26 14:32:39 -0500 | [diff] [blame] | 636 | if (skia_use_legacy_gpu_pixel_ops) { |
| 637 | public_defines += [ "SK_LEGACY_GPU_PIXEL_OPS" ] |
| 638 | } |
Ethan Nicholas | a6ae1f7 | 2017-03-16 09:56:54 -0400 | [diff] [blame] | 639 | if (skia_enable_spirv_validation) { |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 640 | deps += [ "//third_party/spirv-tools" ] |
Ethan Nicholas | a6ae1f7 | 2017-03-16 09:56:54 -0400 | [diff] [blame] | 641 | public_defines += [ "SK_ENABLE_SPIRV_VALIDATION" ] |
| 642 | } |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 643 | |
Greg Daniel | 6b7e0e2 | 2017-07-12 16:21:09 -0400 | [diff] [blame] | 644 | cflags_objcc = [] |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 645 | if (skia_use_metal) { |
| 646 | public_defines += [ "SK_METAL" ] |
| 647 | sources += skia_metal_sources |
| 648 | libs += [ "Metal.framework" ] |
Greg Daniel | 6b7e0e2 | 2017-07-12 16:21:09 -0400 | [diff] [blame] | 649 | cflags_objcc += [ "-fobjc-arc" ] |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 650 | } |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 651 | |
| 652 | if (skia_enable_atlas_text) { |
| 653 | sources += skia_atlas_text_sources |
| 654 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 655 | } |
| 656 | |
Leon Scroggins III | 04be2b5 | 2017-08-17 15:13:20 -0400 | [diff] [blame] | 657 | optional("heif") { |
| 658 | enabled = skia_use_libheif |
| 659 | public_defines = [ "SK_HAS_HEIF_LIBRARY" ] |
| 660 | |
| 661 | deps = [] |
| 662 | |
| 663 | sources = [ |
| 664 | "src/codec/SkHeifCodec.cpp", |
| 665 | ] |
| 666 | } |
| 667 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 668 | optional("jpeg") { |
| 669 | enabled = skia_use_libjpeg_turbo |
| 670 | public_defines = [ "SK_HAS_JPEG_LIBRARY" ] |
| 671 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 672 | deps = [ |
| 673 | "//third_party/libjpeg-turbo:libjpeg", |
| 674 | ] |
| 675 | sources = [ |
| 676 | "src/codec/SkJpegCodec.cpp", |
| 677 | "src/codec/SkJpegDecoderMgr.cpp", |
| 678 | "src/codec/SkJpegUtility.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 679 | "src/images/SkJPEGWriteUtility.cpp", |
Matt Sarett | 04c3731 | 2017-05-05 14:02:13 -0400 | [diff] [blame] | 680 | "src/images/SkJpegEncoder.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 681 | ] |
| 682 | } |
| 683 | |
| 684 | optional("pdf") { |
Hal Canary | 43fb7a0 | 2016-12-30 13:09:03 -0500 | [diff] [blame] | 685 | enabled = skia_use_zlib && skia_enable_pdf |
| 686 | public_defines = [ "SK_SUPPORT_PDF" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 687 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 688 | deps = [ |
| 689 | "//third_party/zlib", |
| 690 | ] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 691 | sources = skia_pdf_sources |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 692 | sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 693 | |
| 694 | if (skia_use_sfntly) { |
| 695 | deps += [ "//third_party/sfntly" ] |
Hal Canary | 43fb7a0 | 2016-12-30 13:09:03 -0500 | [diff] [blame] | 696 | public_defines += [ "SK_PDF_USE_SFNTLY" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 697 | } |
| 698 | } |
| 699 | |
| 700 | optional("png") { |
| 701 | enabled = skia_use_libpng |
| 702 | public_defines = [ "SK_HAS_PNG_LIBRARY" ] |
| 703 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 704 | deps = [ |
| 705 | "//third_party/libpng", |
| 706 | ] |
| 707 | sources = [ |
| 708 | "src/codec/SkIcoCodec.cpp", |
| 709 | "src/codec/SkPngCodec.cpp", |
Matt Sarett | 04c3731 | 2017-05-05 14:02:13 -0400 | [diff] [blame] | 710 | "src/images/SkPngEncoder.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 711 | ] |
| 712 | } |
| 713 | |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 714 | optional("raw") { |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 715 | enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo && skia_use_piex |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 716 | public_defines = [ "SK_CODEC_DECODES_RAW" ] |
| 717 | |
| 718 | deps = [ |
| 719 | "//third_party/dng_sdk", |
| 720 | "//third_party/libjpeg-turbo:libjpeg", |
| 721 | "//third_party/piex", |
| 722 | ] |
| 723 | |
| 724 | # SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of |
| 725 | # Skia. |
| 726 | configs_to_remove = [ "//gn:no_exceptions" ] |
| 727 | |
| 728 | sources = [ |
| 729 | "src/codec/SkRawAdapterCodec.cpp", |
| 730 | "src/codec/SkRawCodec.cpp", |
| 731 | ] |
| 732 | } |
| 733 | |
Mike Klein | fb33355 | 2018-01-25 12:49:37 -0500 | [diff] [blame] | 734 | optional("skcms") { |
| 735 | enabled = skia_use_skcms |
| 736 | |
Brian Osman | 094fba9 | 2018-03-26 17:05:48 -0400 | [diff] [blame] | 737 | public_defines = [ "SK_USE_SKCMS" ] |
Mike Klein | fb33355 | 2018-01-25 12:49:37 -0500 | [diff] [blame] | 738 | deps = [ |
| 739 | "//third_party/skcms", |
| 740 | ] |
| 741 | sources = [ |
Brian Osman | 094fba9 | 2018-03-26 17:05:48 -0400 | [diff] [blame] | 742 | "src/core/SkColorSpaceXform_skcms.cpp", |
Mike Klein | fb33355 | 2018-01-25 12:49:37 -0500 | [diff] [blame] | 743 | ] |
| 744 | } |
| 745 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 746 | optional("typeface_freetype") { |
| 747 | enabled = skia_use_freetype |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 748 | |
| 749 | deps = [ |
| 750 | "//third_party/freetype2", |
| 751 | ] |
| 752 | sources = [ |
| 753 | "src/ports/SkFontHost_FreeType.cpp", |
| 754 | "src/ports/SkFontHost_FreeType_common.cpp", |
| 755 | ] |
| 756 | } |
| 757 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 758 | optional("webp") { |
| 759 | enabled = skia_use_libwebp |
| 760 | public_defines = [ "SK_HAS_WEBP_LIBRARY" ] |
| 761 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 762 | deps = [ |
| 763 | "//third_party/libwebp", |
| 764 | ] |
| 765 | sources = [ |
| 766 | "src/codec/SkWebpAdapterCodec.cpp", |
| 767 | "src/codec/SkWebpCodec.cpp", |
Matt Sarett | 04c3731 | 2017-05-05 14:02:13 -0400 | [diff] [blame] | 768 | "src/images/SkWebpEncoder.cpp", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 769 | ] |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 770 | } |
| 771 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 772 | optional("xml") { |
| 773 | enabled = skia_use_expat |
Florin Malita | 442fff9 | 2016-11-08 16:07:52 +0000 | [diff] [blame] | 774 | public_defines = [ "SK_XML" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 775 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 776 | deps = [ |
| 777 | "//third_party/expat", |
| 778 | ] |
| 779 | sources = [ |
Mike Klein | bd41bcc | 2017-02-09 16:38:15 -0500 | [diff] [blame] | 780 | "src/svg/SkSVGCanvas.cpp", |
| 781 | "src/svg/SkSVGDevice.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 782 | "src/xml/SkDOM.cpp", |
| 783 | "src/xml/SkXMLParser.cpp", |
| 784 | "src/xml/SkXMLWriter.cpp", |
| 785 | ] |
| 786 | } |
| 787 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 788 | component("skia") { |
| 789 | public_configs = [ ":skia_public" ] |
| 790 | configs += skia_library_configs |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 791 | |
| 792 | deps = [ |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 793 | ":arm64", |
| 794 | ":armv7", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 795 | ":avx", |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 796 | ":crc32", |
Mike Klein | a04bb45 | 2017-02-09 12:24:07 -0500 | [diff] [blame] | 797 | ":effects", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 798 | ":fontmgr_android", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 799 | ":fontmgr_custom", |
Hal Canary | ff2742e | 2018-01-30 11:35:47 -0500 | [diff] [blame] | 800 | ":fontmgr_empty", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 801 | ":fontmgr_fontconfig", |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 802 | ":fontmgr_fuchsia", |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 803 | ":gpu", |
Leon Scroggins III | 04be2b5 | 2017-08-17 15:13:20 -0400 | [diff] [blame] | 804 | ":heif", |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 805 | ":hsw", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 806 | ":jpeg", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 807 | ":none", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 808 | ":pdf", |
| 809 | ":png", |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 810 | ":raw", |
Mike Klein | fb33355 | 2018-01-25 12:49:37 -0500 | [diff] [blame] | 811 | ":skcms", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 812 | ":sse2", |
| 813 | ":sse41", |
| 814 | ":sse42", |
| 815 | ":ssse3", |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 816 | ":webp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 817 | ":xml", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 818 | ] |
| 819 | |
Chinmay Garde | 43f115c | 2016-11-16 15:04:12 -0800 | [diff] [blame] | 820 | # This file (and all GN files in Skia) are designed to work with an |
| 821 | # empty sources assignment filter; we handle all that explicitly. |
| 822 | # We clear the filter here for clients who may have set up a global filter. |
| 823 | set_sources_assignment_filter([]) |
| 824 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 825 | sources = [] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 826 | sources += skia_core_sources |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 827 | sources += skia_utils_sources |
Hal Canary | 6ad3d2f | 2016-12-20 16:15:56 -0500 | [diff] [blame] | 828 | sources += skia_xps_sources |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 829 | sources += [ |
Stan Iliev | 73d8fd9 | 2017-08-02 15:36:24 -0400 | [diff] [blame] | 830 | "src/android/SkAndroidFrameworkUtils.cpp", |
Leon Scroggins III | 42ee284 | 2018-01-14 14:46:51 -0500 | [diff] [blame] | 831 | "src/android/SkAnimatedImage.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 832 | "src/android/SkBitmapRegionCodec.cpp", |
| 833 | "src/android/SkBitmapRegionDecoder.cpp", |
| 834 | "src/codec/SkAndroidCodec.cpp", |
Leon Scroggins III | d81fed9 | 2017-06-01 13:42:28 -0400 | [diff] [blame] | 835 | "src/codec/SkBmpBaseCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 836 | "src/codec/SkBmpCodec.cpp", |
| 837 | "src/codec/SkBmpMaskCodec.cpp", |
| 838 | "src/codec/SkBmpRLECodec.cpp", |
| 839 | "src/codec/SkBmpStandardCodec.cpp", |
| 840 | "src/codec/SkCodec.cpp", |
| 841 | "src/codec/SkCodecImageGenerator.cpp", |
scroggo | 19b9153 | 2016-10-24 09:03:26 -0700 | [diff] [blame] | 842 | "src/codec/SkGifCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 843 | "src/codec/SkMaskSwizzler.cpp", |
| 844 | "src/codec/SkMasks.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 845 | "src/codec/SkSampledCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 846 | "src/codec/SkSampler.cpp", |
scroggo | 19b9153 | 2016-10-24 09:03:26 -0700 | [diff] [blame] | 847 | "src/codec/SkStreamBuffer.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 848 | "src/codec/SkSwizzler.cpp", |
| 849 | "src/codec/SkWbmpCodec.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 850 | "src/images/SkImageEncoder.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 851 | "src/ports/SkDiscardableMemory_none.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 852 | "src/ports/SkImageGenerator_skia.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 853 | "src/ports/SkMemory_malloc.cpp", |
| 854 | "src/ports/SkOSFile_stdio.cpp", |
| 855 | "src/sfnt/SkOTTable_name.cpp", |
| 856 | "src/sfnt/SkOTUtils.cpp", |
| 857 | "src/utils/mac/SkStream_mac.cpp", |
scroggo | 3d3a65c | 2016-10-24 12:28:30 -0700 | [diff] [blame] | 858 | "third_party/gif/SkGifImageReader.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 859 | ] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 860 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 861 | libs = [] |
| 862 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 863 | if (is_win) { |
| 864 | sources += [ |
Mike Klein | ae7e671 | 2016-10-11 17:49:33 -0400 | [diff] [blame] | 865 | "src/fonts/SkFontMgr_indirect.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 866 | "src/ports/SkDebug_win.cpp", |
| 867 | "src/ports/SkFontHost_win.cpp", |
| 868 | "src/ports/SkFontMgr_win_dw.cpp", |
Mike Klein | 0c5fdcb | 2017-11-13 12:40:46 -0500 | [diff] [blame] | 869 | "src/ports/SkFontMgr_win_dw_factory.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 870 | "src/ports/SkImageEncoder_WIC.cpp", |
| 871 | "src/ports/SkImageGeneratorWIC.cpp", |
| 872 | "src/ports/SkOSFile_win.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 873 | "src/ports/SkOSLibrary_win.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 874 | "src/ports/SkScalerContext_win_dw.cpp", |
| 875 | "src/ports/SkTLS_win.cpp", |
| 876 | "src/ports/SkTypeface_win_dw.cpp", |
| 877 | ] |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 878 | libs += [ |
| 879 | "FontSub.lib", |
Mike Klein | 0c5fdcb | 2017-11-13 12:40:46 -0500 | [diff] [blame] | 880 | "Gdi32.lib", |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 881 | "Ole32.lib", |
| 882 | "OleAut32.lib", |
| 883 | "User32.lib", |
Mike Klein | 0c5fdcb | 2017-11-13 12:40:46 -0500 | [diff] [blame] | 884 | "Usp10.lib", |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 885 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 886 | } else { |
| 887 | sources += [ |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 888 | "src/ports/SkOSFile_posix.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 889 | "src/ports/SkOSLibrary_posix.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 890 | "src/ports/SkTLS_pthread.cpp", |
| 891 | ] |
Ben Wagner | be6ae5b | 2017-08-31 16:45:23 -0400 | [diff] [blame] | 892 | libs += [ "dl" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 893 | } |
| 894 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 895 | if (is_android) { |
Mike Klein | 1c47187 | 2017-01-13 15:27:45 -0500 | [diff] [blame] | 896 | deps += [ "//third_party/expat" ] |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 897 | if (defined(ndk) && ndk != "") { |
Mike Klein | 1c47187 | 2017-01-13 15:27:45 -0500 | [diff] [blame] | 898 | deps += [ "//third_party/cpu-features" ] |
| 899 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 900 | sources += [ "src/ports/SkDebug_android.cpp" ] |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 901 | libs += [ |
| 902 | "EGL", |
| 903 | "GLESv2", |
| 904 | "log", |
| 905 | ] |
| 906 | } |
| 907 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 908 | if (is_linux) { |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 909 | sources += [ "src/ports/SkDebug_stdio.cpp" ] |
Hal Canary | 25375e8 | 2018-03-14 15:16:56 -0400 | [diff] [blame] | 910 | if (skia_use_egl) { |
| 911 | libs += [ "GLESv2" ] |
| 912 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 913 | } |
| 914 | |
| 915 | if (is_mac) { |
| 916 | sources += [ |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 917 | "src/ports/SkDebug_stdio.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 918 | "src/ports/SkFontHost_mac.cpp", |
| 919 | "src/ports/SkImageEncoder_CG.cpp", |
| 920 | "src/ports/SkImageGeneratorCG.cpp", |
| 921 | ] |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 922 | libs += [ |
bungeman | 3e306f6 | 2017-03-29 11:32:02 -0400 | [diff] [blame] | 923 | # AppKit symbols NSFontWeightXXX may be dlsym'ed. |
| 924 | "AppKit.framework", |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 925 | "ApplicationServices.framework", |
| 926 | "OpenGL.framework", |
| 927 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 928 | } |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 929 | |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 930 | if (is_ios) { |
| 931 | sources += [ |
| 932 | "src/ports/SkDebug_stdio.cpp", |
| 933 | "src/ports/SkFontHost_mac.cpp", |
| 934 | "src/ports/SkImageEncoder_CG.cpp", |
| 935 | "src/ports/SkImageGeneratorCG.cpp", |
| 936 | ] |
| 937 | libs += [ |
| 938 | "CoreFoundation.framework", |
| 939 | "CoreGraphics.framework", |
| 940 | "CoreText.framework", |
| 941 | "ImageIO.framework", |
| 942 | "MobileCoreServices.framework", |
bungeman | 3e306f6 | 2017-03-29 11:32:02 -0400 | [diff] [blame] | 943 | |
| 944 | # UIKit symbols UIFontWeightXXX may be dlsym'ed. |
| 945 | "UIKit.framework", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 946 | ] |
| 947 | } |
| 948 | |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 949 | if (is_fuchsia) { |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 950 | sources += [ "src/ports/SkDebug_stdio.cpp" ] |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 951 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 952 | } |
| 953 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 954 | # Targets guarded by skia_enable_tools may use //third_party freely. |
| 955 | if (skia_enable_tools) { |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 956 | # Used by gn_to_bp.py to list our public include dirs. |
| 957 | source_set("public") { |
| 958 | configs += [ ":skia_public" ] |
| 959 | } |
| 960 | |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 961 | config("skia.h_config") { |
| 962 | include_dirs = [ "$target_gen_dir" ] |
Greg Daniel | afb7ec7 | 2017-12-07 12:48:30 -0500 | [diff] [blame] | 963 | if (skia_use_vulkan) { |
| 964 | # So we can get the header which includes vulkan |
| 965 | include_dirs += [ "tools/gpu/vk" ] |
| 966 | } |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 967 | } |
| 968 | action("skia.h") { |
| 969 | public_configs = [ ":skia.h_config" ] |
| 970 | skia_h = "$target_gen_dir/skia.h" |
| 971 | script = "gn/find_headers.py" |
Greg Daniel | c819e66 | 2017-04-19 16:39:45 -0400 | [diff] [blame] | 972 | args = [ rebase_path(skia_h, root_build_dir) ] + |
Robert Phillips | fcd5fdd | 2017-06-14 01:43:29 +0000 | [diff] [blame] | 973 | rebase_path(skia_public_includes) |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 974 | depfile = "$skia_h.deps" |
| 975 | outputs = [ |
| 976 | skia_h, |
| 977 | ] |
| 978 | } |
| 979 | |
| 980 | if (skia_enable_gpu && target_cpu == "x64") { |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 981 | executable("fiddle") { |
| 982 | libs = [] |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 983 | sources = [ |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 984 | "tools/fiddle/draw.cpp", |
| 985 | "tools/fiddle/fiddle_main.cpp", |
| 986 | ] |
Joe Gregorio | a8fabd3 | 2017-05-31 09:45:19 -0400 | [diff] [blame] | 987 | |
| 988 | if (skia_use_egl) { |
| 989 | sources += [ "tools/fiddle/egl_context.cpp" ] |
Joe Gregorio | a8fabd3 | 2017-05-31 09:45:19 -0400 | [diff] [blame] | 990 | } else { |
| 991 | sources += [ "tools/fiddle/null_context.cpp" ] |
| 992 | } |
Joe Gregorio | 1e735c0 | 2017-04-19 14:05:14 -0400 | [diff] [blame] | 993 | testonly = true |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 994 | deps = [ |
Joe Gregorio | 1e735c0 | 2017-04-19 14:05:14 -0400 | [diff] [blame] | 995 | ":flags", |
Robert Phillips | 57e0828 | 2017-11-16 14:59:48 -0500 | [diff] [blame] | 996 | ":gpu_tool_utils", |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 997 | ":skia", |
| 998 | ":skia.h", |
| 999 | ] |
| 1000 | } |
| 1001 | } |
| 1002 | |
| 1003 | if (skia_enable_gpu) { |
| 1004 | source_set("public_headers_warnings_check") { |
| 1005 | sources = [ |
| 1006 | "tools/public_headers_warnings_check.cpp", |
| 1007 | ] |
| 1008 | configs -= [ "//gn:warnings_except_public_headers" ] |
| 1009 | deps = [ |
| 1010 | ":skia", |
| 1011 | ":skia.h", |
| 1012 | ] |
| 1013 | } |
| 1014 | } |
| 1015 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1016 | template("test_lib") { |
| 1017 | config(target_name + "_config") { |
| 1018 | include_dirs = invoker.public_include_dirs |
mtklein | a627b5c | 2016-09-20 13:36:47 -0700 | [diff] [blame] | 1019 | if (defined(invoker.public_defines)) { |
| 1020 | defines = invoker.public_defines |
| 1021 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1022 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1023 | source_set(target_name) { |
| 1024 | forward_variables_from(invoker, "*", [ "public_include_dirs" ]) |
| 1025 | public_configs = [ |
| 1026 | ":" + target_name + "_config", |
| 1027 | ":skia_private", |
| 1028 | ] |
| 1029 | |
| 1030 | if (!defined(deps)) { |
| 1031 | deps = [] |
| 1032 | } |
| 1033 | deps += [ ":skia" ] |
| 1034 | testonly = true |
| 1035 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1036 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1037 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1038 | template("test_app") { |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1039 | if (is_ios) { |
| 1040 | app_name = target_name |
| 1041 | gen_path = target_gen_dir |
| 1042 | |
| 1043 | action("${app_name}_generate_info_plist") { |
| 1044 | script = "//gn/gen_plist_ios.py" |
| 1045 | outputs = [ |
| 1046 | "$gen_path/${app_name}_Info.plist", |
| 1047 | ] |
| 1048 | args = [ rebase_path("$gen_path/$app_name", root_build_dir) ] |
| 1049 | } |
| 1050 | |
| 1051 | bundle_data("${app_name}_bundle_info_plist") { |
| 1052 | public_deps = [ |
| 1053 | ":${app_name}_generate_info_plist", |
| 1054 | ] |
| 1055 | sources = [ |
| 1056 | "$gen_path/${app_name}_Info.plist", |
| 1057 | ] |
| 1058 | outputs = [ |
| 1059 | "{{bundle_root_dir}}/Info.plist", |
| 1060 | ] |
| 1061 | } |
| 1062 | |
Jim Van Verth | 329c5a6 | 2017-11-29 11:42:33 -0500 | [diff] [blame] | 1063 | bundle_ios_data = |
| 1064 | defined(invoker.bundle_ios_data) && invoker.bundle_ios_data |
| 1065 | |
| 1066 | if (bundle_ios_data) { |
| 1067 | has_skps = |
| 1068 | "True" == exec_script("//gn/checkdir.py", |
| 1069 | [ rebase_path("skps", root_build_dir) ], |
| 1070 | "trim string") |
| 1071 | bundle_data("${app_name}_bundle_resources") { |
| 1072 | sources = [ |
| 1073 | "resources", |
| 1074 | ] |
| 1075 | outputs = [ |
| 1076 | # iOS reserves the folders 'Resources' and 'resources' so store one level deeper |
| 1077 | "{{bundle_resources_dir}}/data/resources", |
| 1078 | ] |
| 1079 | } |
| 1080 | |
| 1081 | if (has_skps) { |
| 1082 | bundle_data("${app_name}_bundle_skps") { |
| 1083 | sources = [ |
| 1084 | "skps", |
| 1085 | ] |
| 1086 | outputs = [ |
| 1087 | # Store in same folder as resources |
| 1088 | "{{bundle_resources_dir}}/data/skps", |
| 1089 | ] |
| 1090 | } |
| 1091 | } |
| 1092 | } |
| 1093 | |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1094 | executable("${app_name}_generate_executable") { |
| 1095 | forward_variables_from(invoker, |
| 1096 | "*", |
| 1097 | [ |
| 1098 | "output_name", |
| 1099 | "visibility", |
| 1100 | "is_shared_library", |
| 1101 | ]) |
Mike Klein | 154e6da | 2017-07-26 15:13:47 -0400 | [diff] [blame] | 1102 | configs += [ ":skia_private" ] |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1103 | testonly = true |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1104 | output_name = rebase_path("$gen_path/$app_name", root_build_dir) |
| 1105 | } |
| 1106 | |
| 1107 | bundle_data("${app_name}_bundle_executable") { |
| 1108 | public_deps = [ |
| 1109 | ":${app_name}_generate_executable", |
| 1110 | ] |
| 1111 | sources = [ |
| 1112 | "$gen_path/$app_name", |
| 1113 | ] |
| 1114 | outputs = [ |
| 1115 | "{{bundle_executable_dir}}/$app_name", |
| 1116 | ] |
| 1117 | testonly = true |
| 1118 | } |
| 1119 | |
| 1120 | create_bundle("$app_name") { |
| 1121 | product_type = "com.apple.product-type.application" |
| 1122 | testonly = true |
| 1123 | |
| 1124 | bundle_root_dir = "${root_build_dir}/${target_name}.app" |
| 1125 | bundle_resources_dir = bundle_root_dir |
| 1126 | bundle_executable_dir = bundle_root_dir |
| 1127 | bundle_plugins_dir = bundle_root_dir + "/Plugins" |
| 1128 | |
| 1129 | deps = [ |
| 1130 | ":${app_name}_bundle_executable", |
| 1131 | ":${app_name}_bundle_info_plist", |
| 1132 | ] |
Jim Van Verth | 329c5a6 | 2017-11-29 11:42:33 -0500 | [diff] [blame] | 1133 | if (bundle_ios_data) { |
| 1134 | deps += [ ":${app_name}_bundle_resources" ] |
| 1135 | if (has_skps) { |
| 1136 | deps += [ ":${app_name}_bundle_skps" ] |
| 1137 | } |
| 1138 | } |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1139 | |
| 1140 | # should only code sign when running on a device, not the simulator |
| 1141 | if (target_cpu != "x64") { |
| 1142 | code_signing_script = "//gn/codesign_ios.py" |
| 1143 | code_signing_sources = [ "$target_gen_dir/$app_name" ] |
| 1144 | code_signing_outputs = [ |
| 1145 | "$bundle_root_dir/_CodeSignature/CodeResources", |
| 1146 | "$bundle_root_dir/embedded.mobileprovision", |
| 1147 | ] |
Jim Van Verth | 4e50297 | 2017-12-07 15:16:10 -0500 | [diff] [blame] | 1148 | code_signing_args = [ |
| 1149 | rebase_path("$bundle_root_dir", root_build_dir), |
| 1150 | skia_ios_identity, |
| 1151 | skia_ios_profile, |
| 1152 | ] |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1153 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1154 | } |
| 1155 | } else { |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1156 | # !is_ios |
| 1157 | |
| 1158 | if (defined(invoker.is_shared_library) && invoker.is_shared_library) { |
| 1159 | shared_library("lib" + target_name) { |
| 1160 | forward_variables_from(invoker, "*", [ "is_shared_library" ]) |
| 1161 | configs += [ ":skia_private" ] |
| 1162 | testonly = true |
| 1163 | } |
| 1164 | } else { |
| 1165 | _executable = target_name |
| 1166 | executable(_executable) { |
| 1167 | forward_variables_from(invoker, "*", [ "is_shared_library" ]) |
| 1168 | configs += [ ":skia_private" ] |
| 1169 | testonly = true |
| 1170 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1171 | } |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1172 | if (is_android && skia_android_serial != "" && defined(_executable)) { |
| 1173 | action("push_" + target_name) { |
| 1174 | script = "gn/push_to_android.py" |
| 1175 | deps = [ |
| 1176 | ":" + _executable, |
| 1177 | ] |
| 1178 | _stamp = "$target_gen_dir/$_executable.pushed_$skia_android_serial" |
| 1179 | outputs = [ |
| 1180 | _stamp, |
| 1181 | ] |
| 1182 | args = [ |
| 1183 | rebase_path("$root_build_dir/$_executable"), |
| 1184 | skia_android_serial, |
| 1185 | rebase_path(_stamp), |
| 1186 | ] |
| 1187 | testonly = true |
| 1188 | } |
Mike Klein | 7d92103 | 2017-01-05 12:20:41 -0500 | [diff] [blame] | 1189 | } |
| 1190 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1191 | } |
| 1192 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1193 | test_lib("gpu_tool_utils") { |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1194 | public_include_dirs = [] |
| 1195 | if (skia_enable_gpu) { |
| 1196 | public_defines = [] |
| 1197 | public_include_dirs += [ "tools/gpu" ] |
mtklein | d68f9b0 | 2016-09-23 13:18:41 -0700 | [diff] [blame] | 1198 | |
| 1199 | deps = [] |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1200 | sources = [ |
| 1201 | "tools/gpu/GrContextFactory.cpp", |
| 1202 | "tools/gpu/GrTest.cpp", |
Brian Salomon | 58389b9 | 2018-03-07 13:01:25 -0500 | [diff] [blame] | 1203 | "tools/gpu/ProxyUtils.cpp", |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1204 | "tools/gpu/TestContext.cpp", |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 1205 | "tools/gpu/atlastext/GLTestAtlasTextRenderer.cpp", |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1206 | "tools/gpu/gl/GLTestContext.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 1207 | "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp", |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1208 | "tools/gpu/gl/debug/DebugGLTestContext.cpp", |
| 1209 | "tools/gpu/gl/debug/GrBufferObj.cpp", |
| 1210 | "tools/gpu/gl/debug/GrFrameBufferObj.cpp", |
| 1211 | "tools/gpu/gl/debug/GrProgramObj.cpp", |
| 1212 | "tools/gpu/gl/debug/GrShaderObj.cpp", |
| 1213 | "tools/gpu/gl/debug/GrTextureObj.cpp", |
| 1214 | "tools/gpu/gl/debug/GrTextureUnitObj.cpp", |
| 1215 | "tools/gpu/gl/null/NullGLTestContext.cpp", |
Brian Salomon | cfe910d | 2017-07-06 16:40:18 -0400 | [diff] [blame] | 1216 | "tools/gpu/mock/MockTestContext.cpp", |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1217 | ] |
| 1218 | libs = [] |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1219 | |
Kevin Lubick | 4a24e10 | 2017-03-29 11:19:01 -0400 | [diff] [blame] | 1220 | if (is_android || skia_use_egl) { |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1221 | sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1222 | } else if (is_ios) { |
| 1223 | sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ] |
| 1224 | libs += [ "OpenGLES.framework" ] |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1225 | } else if (is_linux) { |
| 1226 | sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] |
Mike Klein | a979a1d | 2017-02-23 10:31:13 -0500 | [diff] [blame] | 1227 | libs += [ "X11" ] |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1228 | } else if (is_mac) { |
| 1229 | sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 1230 | } else if (is_win) { |
| 1231 | sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ] |
| 1232 | libs += [ |
| 1233 | "Gdi32.lib", |
| 1234 | "OpenGL32.lib", |
| 1235 | ] |
mtklein | 38925aa | 2016-09-21 10:11:25 -0700 | [diff] [blame] | 1236 | } |
mtklein | 6ef6999 | 2016-09-14 06:12:09 -0700 | [diff] [blame] | 1237 | |
Greg Daniel | 6b7e0e2 | 2017-07-12 16:21:09 -0400 | [diff] [blame] | 1238 | cflags_objcc = [ "-fobjc-arc" ] |
| 1239 | |
Mike Klein | c168a3a | 2016-11-14 14:53:13 +0000 | [diff] [blame] | 1240 | if (skia_use_angle) { |
Mike Klein | c168a3a | 2016-11-14 14:53:13 +0000 | [diff] [blame] | 1241 | deps += [ "//third_party/angle2" ] |
| 1242 | sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ] |
| 1243 | } |
mtklein | d68f9b0 | 2016-09-23 13:18:41 -0700 | [diff] [blame] | 1244 | if (skia_use_vulkan) { |
| 1245 | sources += [ "tools/gpu/vk/VkTestContext.cpp" ] |
Greg Daniel | 35970ec | 2017-11-10 10:03:05 -0500 | [diff] [blame] | 1246 | sources += [ "tools/gpu/vk/VkTestUtils.cpp" ] |
mtklein | d68f9b0 | 2016-09-23 13:18:41 -0700 | [diff] [blame] | 1247 | } |
Greg Daniel | b76a72a | 2017-07-13 15:07:54 -0400 | [diff] [blame] | 1248 | if (skia_use_metal) { |
| 1249 | sources += [ "tools/gpu/mtl/MtlTestContext.mm" ] |
| 1250 | } |
mtklein | a627b5c | 2016-09-20 13:36:47 -0700 | [diff] [blame] | 1251 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1252 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1253 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1254 | test_lib("flags") { |
| 1255 | public_include_dirs = [ "tools/flags" ] |
| 1256 | sources = [ |
| 1257 | "tools/flags/SkCommandLineFlags.cpp", |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1258 | ] |
| 1259 | } |
| 1260 | test_lib("common_flags") { |
| 1261 | public_include_dirs = [ "tools/flags" ] |
| 1262 | sources = [ |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1263 | "tools/flags/SkCommonFlags.cpp", |
| 1264 | "tools/flags/SkCommonFlagsConfig.cpp", |
| 1265 | ] |
| 1266 | deps = [ |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1267 | ":flags", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1268 | ":gpu_tool_utils", |
| 1269 | ] |
| 1270 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1271 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1272 | test_lib("tool_utils") { |
| 1273 | public_include_dirs = [ |
| 1274 | "tools", |
| 1275 | "tools/debugger", |
Ben Wagner | 483c772 | 2018-02-20 17:06:07 -0500 | [diff] [blame] | 1276 | "tools/fonts", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1277 | "tools/timer", |
Brian Salomon | dcbb9d9 | 2017-07-19 10:53:20 -0400 | [diff] [blame] | 1278 | "tools/trace", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1279 | ] |
| 1280 | sources = [ |
mtklein | b37c034 | 2016-09-09 11:07:45 -0700 | [diff] [blame] | 1281 | "tools/AndroidSkDebugToStdOut.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1282 | "tools/CrashHandler.cpp", |
mtklein | 0590fa5 | 2016-09-01 07:06:54 -0700 | [diff] [blame] | 1283 | "tools/LsanSuppressions.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1284 | "tools/ProcStats.cpp", |
| 1285 | "tools/Resources.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1286 | "tools/UrlDataManager.cpp", |
| 1287 | "tools/debugger/SkDebugCanvas.cpp", |
| 1288 | "tools/debugger/SkDrawCommand.cpp", |
| 1289 | "tools/debugger/SkJsonWriteBuffer.cpp", |
| 1290 | "tools/debugger/SkObjectParser.cpp", |
Brian Salomon | 5f33a8c | 2018-02-26 14:32:39 -0500 | [diff] [blame] | 1291 | "tools/fonts/SkRandomScalerContext.cpp", |
| 1292 | "tools/fonts/SkTestFontMgr.cpp", |
Ben Wagner | 97182cc | 2018-02-15 10:20:04 -0500 | [diff] [blame] | 1293 | "tools/fonts/SkTestFontMgr.h", |
| 1294 | "tools/fonts/SkTestSVGTypeface.cpp", |
| 1295 | "tools/fonts/SkTestSVGTypeface.h", |
| 1296 | "tools/fonts/SkTestTypeface.cpp", |
| 1297 | "tools/fonts/SkTestTypeface.h", |
Brian Salomon | 5f33a8c | 2018-02-26 14:32:39 -0500 | [diff] [blame] | 1298 | "tools/fonts/sk_tool_utils_font.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1299 | "tools/picture_utils.cpp", |
| 1300 | "tools/random_parse_path.cpp", |
| 1301 | "tools/sk_tool_utils.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1302 | "tools/timer/Timer.cpp", |
Brian Osman | 53136aa | 2017-07-20 15:43:35 -0400 | [diff] [blame] | 1303 | "tools/trace/SkChromeTracingTracer.cpp", |
| 1304 | "tools/trace/SkChromeTracingTracer.h", |
Brian Salomon | dcbb9d9 | 2017-07-19 10:53:20 -0400 | [diff] [blame] | 1305 | "tools/trace/SkDebugfTracer.cpp", |
| 1306 | "tools/trace/SkDebugfTracer.h", |
Brian Osman | 53136aa | 2017-07-20 15:43:35 -0400 | [diff] [blame] | 1307 | "tools/trace/SkEventTracingPriv.cpp", |
| 1308 | "tools/trace/SkEventTracingPriv.h", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1309 | ] |
Mike Klein | adacaef | 2017-02-06 09:26:14 -0500 | [diff] [blame] | 1310 | libs = [] |
| 1311 | if (is_ios) { |
| 1312 | sources += [ "tools/ios_utils.m" ] |
| 1313 | libs += [ "Foundation.framework" ] |
| 1314 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1315 | deps = [ |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1316 | ":common_flags", |
Ben Wagner | 97182cc | 2018-02-15 10:20:04 -0500 | [diff] [blame] | 1317 | ":experimental_svg_model", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1318 | ":flags", |
| 1319 | "//third_party/libpng", |
| 1320 | ] |
| 1321 | public_deps = [ |
| 1322 | "//third_party/jsoncpp", |
| 1323 | ] |
| 1324 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1325 | |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1326 | import("gn/gm.gni") |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1327 | test_lib("gm") { |
| 1328 | public_include_dirs = [ "gm" ] |
| 1329 | sources = gm_sources |
| 1330 | deps = [ |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1331 | ":experimental_sksg", |
scroggo | 19b9153 | 2016-10-24 09:03:26 -0700 | [diff] [blame] | 1332 | ":flags", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1333 | ":gpu_tool_utils", |
| 1334 | ":skia", |
| 1335 | ":tool_utils", |
| 1336 | ] |
| 1337 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1338 | |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1339 | import("gn/tests.gni") |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1340 | test_lib("tests") { |
| 1341 | public_include_dirs = [ "tests" ] |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1342 | sources = tests_sources + pathops_tests_sources |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 1343 | if (!fontmgr_android_enabled) { |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1344 | sources -= [ "//tests/FontMgrAndroidParserTest.cpp" ] |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 1345 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1346 | deps = [ |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1347 | ":experimental_sksg", |
Hal Canary | 0f66681 | 2018-03-22 15:21:12 -0400 | [diff] [blame] | 1348 | ":experimental_svg_model", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1349 | ":flags", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1350 | ":skia", |
| 1351 | ":tool_utils", |
| 1352 | "//third_party/libpng", |
| 1353 | "//third_party/zlib", |
| 1354 | ] |
Mike Klein | d63442d | 2017-03-27 14:16:04 -0400 | [diff] [blame] | 1355 | public_deps = [ |
| 1356 | ":gpu_tool_utils", # Test.h #includes headers from this target. |
| 1357 | ] |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1358 | } |
mtklein | 2f3416d | 2016-08-02 16:02:05 -0700 | [diff] [blame] | 1359 | |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1360 | import("gn/bench.gni") |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1361 | test_lib("bench") { |
| 1362 | public_include_dirs = [ "bench" ] |
| 1363 | sources = bench_sources |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1364 | deps = [ |
| 1365 | ":flags", |
| 1366 | ":gm", |
| 1367 | ":gpu_tool_utils", |
| 1368 | ":skia", |
| 1369 | ":tool_utils", |
| 1370 | ] |
| 1371 | } |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 1372 | |
Florin Malita | 54f65c4 | 2018-01-16 17:04:30 -0500 | [diff] [blame] | 1373 | test_lib("experimental_skottie") { |
| 1374 | public_include_dirs = [ "experimental/skottie" ] |
Florin Malita | 094ccde | 2017-12-30 12:27:00 -0500 | [diff] [blame] | 1375 | include_dirs = [ "tools" ] |
| 1376 | sources = [ |
Florin Malita | 54f65c4 | 2018-01-16 17:04:30 -0500 | [diff] [blame] | 1377 | "experimental/skottie/Skottie.cpp", |
Florin Malita | a6e30f7 | 2018-03-23 13:41:58 -0400 | [diff] [blame] | 1378 | "experimental/skottie/SkottieAdapter.cpp", |
Florin Malita | 54f65c4 | 2018-01-16 17:04:30 -0500 | [diff] [blame] | 1379 | "experimental/skottie/SkottieAnimator.cpp", |
Florin Malita | cf8ed52 | 2018-01-25 15:27:33 -0500 | [diff] [blame] | 1380 | "experimental/skottie/SkottieParser.cpp", |
Florin Malita | a6e30f7 | 2018-03-23 13:41:58 -0400 | [diff] [blame] | 1381 | "experimental/skottie/SkottieValue.cpp", |
Florin Malita | 094ccde | 2017-12-30 12:27:00 -0500 | [diff] [blame] | 1382 | ] |
| 1383 | deps = [ |
| 1384 | ":experimental_sksg", |
| 1385 | ":skia", |
| 1386 | "//third_party/jsoncpp", |
| 1387 | ] |
| 1388 | } |
| 1389 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1390 | test_lib("experimental_svg_model") { |
Hal Canary | 0f66681 | 2018-03-22 15:21:12 -0400 | [diff] [blame] | 1391 | public_include_dirs = [] |
| 1392 | if (skia_use_expat) { |
| 1393 | public_include_dirs += [ "experimental/svg/model" ] |
| 1394 | sources = [ |
| 1395 | "experimental/svg/model/SkSVGAttribute.cpp", |
| 1396 | "experimental/svg/model/SkSVGAttributeParser.cpp", |
| 1397 | "experimental/svg/model/SkSVGCircle.cpp", |
| 1398 | "experimental/svg/model/SkSVGClipPath.cpp", |
| 1399 | "experimental/svg/model/SkSVGContainer.cpp", |
| 1400 | "experimental/svg/model/SkSVGDOM.cpp", |
| 1401 | "experimental/svg/model/SkSVGEllipse.cpp", |
| 1402 | "experimental/svg/model/SkSVGGradient.cpp", |
| 1403 | "experimental/svg/model/SkSVGLine.cpp", |
| 1404 | "experimental/svg/model/SkSVGLinearGradient.cpp", |
| 1405 | "experimental/svg/model/SkSVGNode.cpp", |
| 1406 | "experimental/svg/model/SkSVGPath.cpp", |
| 1407 | "experimental/svg/model/SkSVGPattern.cpp", |
| 1408 | "experimental/svg/model/SkSVGPoly.cpp", |
| 1409 | "experimental/svg/model/SkSVGRadialGradient.cpp", |
| 1410 | "experimental/svg/model/SkSVGRect.cpp", |
| 1411 | "experimental/svg/model/SkSVGRenderContext.cpp", |
| 1412 | "experimental/svg/model/SkSVGSVG.cpp", |
| 1413 | "experimental/svg/model/SkSVGShape.cpp", |
| 1414 | "experimental/svg/model/SkSVGStop.cpp", |
| 1415 | "experimental/svg/model/SkSVGTransformableNode.cpp", |
| 1416 | "experimental/svg/model/SkSVGUse.cpp", |
| 1417 | "experimental/svg/model/SkSVGValue.cpp", |
| 1418 | ] |
| 1419 | deps = [ |
| 1420 | ":skia", |
| 1421 | ":xml", |
| 1422 | ] |
| 1423 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1424 | } |
fmalita | a2b9fdf | 2016-08-03 19:53:36 -0700 | [diff] [blame] | 1425 | |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1426 | test_lib("experimental_sksg") { |
| 1427 | public_include_dirs = [ |
| 1428 | "experimental/sksg", |
| 1429 | "experimental/sksg/effects", |
| 1430 | "experimental/sksg/geometry", |
| 1431 | "experimental/sksg/paint", |
| 1432 | ] |
| 1433 | sources = [ |
| 1434 | "experimental/sksg/SkSGDraw.cpp", |
| 1435 | "experimental/sksg/SkSGEffectNode.cpp", |
| 1436 | "experimental/sksg/SkSGGeometryNode.cpp", |
| 1437 | "experimental/sksg/SkSGGroup.cpp", |
Florin Malita | 4932807 | 2018-01-08 12:51:12 -0500 | [diff] [blame] | 1438 | "experimental/sksg/SkSGImage.cpp", |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1439 | "experimental/sksg/SkSGInvalidationController.cpp", |
| 1440 | "experimental/sksg/SkSGNode.cpp", |
| 1441 | "experimental/sksg/SkSGPaintNode.cpp", |
| 1442 | "experimental/sksg/SkSGRenderNode.cpp", |
Florin Malita | 35efaa8 | 2018-01-22 12:57:06 -0500 | [diff] [blame] | 1443 | "experimental/sksg/SkSGScene.cpp", |
Florin Malita | 38ea40e | 2018-01-29 16:31:14 -0500 | [diff] [blame] | 1444 | "experimental/sksg/effects/SkSGClipEffect.cpp", |
Florin Malita | 5f9102f | 2018-01-10 13:36:22 -0500 | [diff] [blame] | 1445 | "experimental/sksg/effects/SkSGMaskEffect.cpp", |
Florin Malita | c003417 | 2018-01-08 16:42:59 -0500 | [diff] [blame] | 1446 | "experimental/sksg/effects/SkSGOpacityEffect.cpp", |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1447 | "experimental/sksg/effects/SkSGTransform.cpp", |
Florin Malita | 16d0ad0 | 2018-01-19 15:07:29 -0500 | [diff] [blame] | 1448 | "experimental/sksg/geometry/SkSGGeometryTransform.cpp", |
Florin Malita | e6345d9 | 2018-01-03 23:37:54 -0500 | [diff] [blame] | 1449 | "experimental/sksg/geometry/SkSGMerge.cpp", |
Florin Malita | 047ae27 | 2017-12-27 11:13:13 -0500 | [diff] [blame] | 1450 | "experimental/sksg/geometry/SkSGPath.cpp", |
Florin Malita | 97b3d2b | 2018-02-20 11:26:15 -0500 | [diff] [blame] | 1451 | "experimental/sksg/geometry/SkSGPlane.cpp", |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1452 | "experimental/sksg/geometry/SkSGRect.cpp", |
Florin Malita | 51012ce | 2018-01-31 17:06:59 -0500 | [diff] [blame] | 1453 | "experimental/sksg/geometry/SkSGText.cpp", |
Florin Malita | 51b8c89 | 2018-01-07 08:54:24 -0500 | [diff] [blame] | 1454 | "experimental/sksg/geometry/SkSGTrimEffect.cpp", |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1455 | "experimental/sksg/paint/SkSGColor.cpp", |
Florin Malita | 6aaee59 | 2018-01-12 12:25:09 -0500 | [diff] [blame] | 1456 | "experimental/sksg/paint/SkSGGradient.cpp", |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1457 | ] |
| 1458 | deps = [ |
| 1459 | ":skia", |
| 1460 | ] |
| 1461 | } |
| 1462 | |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1463 | if (target_cpu != "wasm") { |
| 1464 | test_lib("views") { |
| 1465 | public_include_dirs = [ "include/views" ] |
| 1466 | sources = [ |
| 1467 | "src/views/SkEvent.cpp", |
| 1468 | "src/views/SkEventSink.cpp", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1469 | "src/views/SkTouchGesture.cpp", |
| 1470 | "src/views/SkView.cpp", |
Brian Osman | 2dd9693 | 2016-10-18 15:33:53 -0400 | [diff] [blame] | 1471 | ] |
Brian Osman | 34755e2 | 2016-12-05 09:46:02 -0500 | [diff] [blame] | 1472 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1473 | } |
| 1474 | |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1475 | if (skia_use_lua) { |
| 1476 | test_lib("lua") { |
| 1477 | public_include_dirs = [] |
| 1478 | sources = [ |
| 1479 | "src/utils/SkLua.cpp", |
| 1480 | "src/utils/SkLuaCanvas.cpp", |
| 1481 | ] |
| 1482 | deps = [ |
| 1483 | "//third_party/lua", |
| 1484 | ] |
| 1485 | } |
| 1486 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1487 | test_app("lua_app") { |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1488 | sources = [ |
| 1489 | "tools/lua/lua_app.cpp", |
| 1490 | ] |
| 1491 | deps = [ |
| 1492 | ":lua", |
| 1493 | ":skia", |
| 1494 | "//third_party/lua", |
| 1495 | ] |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1496 | } |
| 1497 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1498 | test_app("lua_pictures") { |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1499 | sources = [ |
| 1500 | "tools/lua/lua_pictures.cpp", |
| 1501 | ] |
| 1502 | deps = [ |
| 1503 | ":flags", |
| 1504 | ":lua", |
| 1505 | ":skia", |
| 1506 | ":tool_utils", |
| 1507 | "//third_party/lua", |
| 1508 | ] |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1509 | } |
| 1510 | } |
| 1511 | |
Cary Clark | 8032b98 | 2017-07-28 11:04:54 -0400 | [diff] [blame] | 1512 | test_app("bookmaker") { |
| 1513 | sources = [ |
| 1514 | "tools/bookmaker/bookmaker.cpp", |
Cary Clark | bef063a | 2017-10-31 15:44:45 -0400 | [diff] [blame] | 1515 | "tools/bookmaker/cataloger.cpp", |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 1516 | "tools/bookmaker/definition.cpp", |
Cary Clark | 8032b98 | 2017-07-28 11:04:54 -0400 | [diff] [blame] | 1517 | "tools/bookmaker/fiddleParser.cpp", |
| 1518 | "tools/bookmaker/includeParser.cpp", |
| 1519 | "tools/bookmaker/includeWriter.cpp", |
| 1520 | "tools/bookmaker/mdOut.cpp", |
| 1521 | "tools/bookmaker/parserCommon.cpp", |
Cary Clark | ac47b88 | 2018-01-11 10:35:44 -0500 | [diff] [blame] | 1522 | "tools/bookmaker/selfCheck.cpp", |
Cary Clark | 8032b98 | 2017-07-28 11:04:54 -0400 | [diff] [blame] | 1523 | "tools/bookmaker/spellCheck.cpp", |
| 1524 | ] |
| 1525 | deps = [ |
| 1526 | ":flags", |
| 1527 | ":skia", |
| 1528 | ":tool_utils", |
Cary Clark | 2f46624 | 2017-12-11 16:03:17 -0500 | [diff] [blame] | 1529 | "//third_party/jsoncpp", |
Cary Clark | 8032b98 | 2017-07-28 11:04:54 -0400 | [diff] [blame] | 1530 | ] |
| 1531 | } |
| 1532 | |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1533 | if (target_cpu != "wasm") { |
| 1534 | import("gn/samples.gni") |
| 1535 | test_lib("samples") { |
| 1536 | public_include_dirs = [ "samplecode" ] |
| 1537 | include_dirs = [ "experimental" ] |
Yuqian Li | 56a4a09 | 2018-02-12 14:47:34 +0800 | [diff] [blame] | 1538 | sources = samples_sources |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1539 | deps = [ |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1540 | ":experimental_sksg", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1541 | ":experimental_svg_model", |
| 1542 | ":flags", |
| 1543 | ":gm", |
Mike Reed | 193d3a0 | 2018-02-08 15:45:51 -0500 | [diff] [blame] | 1544 | ":skshaper", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1545 | ":tool_utils", |
| 1546 | ":views", |
| 1547 | ":xml", |
| 1548 | ] |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1549 | |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1550 | if (skia_use_lua) { |
| 1551 | sources += [ "samplecode/SampleLua.cpp" ] |
| 1552 | deps += [ |
| 1553 | ":lua", |
| 1554 | "//third_party/lua", |
| 1555 | ] |
| 1556 | } |
| 1557 | } |
| 1558 | test_app("dm") { |
| 1559 | sources = [ |
| 1560 | "dm/DM.cpp", |
Hal Canary | b6c5e5b | 2017-10-09 16:13:02 -0400 | [diff] [blame] | 1561 | "dm/DMGpuTestProcs.cpp", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1562 | "dm/DMJsonWriter.cpp", |
| 1563 | "dm/DMSrcSink.cpp", |
| 1564 | ] |
| 1565 | include_dirs = [ "tests" ] |
| 1566 | deps = [ |
| 1567 | ":common_flags", |
Florin Malita | 54f65c4 | 2018-01-16 17:04:30 -0500 | [diff] [blame] | 1568 | ":experimental_skottie", |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1569 | ":experimental_sksg", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1570 | ":experimental_svg_model", |
| 1571 | ":flags", |
| 1572 | ":gm", |
| 1573 | ":gpu_tool_utils", |
| 1574 | ":skia", |
| 1575 | ":tests", |
| 1576 | ":tool_utils", |
| 1577 | "//third_party/jsoncpp", |
| 1578 | "//third_party/libpng", |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1579 | ] |
| 1580 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1581 | } |
| 1582 | |
Mike Klein | a8a51ce | 2018-01-09 12:34:11 -0500 | [diff] [blame] | 1583 | if (!is_win) { |
| 1584 | test_app("remote_demo") { |
| 1585 | sources = [ |
| 1586 | "tools/remote_demo.cpp", |
| 1587 | ] |
| 1588 | deps = [ |
| 1589 | ":skia", |
| 1590 | ] |
| 1591 | } |
| 1592 | } |
| 1593 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1594 | test_app("nanobench") { |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 1595 | sources = [ |
| 1596 | "bench/nanobench.cpp", |
| 1597 | ] |
| 1598 | deps = [ |
| 1599 | ":bench", |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1600 | ":common_flags", |
Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame] | 1601 | ":experimental_sksg", |
fmalita | 6519c21 | 2016-09-14 08:05:17 -0700 | [diff] [blame] | 1602 | ":experimental_svg_model", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 1603 | ":flags", |
| 1604 | ":gm", |
| 1605 | ":gpu_tool_utils", |
| 1606 | ":skia", |
| 1607 | ":tool_utils", |
| 1608 | "//third_party/jsoncpp", |
| 1609 | ] |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 1610 | } |
halcanary | 19a9720 | 2016-08-03 15:08:04 -0700 | [diff] [blame] | 1611 | |
Ravi Mistry | 10d36c5 | 2017-01-31 09:49:18 -0500 | [diff] [blame] | 1612 | test_app("skpinfo") { |
| 1613 | sources = [ |
| 1614 | "tools/skpinfo.cpp", |
| 1615 | ] |
| 1616 | deps = [ |
| 1617 | ":flags", |
| 1618 | ":skia", |
| 1619 | ] |
| 1620 | } |
| 1621 | |
Jim Van Verth | 8f5468f | 2016-10-31 09:52:33 -0400 | [diff] [blame] | 1622 | if (skia_enable_gpu) { |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1623 | test_app("skpbench") { |
Jim Van Verth | 8f5468f | 2016-10-31 09:52:33 -0400 | [diff] [blame] | 1624 | sources = [ |
| 1625 | "tools/skpbench/skpbench.cpp", |
| 1626 | ] |
| 1627 | deps = [ |
| 1628 | ":flags", |
| 1629 | ":gpu_tool_utils", |
| 1630 | ":skia", |
| 1631 | ":tool_utils", |
| 1632 | ] |
Jim Van Verth | b6c5e53 | 2016-10-28 10:38:08 -0400 | [diff] [blame] | 1633 | } |
csmartdalton | 4b5179b | 2016-09-19 11:03:58 -0700 | [diff] [blame] | 1634 | } |
| 1635 | |
Hal Canary | 96c5725 | 2018-02-09 11:43:05 -0500 | [diff] [blame] | 1636 | test_lib("skshaper") { |
| 1637 | public_include_dirs = [ "tools/shape" ] |
| 1638 | deps = [ |
| 1639 | ":skia", |
| 1640 | ] |
| 1641 | |
Hal Canary | 8bb4083 | 2018-02-08 15:16:28 -0500 | [diff] [blame] | 1642 | if (target_cpu == "wasm") { |
Hal Canary | 96c5725 | 2018-02-09 11:43:05 -0500 | [diff] [blame] | 1643 | sources = [ |
| 1644 | "tools/shape/SkShaper_primitive.cpp", |
| 1645 | ] |
| 1646 | } else { |
mtklein | 6f5df6a | 2016-08-29 16:01:10 -0700 | [diff] [blame] | 1647 | sources = [ |
Ben Wagner | a25fbef | 2017-08-30 13:56:19 -0400 | [diff] [blame] | 1648 | "tools/shape/SkShaper_harfbuzz.cpp", |
mtklein | 6f5df6a | 2016-08-29 16:01:10 -0700 | [diff] [blame] | 1649 | ] |
Hal Canary | 96c5725 | 2018-02-09 11:43:05 -0500 | [diff] [blame] | 1650 | deps += [ |
mtklein | 6f5df6a | 2016-08-29 16:01:10 -0700 | [diff] [blame] | 1651 | "//third_party/harfbuzz", |
Ben Wagner | a25fbef | 2017-08-30 13:56:19 -0400 | [diff] [blame] | 1652 | "//third_party/icu", |
mtklein | 6f5df6a | 2016-08-29 16:01:10 -0700 | [diff] [blame] | 1653 | ] |
mtklein | 6f5df6a | 2016-08-29 16:01:10 -0700 | [diff] [blame] | 1654 | } |
halcanary | 19a9720 | 2016-08-03 15:08:04 -0700 | [diff] [blame] | 1655 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1656 | test_app("sktexttopdf") { |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 1657 | sources = [ |
Ben Wagner | a25fbef | 2017-08-30 13:56:19 -0400 | [diff] [blame] | 1658 | "tools/shape/using_skia_and_harfbuzz.cpp", |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 1659 | ] |
| 1660 | deps = [ |
| 1661 | ":skia", |
Hal Canary | 96c5725 | 2018-02-09 11:43:05 -0500 | [diff] [blame] | 1662 | ":skshaper", |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 1663 | ] |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 1664 | } |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1665 | |
Matt Sarett | 9f1c403 | 2017-05-17 10:06:32 -0400 | [diff] [blame] | 1666 | test_app("create_flutter_test_images") { |
| 1667 | sources = [ |
| 1668 | "tools/create_flutter_test_images.cpp", |
| 1669 | ] |
| 1670 | deps = [ |
| 1671 | ":skia", |
| 1672 | ":tool_utils", |
| 1673 | ] |
| 1674 | } |
| 1675 | |
Ben Wagner | 219f362 | 2017-07-17 15:32:25 -0400 | [diff] [blame] | 1676 | test_app("create_test_font") { |
| 1677 | sources = [ |
Ben Wagner | 483c772 | 2018-02-20 17:06:07 -0500 | [diff] [blame] | 1678 | "tools/fonts/create_test_font.cpp", |
Ben Wagner | 219f362 | 2017-07-17 15:32:25 -0400 | [diff] [blame] | 1679 | ] |
| 1680 | deps = [ |
| 1681 | ":skia", |
| 1682 | ] |
| 1683 | assert_no_deps = [ |
| 1684 | # tool_utils requires the output of this app. |
| 1685 | ":tool_utils", |
| 1686 | ] |
| 1687 | } |
| 1688 | |
Ben Wagner | 97182cc | 2018-02-15 10:20:04 -0500 | [diff] [blame] | 1689 | test_app("create_test_font_color") { |
| 1690 | sources = [ |
| 1691 | "tools/fonts/create_test_font_color.cpp", |
| 1692 | ] |
| 1693 | deps = [ |
| 1694 | ":flags", |
| 1695 | ":skia", |
Brian Osman | 7451101 | 2018-04-02 20:13:46 +0000 | [diff] [blame] | 1696 | ":tool_utils" |
Ben Wagner | 97182cc | 2018-02-15 10:20:04 -0500 | [diff] [blame] | 1697 | ] |
| 1698 | } |
| 1699 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1700 | test_app("get_images_from_skps") { |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1701 | sources = [ |
| 1702 | "tools/get_images_from_skps.cpp", |
| 1703 | ] |
| 1704 | deps = [ |
| 1705 | ":flags", |
| 1706 | ":skia", |
| 1707 | "//third_party/jsoncpp", |
| 1708 | ] |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1709 | } |
mtklein | ecbc526 | 2016-09-22 11:51:24 -0700 | [diff] [blame] | 1710 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1711 | test_app("colorspaceinfo") { |
Matt Sarett | 8740d58 | 2016-11-11 13:59:14 -0500 | [diff] [blame] | 1712 | sources = [ |
| 1713 | "tools/colorspaceinfo.cpp", |
| 1714 | ] |
| 1715 | deps = [ |
| 1716 | ":flags", |
| 1717 | ":skia", |
| 1718 | ":tool_utils", |
| 1719 | ] |
Matt Sarett | 8740d58 | 2016-11-11 13:59:14 -0500 | [diff] [blame] | 1720 | } |
| 1721 | |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1722 | if (!is_ios && target_cpu != "wasm") { |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1723 | test_app("skiaserve") { |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1724 | sources = [ |
| 1725 | "tools/skiaserve/Request.cpp", |
| 1726 | "tools/skiaserve/Response.cpp", |
| 1727 | "tools/skiaserve/skiaserve.cpp", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1728 | "tools/skiaserve/urlhandlers/BreakHandler.cpp", |
| 1729 | "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp", |
| 1730 | "tools/skiaserve/urlhandlers/CmdHandler.cpp", |
| 1731 | "tools/skiaserve/urlhandlers/ColorModeHandler.cpp", |
| 1732 | "tools/skiaserve/urlhandlers/DataHandler.cpp", |
| 1733 | "tools/skiaserve/urlhandlers/DownloadHandler.cpp", |
| 1734 | "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp", |
| 1735 | "tools/skiaserve/urlhandlers/ImgHandler.cpp", |
| 1736 | "tools/skiaserve/urlhandlers/InfoHandler.cpp", |
Brian Salomon | 144a5c5 | 2016-12-20 16:48:59 -0500 | [diff] [blame] | 1737 | "tools/skiaserve/urlhandlers/OpBoundsHandler.cpp", |
| 1738 | "tools/skiaserve/urlhandlers/OpsHandler.cpp", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1739 | "tools/skiaserve/urlhandlers/OverdrawHandler.cpp", |
| 1740 | "tools/skiaserve/urlhandlers/PostHandler.cpp", |
| 1741 | "tools/skiaserve/urlhandlers/QuitHandler.cpp", |
| 1742 | "tools/skiaserve/urlhandlers/RootHandler.cpp", |
| 1743 | ] |
| 1744 | deps = [ |
| 1745 | ":flags", |
| 1746 | ":gpu_tool_utils", |
| 1747 | ":skia", |
| 1748 | ":tool_utils", |
| 1749 | "//third_party/jsoncpp", |
| 1750 | "//third_party/libmicrohttpd", |
| 1751 | "//third_party/libpng", |
| 1752 | ] |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1753 | } |
mtklein | ecbc526 | 2016-09-22 11:51:24 -0700 | [diff] [blame] | 1754 | } |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1755 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1756 | test_app("fuzz") { |
Kevin Lubick | 9ff5dc9 | 2018-01-09 12:47:33 -0500 | [diff] [blame] | 1757 | include_dirs = [ |
| 1758 | "tools", |
| 1759 | "tools/debugger", |
| 1760 | ] |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1761 | sources = [ |
Hal Canary | 24ac42b | 2017-02-14 13:35:14 -0500 | [diff] [blame] | 1762 | "fuzz/FuzzCanvas.cpp", |
Cary Clark | 91390c8 | 2018-03-09 14:02:46 -0500 | [diff] [blame] | 1763 | "fuzz/FuzzCommon.cpp", |
Kevin Lubick | fec1dea | 2016-11-22 13:57:18 -0500 | [diff] [blame] | 1764 | "fuzz/FuzzDrawFunctions.cpp", |
Kevin Lubick | e4be55d | 2018-03-30 15:05:13 -0400 | [diff] [blame] | 1765 | "fuzz/FuzzEncoders.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1766 | "fuzz/FuzzGradients.cpp", |
| 1767 | "fuzz/FuzzParsePath.cpp", |
Cary Clark | 91390c8 | 2018-03-09 14:02:46 -0500 | [diff] [blame] | 1768 | "fuzz/FuzzPathMeasure.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1769 | "fuzz/FuzzPathop.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1770 | "fuzz/fuzz.cpp", |
Kevin Lubick | 2416f96 | 2018-02-12 08:26:39 -0500 | [diff] [blame] | 1771 | "fuzz/oss_fuzz/FuzzAnimatedImage.cpp", |
| 1772 | "fuzz/oss_fuzz/FuzzImage.cpp", |
Kevin Lubick | f034d11 | 2018-02-08 14:31:24 -0500 | [diff] [blame] | 1773 | "fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp", |
| 1774 | "fuzz/oss_fuzz/FuzzPathDeserialize.cpp", |
Kevin Lubick | 2541edf | 2018-01-11 10:27:14 -0500 | [diff] [blame] | 1775 | "fuzz/oss_fuzz/FuzzRegionDeserialize.cpp", |
| 1776 | "fuzz/oss_fuzz/FuzzRegionSetPath.cpp", |
Kevin Lubick | f034d11 | 2018-02-08 14:31:24 -0500 | [diff] [blame] | 1777 | "fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp", |
Kevin Lubick | 9ff5dc9 | 2018-01-09 12:47:33 -0500 | [diff] [blame] | 1778 | "tools/UrlDataManager.cpp", |
| 1779 | "tools/debugger/SkDebugCanvas.cpp", |
| 1780 | "tools/debugger/SkDrawCommand.cpp", |
| 1781 | "tools/debugger/SkJsonWriteBuffer.cpp", |
| 1782 | "tools/debugger/SkObjectParser.cpp", |
| 1783 | "tools/picture_utils.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1784 | ] |
| 1785 | deps = [ |
| 1786 | ":flags", |
Hal Canary | 44801ca | 2017-03-15 11:39:06 -0400 | [diff] [blame] | 1787 | ":gpu_tool_utils", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1788 | ":skia", |
Kevin Lubick | 9ff5dc9 | 2018-01-09 12:47:33 -0500 | [diff] [blame] | 1789 | "//third_party/jsoncpp", |
| 1790 | "//third_party/libpng", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1791 | ] |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 1792 | } |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 1793 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1794 | test_app("pathops_unittest") { |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1795 | sources = pathops_tests_sources + [ |
Mike Klein | 6e55fef | 2016-10-26 11:41:47 -0400 | [diff] [blame] | 1796 | rebase_path("tests/skia_test.cpp"), |
| 1797 | rebase_path("tests/Test.cpp"), |
| 1798 | ] |
caryclark | 9feb632 | 2016-10-25 08:58:26 -0700 | [diff] [blame] | 1799 | deps = [ |
| 1800 | ":flags", |
| 1801 | ":gpu_tool_utils", |
| 1802 | ":skia", |
| 1803 | ":tool_utils", |
| 1804 | ] |
caryclark | 9feb632 | 2016-10-25 08:58:26 -0700 | [diff] [blame] | 1805 | } |
| 1806 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1807 | test_app("dump_record") { |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 1808 | sources = [ |
| 1809 | "tools/DumpRecord.cpp", |
| 1810 | "tools/dump_record.cpp", |
| 1811 | ] |
| 1812 | deps = [ |
| 1813 | ":flags", |
| 1814 | ":skia", |
| 1815 | ] |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 1816 | } |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 1817 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1818 | test_app("skdiff") { |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 1819 | sources = [ |
| 1820 | "tools/skdiff/skdiff.cpp", |
| 1821 | "tools/skdiff/skdiff_html.cpp", |
| 1822 | "tools/skdiff/skdiff_main.cpp", |
| 1823 | "tools/skdiff/skdiff_utils.cpp", |
| 1824 | ] |
| 1825 | deps = [ |
| 1826 | ":skia", |
| 1827 | ":tool_utils", |
| 1828 | ] |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 1829 | } |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 1830 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1831 | test_app("skp_parser") { |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 1832 | sources = [ |
| 1833 | "tools/skp_parser.cpp", |
| 1834 | ] |
| 1835 | deps = [ |
| 1836 | ":skia", |
| 1837 | ":tool_utils", |
| 1838 | "//third_party/jsoncpp", |
| 1839 | ] |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 1840 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1841 | |
Hal Canary | d7b3845 | 2017-12-11 17:46:26 -0500 | [diff] [blame] | 1842 | if (!is_win && skia_enable_gpu) { |
| 1843 | test_lib("skqp_lib") { |
| 1844 | public_include_dirs = [ "tools/skqp" ] |
Hal Canary | 0e07ad7 | 2018-02-08 13:06:56 -0500 | [diff] [blame] | 1845 | defines = |
| 1846 | [ "SK_SKQP_GLOBAL_ERROR_TOLERANCE=$skia_skqp_global_error_tolerance" ] |
Hal Canary | 4689b54 | 2018-01-31 11:54:14 -0500 | [diff] [blame] | 1847 | if (skia_skqp_enable_driver_correctness_workarounds) { |
| 1848 | defines += [ "SK_SKQP_ENABLE_DRIVER_CORRECTNESS_WORKAROUNDS" ] |
| 1849 | } |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 1850 | sources = [ |
| 1851 | "dm/DMGpuTestProcs.cpp", |
Hal Canary | d7b3845 | 2017-12-11 17:46:26 -0500 | [diff] [blame] | 1852 | "tools/skqp/gm_knowledge.cpp", |
| 1853 | "tools/skqp/gm_runner.cpp", |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 1854 | ] |
| 1855 | deps = [ |
| 1856 | ":gm", |
| 1857 | ":gpu_tool_utils", |
| 1858 | ":skia", |
| 1859 | ":tests", |
Hal Canary | d7b3845 | 2017-12-11 17:46:26 -0500 | [diff] [blame] | 1860 | ":tool_utils", |
| 1861 | ] |
| 1862 | } |
| 1863 | test_app("skqp") { |
| 1864 | sources = [ |
| 1865 | "tools/skqp/skqp.cpp", |
| 1866 | ] |
| 1867 | deps = [ |
| 1868 | ":skia", |
| 1869 | ":skqp_lib", |
Hal Canary | 537d9c0 | 2018-01-30 11:30:48 -0500 | [diff] [blame] | 1870 | ":tool_utils", |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 1871 | "//third_party/googletest", |
| 1872 | ] |
| 1873 | } |
| 1874 | } |
Hal Canary | 28f8938 | 2017-12-12 09:42:14 -0500 | [diff] [blame] | 1875 | if (is_android && skia_enable_gpu) { |
| 1876 | test_app("skqp_app") { |
| 1877 | is_shared_library = true |
| 1878 | sources = [ |
| 1879 | "tools/skqp/jni/org_skia_skqp_SkQPRunner.cpp", |
| 1880 | ] |
| 1881 | deps = [ |
| 1882 | ":skia", |
| 1883 | ":skqp_lib", |
Hal Canary | b4d01a9 | 2018-01-29 13:10:08 -0500 | [diff] [blame] | 1884 | ":tool_utils", |
Hal Canary | 28f8938 | 2017-12-12 09:42:14 -0500 | [diff] [blame] | 1885 | ] |
| 1886 | libs = [ "android" ] |
| 1887 | } |
| 1888 | } |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 1889 | |
Hal Canary | a9de760 | 2018-01-19 13:08:23 -0500 | [diff] [blame] | 1890 | test_app("list_gms") { |
| 1891 | sources = [ |
| 1892 | "tools/list_gms.cpp", |
| 1893 | ] |
| 1894 | deps = [ |
| 1895 | ":gm", |
| 1896 | ":skia", |
| 1897 | ] |
| 1898 | } |
| 1899 | test_app("list_gpu_unit_tests") { |
| 1900 | sources = [ |
| 1901 | "dm/DMGpuTestProcs.cpp", |
| 1902 | "tools/list_gpu_unit_tests.cpp", |
| 1903 | ] |
| 1904 | deps = [ |
| 1905 | ":skia", |
| 1906 | ":tests", |
| 1907 | ] |
| 1908 | } |
| 1909 | |
Jim Van Verth | dbb24ef | 2017-09-01 11:01:51 -0400 | [diff] [blame] | 1910 | if (skia_enable_gpu) { |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1911 | test_lib("sk_app") { |
| 1912 | public_include_dirs = [ "tools/sk_app" ] |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1913 | sources = [ |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1914 | "tools/sk_app/CommandSet.cpp", |
| 1915 | "tools/sk_app/GLWindowContext.cpp", |
| 1916 | "tools/sk_app/Window.cpp", |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1917 | ] |
Brian Osman | 2dd9693 | 2016-10-18 15:33:53 -0400 | [diff] [blame] | 1918 | libs = [] |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1919 | |
Jim Van Verth | 4e56a91 | 2016-10-21 10:58:52 -0400 | [diff] [blame] | 1920 | if (is_android) { |
| 1921 | sources += [ |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1922 | "tools/sk_app/android/GLWindowContext_android.cpp", |
| 1923 | "tools/sk_app/android/RasterWindowContext_android.cpp", |
| 1924 | "tools/sk_app/android/Window_android.cpp", |
| 1925 | "tools/sk_app/android/main_android.cpp", |
| 1926 | "tools/sk_app/android/surface_glue_android.cpp", |
Jim Van Verth | 4e56a91 | 2016-10-21 10:58:52 -0400 | [diff] [blame] | 1927 | ] |
Brian Osman | 462334e | 2017-02-09 11:22:57 -0500 | [diff] [blame] | 1928 | libs += [ "android" ] |
Jim Van Verth | 4e56a91 | 2016-10-21 10:58:52 -0400 | [diff] [blame] | 1929 | } else if (is_linux) { |
Brian Osman | 2dd9693 | 2016-10-18 15:33:53 -0400 | [diff] [blame] | 1930 | sources += [ |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1931 | "tools/sk_app/unix/GLWindowContext_unix.cpp", |
| 1932 | "tools/sk_app/unix/RasterWindowContext_unix.cpp", |
| 1933 | "tools/sk_app/unix/Window_unix.cpp", |
Brian Osman | fa91627 | 2017-12-01 09:18:20 -0500 | [diff] [blame] | 1934 | "tools/sk_app/unix/keysym2ucs.c", |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1935 | "tools/sk_app/unix/main_unix.cpp", |
Brian Osman | 2dd9693 | 2016-10-18 15:33:53 -0400 | [diff] [blame] | 1936 | ] |
Brian Osman | fa91627 | 2017-12-01 09:18:20 -0500 | [diff] [blame] | 1937 | libs += [ |
| 1938 | "GL", |
| 1939 | "X11", |
| 1940 | ] |
Brian Osman | 2dd9693 | 2016-10-18 15:33:53 -0400 | [diff] [blame] | 1941 | } else if (is_win) { |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1942 | sources += [ |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1943 | "tools/sk_app/win/GLWindowContext_win.cpp", |
| 1944 | "tools/sk_app/win/RasterWindowContext_win.cpp", |
| 1945 | "tools/sk_app/win/Window_win.cpp", |
| 1946 | "tools/sk_app/win/main_win.cpp", |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1947 | ] |
Brian Salomon | 194db17 | 2017-08-17 14:37:06 -0400 | [diff] [blame] | 1948 | if (skia_use_angle) { |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1949 | sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ] |
Brian Salomon | 194db17 | 2017-08-17 14:37:06 -0400 | [diff] [blame] | 1950 | } |
Mike Klein | 43c2526 | 2016-10-20 10:17:47 -0400 | [diff] [blame] | 1951 | } else if (is_mac) { |
| 1952 | sources += [ |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1953 | "tools/sk_app/mac/GLWindowContext_mac.cpp", |
| 1954 | "tools/sk_app/mac/RasterWindowContext_mac.cpp", |
| 1955 | "tools/sk_app/mac/Window_mac.cpp", |
| 1956 | "tools/sk_app/mac/main_mac.cpp", |
Mike Klein | 43c2526 | 2016-10-20 10:17:47 -0400 | [diff] [blame] | 1957 | ] |
Brian Osman | fa91627 | 2017-12-01 09:18:20 -0500 | [diff] [blame] | 1958 | libs += [ |
| 1959 | "QuartzCore.framework", |
| 1960 | "Cocoa.framework", |
| 1961 | "Foundation.framework", |
| 1962 | ] |
Jim Van Verth | dbb24ef | 2017-09-01 11:01:51 -0400 | [diff] [blame] | 1963 | } else if (is_ios) { |
| 1964 | sources += [ |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1965 | "tools/sk_app/ios/GLWindowContext_ios.cpp", |
| 1966 | "tools/sk_app/ios/RasterWindowContext_ios.cpp", |
| 1967 | "tools/sk_app/ios/Window_ios.cpp", |
| 1968 | "tools/sk_app/ios/main_ios.cpp", |
Jim Van Verth | dbb24ef | 2017-09-01 11:01:51 -0400 | [diff] [blame] | 1969 | ] |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1970 | } |
| 1971 | |
| 1972 | if (skia_use_vulkan) { |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1973 | sources += [ "tools/sk_app/VulkanWindowContext.cpp" ] |
Jim Van Verth | 4e56a91 | 2016-10-21 10:58:52 -0400 | [diff] [blame] | 1974 | if (is_android) { |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1975 | sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ] |
Jim Van Verth | 4e56a91 | 2016-10-21 10:58:52 -0400 | [diff] [blame] | 1976 | } else if (is_linux) { |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1977 | sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ] |
Brian Osman | 2dd9693 | 2016-10-18 15:33:53 -0400 | [diff] [blame] | 1978 | libs += [ "X11-xcb" ] |
| 1979 | } else if (is_win) { |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 1980 | sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ] |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1981 | } |
| 1982 | } |
| 1983 | |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1984 | deps = [ |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1985 | ":gpu_tool_utils", |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1986 | ":skia", |
| 1987 | ":tool_utils", |
| 1988 | ":views", |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1989 | ] |
Jim Van Verth | 4e56a91 | 2016-10-21 10:58:52 -0400 | [diff] [blame] | 1990 | if (is_android) { |
| 1991 | deps += [ "//third_party/native_app_glue" ] |
Jim Van Verth | dbb24ef | 2017-09-01 11:01:51 -0400 | [diff] [blame] | 1992 | } else if (is_mac || is_ios) { |
Mike Klein | 43c2526 | 2016-10-20 10:17:47 -0400 | [diff] [blame] | 1993 | deps += [ "//third_party/libsdl" ] |
| 1994 | } |
Brian Salomon | 194db17 | 2017-08-17 14:37:06 -0400 | [diff] [blame] | 1995 | if (skia_use_angle) { |
| 1996 | deps += [ "//third_party/angle2" ] |
| 1997 | } |
Mike Klein | a92c383 | 2016-12-08 09:49:39 -0500 | [diff] [blame] | 1998 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1999 | } |
Ethan Nicholas | 4f3985c | 2016-11-14 11:16:37 -0500 | [diff] [blame] | 2000 | |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2001 | if (skia_enable_gpu) { |
| 2002 | test_app("viewer") { |
| 2003 | is_shared_library = is_android |
Jim Van Verth | 329c5a6 | 2017-11-29 11:42:33 -0500 | [diff] [blame] | 2004 | if (is_ios) { |
| 2005 | bundle_ios_data = true |
| 2006 | } |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2007 | sources = [ |
Chris Dalton | 2d18f41 | 2018-02-20 13:23:32 -0700 | [diff] [blame] | 2008 | "tools/viewer/BisectSlide.cpp", |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2009 | "tools/viewer/GMSlide.cpp", |
Brian Osman | d67e518 | 2017-12-08 16:46:09 -0500 | [diff] [blame] | 2010 | "tools/viewer/ImGuiLayer.cpp", |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2011 | "tools/viewer/ImageSlide.cpp", |
| 2012 | "tools/viewer/SKPSlide.cpp", |
| 2013 | "tools/viewer/SampleSlide.cpp", |
Florin Malita | 54f65c4 | 2018-01-16 17:04:30 -0500 | [diff] [blame] | 2014 | "tools/viewer/SkottieSlide.cpp", |
Florin Malita | 76a076b | 2018-02-15 18:40:48 -0500 | [diff] [blame] | 2015 | "tools/viewer/SlideDir.cpp", |
Brian Osman | 56a2481 | 2017-12-19 11:15:16 -0500 | [diff] [blame] | 2016 | "tools/viewer/StatsLayer.cpp", |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2017 | "tools/viewer/Viewer.cpp", |
| 2018 | ] |
| 2019 | libs = [] |
| 2020 | |
| 2021 | include_dirs = [] |
| 2022 | deps = [ |
Florin Malita | 54f65c4 | 2018-01-16 17:04:30 -0500 | [diff] [blame] | 2023 | ":experimental_skottie", |
Florin Malita | bcd0723 | 2018-01-31 11:08:58 -0500 | [diff] [blame] | 2024 | ":experimental_sksg", |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2025 | ":flags", |
| 2026 | ":gm", |
| 2027 | ":gpu_tool_utils", |
| 2028 | ":samples", |
| 2029 | ":sk_app", |
| 2030 | ":skia", |
| 2031 | ":tool_utils", |
| 2032 | ":views", |
| 2033 | "//third_party/imgui", |
| 2034 | "//third_party/jsoncpp", |
| 2035 | ] |
| 2036 | } |
| 2037 | } |
| 2038 | |
| 2039 | if (skia_enable_gpu && !skia_use_angle && (is_linux || is_win || is_mac)) { |
| 2040 | test_app("HelloWorld") { |
| 2041 | sources = [ |
| 2042 | "example/HelloWorld.cpp", |
| 2043 | ] |
| 2044 | libs = [] |
| 2045 | |
| 2046 | include_dirs = [] |
| 2047 | deps = [ |
| 2048 | ":flags", |
| 2049 | ":gpu_tool_utils", |
| 2050 | ":sk_app", |
| 2051 | ":skia", |
| 2052 | ":tool_utils", |
| 2053 | ":views", |
| 2054 | ] |
| 2055 | } |
| 2056 | } |
| 2057 | |
Jim Van Verth | ecfed2b | 2017-08-30 14:02:50 -0400 | [diff] [blame] | 2058 | if (skia_enable_gpu && (is_linux || is_mac || is_ios)) { |
Jim Van Verth | 4c70c75 | 2017-07-11 12:03:01 -0400 | [diff] [blame] | 2059 | test_app("SkiaSDLExample") { |
| 2060 | sources = [ |
| 2061 | "example/SkiaSDLExample.cpp", |
| 2062 | ] |
| 2063 | libs = [] |
| 2064 | include_dirs = [] |
| 2065 | deps = [ |
| 2066 | ":gpu_tool_utils", |
| 2067 | ":skia", |
| 2068 | "//third_party/libsdl", |
| 2069 | ] |
| 2070 | } |
| 2071 | } |
| 2072 | |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2073 | if (skia_qt_path != "" && (is_win || is_linux || is_mac)) { |
| 2074 | action_foreach("generate_mocs") { |
| 2075 | script = "gn/call.py" |
| 2076 | sources = [ |
| 2077 | "tools/mdbviz/MainWindow.h", |
| 2078 | ] |
| 2079 | outputs = [ |
| 2080 | "$target_gen_dir/mdbviz/{{source_name_part}}_moc.cpp", |
| 2081 | ] |
| 2082 | args = [ |
| 2083 | "$skia_qt_path" + "/bin/moc", |
| 2084 | "{{source}}", |
| 2085 | "-o", |
| 2086 | "gen/mdbviz/{{source_name_part}}_moc.cpp", |
| 2087 | ] |
| 2088 | } |
| 2089 | action_foreach("generate_resources") { |
| 2090 | script = "gn/call.py" |
| 2091 | sources = [ |
| 2092 | "tools/mdbviz/resources.qrc", |
| 2093 | ] |
| 2094 | outputs = [ |
| 2095 | "$target_gen_dir/mdbviz/{{source_name_part}}_res.cpp", |
| 2096 | ] |
| 2097 | args = [ |
| 2098 | "$skia_qt_path" + "/bin/rcc", |
| 2099 | "{{source}}", |
| 2100 | "-o", |
| 2101 | "gen/mdbviz/{{source_name_part}}_res.cpp", |
| 2102 | ] |
| 2103 | } |
| 2104 | test_app("mdbviz") { |
| 2105 | if (is_win) { |
| 2106 | # on Windows we need to disable some exception handling warnings due to the Qt headers |
| 2107 | cflags = [ "/Wv:18" ] # 18 -> VS2013, 19 -> VS2015, 1910 -> VS2017 |
| 2108 | } |
| 2109 | sources = [ |
Robert Phillips | 5fccf9d | 2017-09-05 15:10:12 -0400 | [diff] [blame] | 2110 | "tools/UrlDataManager.cpp", |
| 2111 | "tools/debugger/SkDebugCanvas.cpp", |
| 2112 | "tools/debugger/SkDrawCommand.cpp", |
| 2113 | "tools/debugger/SkJsonWriteBuffer.cpp", |
| 2114 | "tools/debugger/SkObjectParser.cpp", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2115 | "tools/mdbviz/MainWindow.cpp", |
Robert Phillips | deaf568 | 2017-09-06 13:07:21 -0400 | [diff] [blame] | 2116 | "tools/mdbviz/Model.cpp", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2117 | "tools/mdbviz/main.cpp", |
Robert Phillips | 5fccf9d | 2017-09-05 15:10:12 -0400 | [diff] [blame] | 2118 | "tools/picture_utils.cpp", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2119 | |
| 2120 | # generated files |
| 2121 | "$target_gen_dir/mdbviz/MainWindow_moc.cpp", |
| 2122 | "$target_gen_dir/mdbviz/resources_res.cpp", |
| 2123 | ] |
| 2124 | lib_dirs = [ "$skia_qt_path/lib" ] |
| 2125 | libs = [ |
| 2126 | "Qt5Core.lib", |
| 2127 | "Qt5Gui.lib", |
| 2128 | "Qt5Widgets.lib", |
| 2129 | ] |
| 2130 | include_dirs = [ |
| 2131 | "$skia_qt_path/include", |
Robert Phillips | 276066b | 2017-09-06 17:17:44 -0400 | [diff] [blame] | 2132 | "$skia_qt_path/include/QtCore", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2133 | "$skia_qt_path/include/QtWidgets", |
Robert Phillips | 5fccf9d | 2017-09-05 15:10:12 -0400 | [diff] [blame] | 2134 | "tools", |
| 2135 | "tools/debugger", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2136 | ] |
| 2137 | deps = [ |
| 2138 | ":generate_mocs", |
| 2139 | ":generate_resources", |
| 2140 | ":skia", |
Robert Phillips | 5fccf9d | 2017-09-05 15:10:12 -0400 | [diff] [blame] | 2141 | "//third_party/jsoncpp", |
| 2142 | "//third_party/libpng", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2143 | ] |
| 2144 | } |
| 2145 | } |
| 2146 | |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 2147 | if (is_android && defined(ndk) && ndk != "") { |
Derek Sollenberger | 70120c7 | 2017-01-05 11:39:04 -0500 | [diff] [blame] | 2148 | copy("gdbserver") { |
| 2149 | sources = [ |
| 2150 | "$ndk/$ndk_gdbserver", |
| 2151 | ] |
| 2152 | outputs = [ |
| 2153 | "$root_out_dir/gdbserver", |
| 2154 | ] |
| 2155 | } |
Derek Sollenberger | 70120c7 | 2017-01-05 11:39:04 -0500 | [diff] [blame] | 2156 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 2157 | } |