skia2/third_party/harfbuzz/BUILD.gn
Hal Canary 32498f0846 GN/ICU cleanup
For targets that depend on ICU, only define if `skia_use_icu` is set.

Move declare_args/skia_use_icu into skia.gni.  Other variables that need
to work like that can move there later.

icu/BUILD.gn defines SK_USING_THIRD_PARTY_ICU if needed.
SkShaper_harfbuzz.cpp SkPDFSubsetFont.cpp respects
SK_USING_THIRD_PARTY_ICU when calling SkLoadICU().

sfntly/BUILD.gn, harfbuzz/BUILD.gn, icu/icu.gni uses $_src variable to
reduce verbosity.   icu/icu.gni adds more headersto sources.

Change-Id: I9e000b9b19902d9f5c0c64e989bf42466aa8a299
Reviewed-on: https://skia-review.googlesource.com/c/189304
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-02-05 17:27:55 +00:00

82 lines
2.2 KiB
Plaintext

# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
}
import("../../gn/skia.gni")
import("../third_party.gni")
if (skia_use_icu) {
third_party("harfbuzz") {
_src = "../externals/harfbuzz/src"
public_include_dirs = [
".",
_src,
]
defines = [
"HAVE_ICU",
"HAVE_ICU_BUILTIN",
"HAVE_OT",
"HB_NO_MT",
]
deps = [
"//third_party/icu",
]
sources = [
"$_src/hb-aat-layout.cc",
"$_src/hb-aat-map.cc",
"$_src/hb-blob.cc",
"$_src/hb-buffer.cc",
"$_src/hb-buffer-serialize.cc",
"$_src/hb-common.cc",
"$_src/hb-face.cc",
"$_src/hb-font.cc",
"$_src/hb-icu.cc",
"$_src/hb-map.cc",
"$_src/hb-ot-color.cc",
"$_src/hb-ot-face.cc",
"$_src/hb-ot-font.cc",
"$_src/hb-ot-layout.cc",
"$_src/hb-ot-map.cc",
"$_src/hb-ot-math.cc",
"$_src/hb-ot-name.cc",
"$_src/hb-ot-name-language.cc",
"$_src/hb-ot-shape.cc",
"$_src/hb-ot-shape-complex-arabic.cc",
"$_src/hb-ot-shape-complex-default.cc",
"$_src/hb-ot-shape-complex-hangul.cc",
"$_src/hb-ot-shape-complex-hebrew.cc",
"$_src/hb-ot-shape-complex-indic.cc",
"$_src/hb-ot-shape-complex-indic-table.cc",
"$_src/hb-ot-shape-complex-khmer.cc",
"$_src/hb-ot-shape-complex-myanmar.cc",
"$_src/hb-ot-shape-complex-thai.cc",
"$_src/hb-ot-shape-complex-use.cc",
"$_src/hb-ot-shape-complex-use-table.cc",
"$_src/hb-ot-shape-complex-vowel-constraints.cc",
"$_src/hb-ot-shape-fallback.cc",
"$_src/hb-ot-shape-normalize.cc",
"$_src/hb-ot-tag.cc",
"$_src/hb-ot-var.cc",
"$_src/hb-set.cc",
"$_src/hb-shape.cc",
"$_src/hb-shape-plan.cc",
"$_src/hb-shaper.cc",
"$_src/hb-static.cc",
"$_src/hb-subset.cc",
"$_src/hb-subset-glyf.cc",
"$_src/hb-subset-input.cc",
"$_src/hb-subset-plan.cc",
"$_src/hb-unicode.cc",
"$_src/hb-warning.cc",
]
if (is_mac) {
sources += [ "$_src/hb-coretext.cc" ]
defines += [ "HAVE_CORETEXT" ]
}
}
}