BUILD.gn 4.1 KB
Newer Older
Y
YueBiang 已提交
1
# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
Y
YueBiang 已提交
2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#     http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if (defined(ohos_lite)) {
  import("//build/lite/config/component/lite_component.gni")
} else {
  import("//build/ohos.gni")
}
M
mamingshuai 已提交
16 17 18 19
config("harfbuzz_config") {
  include_dirs = [ "//third_party/harfbuzz/src" ]
}

Y
YueBiang 已提交
20
harfbuzz_source = [
M
mamingshuai 已提交
21 22 23 24 25 26 27 28 29 30
  "//third_party/harfbuzz/src/hb-aat-layout.cc",
  "//third_party/harfbuzz/src/hb-aat-map.cc",
  "//third_party/harfbuzz/src/hb-blob.cc",
  "//third_party/harfbuzz/src/hb-buffer-serialize.cc",
  "//third_party/harfbuzz/src/hb-buffer.cc",
  "//third_party/harfbuzz/src/hb-common.cc",
  "//third_party/harfbuzz/src/hb-face.cc",
  "//third_party/harfbuzz/src/hb-fallback-shape.cc",
  "//third_party/harfbuzz/src/hb-font.cc",
  "//third_party/harfbuzz/src/hb-map.cc",
P
pssea 已提交
31
  "//third_party/harfbuzz/src/hb-number.cc",
M
mamingshuai 已提交
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
  "//third_party/harfbuzz/src/hb-ot-cff1-table.cc",
  "//third_party/harfbuzz/src/hb-ot-cff2-table.cc",
  "//third_party/harfbuzz/src/hb-ot-face.cc",
  "//third_party/harfbuzz/src/hb-ot-font.cc",
  "//third_party/harfbuzz/src/hb-ot-layout.cc",
  "//third_party/harfbuzz/src/hb-ot-map.cc",
  "//third_party/harfbuzz/src/hb-ot-math.cc",
  "//third_party/harfbuzz/src/hb-ot-meta.cc",
  "//third_party/harfbuzz/src/hb-ot-metrics.cc",
  "//third_party/harfbuzz/src/hb-ot-name.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-arabic.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-default.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-hangul.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-hebrew.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-indic-table.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-indic.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-khmer.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-myanmar.cc",
50
  "//third_party/harfbuzz/src/hb-ot-shape-complex-syllabic.cc",
M
mamingshuai 已提交
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
  "//third_party/harfbuzz/src/hb-ot-shape-complex-thai.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-use.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-complex-vowel-constraints.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-fallback.cc",
  "//third_party/harfbuzz/src/hb-ot-shape-normalize.cc",
  "//third_party/harfbuzz/src/hb-ot-shape.cc",
  "//third_party/harfbuzz/src/hb-ot-tag.cc",
  "//third_party/harfbuzz/src/hb-ot-var.cc",
  "//third_party/harfbuzz/src/hb-set.cc",
  "//third_party/harfbuzz/src/hb-shape-plan.cc",
  "//third_party/harfbuzz/src/hb-shape.cc",
  "//third_party/harfbuzz/src/hb-shaper.cc",
  "//third_party/harfbuzz/src/hb-static.cc",
  "//third_party/harfbuzz/src/hb-subset-cff2.cc",
  "//third_party/harfbuzz/src/hb-subset-cff-common.cc",
  "//third_party/harfbuzz/src/hb-ucd.cc",
  "//third_party/harfbuzz/src/hb-unicode.cc",
]

Y
YueBiang 已提交
70 71
if (defined(ohos_lite)) {
  lite_library("harfbuzz") {
72 73
    output_dir = "${root_out_dir}/thirdparty/harfbuzz"
    output_name = "harfbuzz"
Y
YueBiang 已提交
74
    sources = harfbuzz_source
Y
YueBiang 已提交
75
    public_configs = [ ":harfbuzz_config" ]
76
    if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") {
77 78 79 80 81 82
      target_type = "static_library"
      defines = [
        "HAVE_PTHREAD=1",
        "ENABLE_ICCARM=1",
        "HB_CUSTOM_MALLOC",
      ]
83 84
      cflags = [
        "--diag_suppress",
85
        "Pe068,Pa093,Pe111,Pa181,Pe128,Pe161,Pe177,Pe185,Pe186,Pe550,Pe554",
86 87
      ]
      cflags_cc = cflags
88 89 90
    } else {
      target_type = "shared_library"
      defines = [ "HAVE_PTHREAD = 1" ]
91
    }
Y
YueBiang 已提交
92 93 94
  }
} else {
  ohos_static_library("harfbuzz_static") {
95 96
    output_dir = "${root_out_dir}/thirdparty/harfbuzz"
    output_name = "harfbuzz"
Y
YueBiang 已提交
97
    sources = harfbuzz_source
Y
YueBiang 已提交
98
    include_dirs = [ "src\base" ]
P
pssea 已提交
99
    defines = [ "HAVE_PTHREAD = 1" ]
Y
YueBiang 已提交
100 101
    public_configs = [ ":harfbuzz_config" ]
  }
M
mamingshuai 已提交
102
}