blob: 7510d820a618faf83c92aedb50b73c58ed5da220 [file] [log] [blame]
Hal Canary32498f02019-02-04 15:36:31 -05001# Copyright 2019 Google LLC.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -05005if (!defined(is_skia_standalone)) {
6 is_skia_standalone = false
Hal Canary32498f02019-02-04 15:36:31 -05007}
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -05008
John Rosasco24cbdab2019-09-25 14:14:35 -07009is_skia_dev_build = is_skia_standalone && !is_official_build
Hal Canary3e710b02019-09-04 10:05:33 -040010
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -050011declare_args() {
Hal Canaryc7b263b2019-09-03 13:46:25 -040012 skia_android_serial = ""
13 skia_compile_processors = false
14 skia_enable_ccpr = true
15 skia_enable_discrete_gpu = true
16 skia_enable_flutter_defines = false
17 skia_enable_fontmgr_empty = false
18 skia_enable_fontmgr_fuchsia = is_fuchsia
19 skia_enable_fontmgr_win = is_win
20 skia_enable_fontmgr_win_gdi = is_win
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -050021 skia_enable_gpu = true
Hal Canaryc7b263b2019-09-03 13:46:25 -040022 skia_enable_pdf = true
Hal Canary60ff6512020-01-21 12:39:20 -050023 skia_enable_skottie = !(is_win && is_component_build)
Hal Canaryc7b263b2019-09-03 13:46:25 -040024 skia_enable_sksl_interpreter = is_skia_dev_build
25 skia_enable_skvm_jit =
26 is_skia_dev_build && ((target_cpu == "x64" && (is_linux || is_mac)) ||
27 (target_cpu == "arm64" && is_android))
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -050028 skia_enable_tools = is_skia_dev_build
Jim Van Verth03b8ab22020-02-24 11:36:15 -050029 skia_enable_gpu_debug_layers = is_skia_dev_build && is_debug
Hal Canaryc7b263b2019-09-03 13:46:25 -040030 skia_generate_workarounds = false
31 skia_include_multiframe_procs = false
32 skia_lex = false
Hal Canary2dad9902019-11-20 16:01:31 -050033 skia_libgifcodec_path = "third_party/externals/libgifcodec"
Hal Canaryc7b263b2019-09-03 13:46:25 -040034 skia_pdf_subset_harfbuzz = false # TODO: set skia_pdf_subset_harfbuzz to skia_use_harfbuzz.
35 skia_qt_path = getenv("QT_PATH")
36 skia_skqp_global_error_tolerance = 0
37 skia_tools_require_resources = false
John Rosasco24cbdab2019-09-25 14:14:35 -070038 skia_update_fuchsia_sdk = false
Hal Canaryc7b263b2019-09-03 13:46:25 -040039 skia_use_angle = false
40 skia_use_dawn = false
Jim Van Verthb01e12b2020-02-18 14:34:38 -050041 skia_use_direct3d = false
Hal Canaryc7b263b2019-09-03 13:46:25 -040042 skia_use_egl = false
43 skia_use_expat = true
44 skia_use_experimental_xform = false
45 skia_use_ffmpeg = false
46 skia_use_fixed_gamma_text = is_android
47 skia_use_fontconfig = is_linux
48 skia_use_fonthost_mac = is_mac
49 skia_use_freetype = is_android || is_fuchsia || is_linux
Kevin Lubick867da4b2019-02-22 15:55:39 -050050 skia_use_harfbuzz = true
John Rosascoa9b348f2019-11-08 13:18:15 -080051 skia_use_gl = !is_fuchsia
Julia Lavrovae65c5fc2020-03-09 09:59:56 -040052 skia_use_icu = !is_fuchsia
Hal Canaryc7b263b2019-09-03 13:46:25 -040053 skia_use_libheif = is_skia_dev_build
Mike Klein9d4b7882020-03-06 21:39:05 +000054 skia_use_libjpeg_turbo = true
55 skia_use_libpng = true
56 skia_use_libwebp = true
Hal Canaryc7b263b2019-09-03 13:46:25 -040057 skia_use_lua = is_skia_dev_build && !is_ios
58 skia_use_metal = false
59 skia_use_opencl = false
60 skia_use_piex = !is_win
61 skia_use_wuffs = false
62 skia_use_x11 = is_linux
63 skia_use_xps = true
64 skia_use_zlib = true
65
66 if (is_ios) {
67 skia_ios_identity = ".*Google.*"
68 skia_ios_profile = "Google Development"
69 }
70
71 if (is_mac) {
72 skia_gl_standard = "gl"
73 } else if (is_ios) {
74 skia_gl_standard = "gles"
75 } else {
76 skia_gl_standard = ""
77 }
78
79 if (is_android) {
80 skia_use_vulkan = defined(ndk_api) && ndk_api >= 24
81 } else if (is_fuchsia) {
John Rosasco24cbdab2019-09-25 14:14:35 -070082 skia_use_vulkan = true
Hal Canaryc7b263b2019-09-03 13:46:25 -040083 } else {
84 skia_use_vulkan = defined(skia_moltenvk_path) && skia_moltenvk_path != ""
85 }
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -050086}
Hal Canaryc7b263b2019-09-03 13:46:25 -040087
Hal Canary2a3093c2019-02-20 11:25:45 -050088declare_args() {
Hal Canaryc7b263b2019-09-03 13:46:25 -040089 skia_enable_atlas_text = is_skia_dev_build && skia_enable_gpu
90 skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype
91 skia_enable_fontmgr_custom =
92 is_linux && skia_use_freetype && !skia_use_fontconfig
93 skia_enable_fontmgr_custom_empty = is_fuchsia && skia_use_freetype
94 skia_enable_nvpr = !skia_enable_flutter_defines
95 skia_enable_spirv_validation = is_skia_dev_build && is_debug && !skia_use_dawn
Mike Klein9d4b7882020-03-06 21:39:05 +000096 skia_use_dng_sdk = !is_fuchsia && skia_use_libjpeg_turbo && skia_use_zlib
Hal Canary2dad9902019-11-20 16:01:31 -050097 skia_use_libgifcodec = !skia_use_wuffs
Hal Canaryc7b263b2019-09-03 13:46:25 -040098 skia_use_sfntly = skia_use_icu
Jim Van Verth03b8ab22020-02-24 11:36:15 -050099 skia_enable_vulkan_debug_layers = skia_enable_gpu_debug_layers
100 skia_enable_direct3d_debug_layer = skia_enable_gpu_debug_layers
Hal Canary2a3093c2019-02-20 11:25:45 -0500101}
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -0500102
103# Our tools require static linking (they use non-exported symbols), and the GPU backend.
104skia_enable_tools = skia_enable_tools && !is_component_build && skia_enable_gpu