skia2/modules/skshaper/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

38 lines
797 B
Plaintext

# Copyright 2018 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
skia_enable_skshaper = true
}
import("../../gn/skia.gni")
config("public_config") {
if (skia_enable_skshaper) {
include_dirs = [ "include" ]
}
}
source_set("skshaper") {
if (skia_enable_skshaper) {
import("skshaper.gni")
public_configs = [ ":public_config" ]
public = skia_shaper_public
deps = [
"../..:skia",
]
if (target_cpu == "wasm" || !skia_use_icu) {
sources = skia_shaper_primitive_sources
} else {
sources = skia_shaper_harfbuzz_sources
deps += [
"//third_party/harfbuzz",
"//third_party/icu",
]
}
configs += [ "../../:skia_private" ]
}
}