blob: 1acc3f368d6e8e93d1ae4943fe42e41d3584072e [file] [log] [blame]
# Copyright 2018 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("../../gn/skia.gni")
import("skshaper.gni")
if (skia_enable_skunicode && skia_enable_skshaper) {
config("public_config") {
include_dirs = [ "include" ]
defines = []
if (is_component_build) {
defines += [ "SKSHAPER_DLL" ]
}
if (skia_use_fonthost_mac) {
defines += [ "SK_SHAPER_CORETEXT_AVAILABLE" ]
}
if (skia_use_harfbuzz) {
defines += [ "SK_SHAPER_HARFBUZZ_AVAILABLE" ]
}
}
component("skshaper") {
check_includes = false
public_configs = [ ":public_config" ]
public = skia_shaper_public
deps = [ "../..:skia" ]
defines = [ "SKSHAPER_IMPLEMENTATION=1" ]
sources = skia_shaper_primitive_sources
if (skia_use_fonthost_mac) {
sources += skia_shaper_coretext_sources
if (is_mac) {
frameworks = [ "ApplicationServices.framework" ]
}
if (is_ios) {
frameworks = [
"CoreFoundation.framework",
"CoreText.framework",
]
}
}
if (skia_use_harfbuzz) {
sources += skia_shaper_harfbuzz_sources
deps += [
"../skunicode",
"//third_party/harfbuzz",
]
}
configs += [ "../../:skia_private" ]
}
if (defined(is_skia_standalone) && skia_enable_tools) {
skia_source_set("tests") {
if (skia_enable_skshaper_tests) {
testonly = true
sources = skia_shaper_tests
deps = [
"../..:skia",
"../..:test",
"../skshaper",
]
} else {
sources = []
}
}
}
} else {
group("skshaper") {
}
group("tests") {
}
}