• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 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
6import("../../gn/skia.gni")
7import("skunicode.gni")
8
9declare_args() {
10  skia_use_runtime_icu = false
11}
12
13if (skia_use_icu) {
14  config("public_config") {
15    include_dirs = [ "include" ]
16    defines = [ "SK_UNICODE_AVAILABLE" ]
17    if (is_skia_component_build) {
18      defines += [ "SKUNICODE_DLL" ]
19    }
20  }
21
22  component("skunicode") {
23    check_includes = false
24    public_configs = [ ":public_config" ]
25    public = skia_unicode_public
26    if (!use_oh_skia) {
27      deps = [ "../..:skia" ]
28    } else {
29      include_dirs = [ "//third_party/skia" ]
30      deps = []
31    }
32    defines = [ "SKUNICODE_IMPLEMENTATION=1" ]
33    sources = skia_unicode_sources
34
35    # only available for Android at the moment
36    if (skia_use_runtime_icu && (is_android || is_linux)) {
37      sources += skia_unicode_runtime_icu_sources
38      deps += [ "${skia_third_party_dir}/icu:headers" ]
39    } else {
40      sources += skia_unicode_builtin_icu_sources
41      deps += [ "${skia_third_party_dir}/icu" ]
42      if (is_arkui_x) {
43        deps -= [ "${skia_third_party_dir}/icu" ]
44        deps += [ "//third_party/icu/icu4c:static_icuuc" ]
45        include_dirs += [ "//third_party/icu/icu4c/source/common" ]
46      }
47    }
48
49    configs += [
50      "../../:skia_private",
51      "../../third_party/icu/config:no_cxx",
52    ]
53  }
54} else {
55  group("skunicode") {
56  }
57}
58