• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#     http://www.apache.org/licenses/LICENSE-2.0
6# Unless required by applicable law or agreed to in writing, software
7# distributed under the License is distributed on an "AS IS" BASIS,
8# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9# See the License for the specific language governing permissions and
10# limitations under the License.
11if (defined(ohos_lite)) {
12  import("//build/lite/config/component/lite_component.gni")
13} else {
14  import("//build/ohos.gni")
15}
16config("harfbuzz_config") {
17  include_dirs = [ "//third_party/harfbuzz/src" ]
18}
19
20harfbuzz_source = [
21  "//third_party/harfbuzz/src/hb-aat-layout.cc",
22  "//third_party/harfbuzz/src/hb-aat-map.cc",
23  "//third_party/harfbuzz/src/hb-blob.cc",
24  "//third_party/harfbuzz/src/hb-buffer-serialize.cc",
25  "//third_party/harfbuzz/src/hb-buffer.cc",
26  "//third_party/harfbuzz/src/hb-common.cc",
27  "//third_party/harfbuzz/src/hb-face.cc",
28  "//third_party/harfbuzz/src/hb-fallback-shape.cc",
29  "//third_party/harfbuzz/src/hb-font.cc",
30  "//third_party/harfbuzz/src/hb-map.cc",
31  "//third_party/harfbuzz/src/hb-number.cc",
32  "//third_party/harfbuzz/src/hb-ot-cff1-table.cc",
33  "//third_party/harfbuzz/src/hb-ot-cff2-table.cc",
34  "//third_party/harfbuzz/src/hb-ot-face.cc",
35  "//third_party/harfbuzz/src/hb-ot-font.cc",
36  "//third_party/harfbuzz/src/hb-ot-layout.cc",
37  "//third_party/harfbuzz/src/hb-ot-map.cc",
38  "//third_party/harfbuzz/src/hb-ot-math.cc",
39  "//third_party/harfbuzz/src/hb-ot-meta.cc",
40  "//third_party/harfbuzz/src/hb-ot-metrics.cc",
41  "//third_party/harfbuzz/src/hb-ot-name.cc",
42  "//third_party/harfbuzz/src/hb-ot-shape-complex-arabic.cc",
43  "//third_party/harfbuzz/src/hb-ot-shape-complex-default.cc",
44  "//third_party/harfbuzz/src/hb-ot-shape-complex-hangul.cc",
45  "//third_party/harfbuzz/src/hb-ot-shape-complex-hebrew.cc",
46  "//third_party/harfbuzz/src/hb-ot-shape-complex-indic-table.cc",
47  "//third_party/harfbuzz/src/hb-ot-shape-complex-indic.cc",
48  "//third_party/harfbuzz/src/hb-ot-shape-complex-khmer.cc",
49  "//third_party/harfbuzz/src/hb-ot-shape-complex-myanmar.cc",
50  "//third_party/harfbuzz/src/hb-ot-shape-complex-syllabic.cc",
51  "//third_party/harfbuzz/src/hb-ot-shape-complex-thai.cc",
52  "//third_party/harfbuzz/src/hb-ot-shape-complex-use.cc",
53  "//third_party/harfbuzz/src/hb-ot-shape-complex-vowel-constraints.cc",
54  "//third_party/harfbuzz/src/hb-ot-shape-fallback.cc",
55  "//third_party/harfbuzz/src/hb-ot-shape-normalize.cc",
56  "//third_party/harfbuzz/src/hb-ot-shape.cc",
57  "//third_party/harfbuzz/src/hb-ot-tag.cc",
58  "//third_party/harfbuzz/src/hb-ot-var.cc",
59  "//third_party/harfbuzz/src/hb-set.cc",
60  "//third_party/harfbuzz/src/hb-shape-plan.cc",
61  "//third_party/harfbuzz/src/hb-shape.cc",
62  "//third_party/harfbuzz/src/hb-shaper.cc",
63  "//third_party/harfbuzz/src/hb-static.cc",
64  "//third_party/harfbuzz/src/hb-subset-cff2.cc",
65  "//third_party/harfbuzz/src/hb-subset-cff-common.cc",
66  "//third_party/harfbuzz/src/hb-ucd.cc",
67  "//third_party/harfbuzz/src/hb-unicode.cc",
68]
69
70if (defined(ohos_lite)) {
71  lite_library("harfbuzz") {
72    output_name = "harfbuzz"
73    sources = harfbuzz_source
74    public_configs = [ ":harfbuzz_config" ]
75    if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") {
76      target_type = "static_library"
77      defines = [
78        "HB_TINY",
79        "ENABLE_ICCARM=1",
80        "HB_CUSTOM_MALLOC",
81      ]
82      cflags = [
83        "--diag_suppress",
84        "Pe068,Pa093,Pe111,Pa181,Pe128,Pe161,Pe177,Pe185,Pe186,Pe550,Pe554",
85      ]
86      cflags_cc = cflags
87    } else {
88      target_type = "shared_library"
89      defines = [ "HAVE_PTHREAD = 1" ]
90    }
91  }
92} else {
93  ohos_static_library("harfbuzz_static") {
94    output_dir = "${root_out_dir}/thirdparty/harfbuzz"
95    output_name = "harfbuzz"
96    sources = harfbuzz_source
97    include_dirs = [ "src\base" ]
98    defines = [ "HAVE_PTHREAD = 1" ]
99    public_configs = [ ":harfbuzz_config" ]
100  }
101}
102