3d9ab7e7ec
In the build there are some defaults which actually apply to every use of a built-in target type, but there are some (particularaly warnings) which apply only to targets controlled by Skia. Currently these unwanted defaults are magically known to exist and removed wherever they are not wanted. Instead, create 'skia_' prefixed target templates and apply these defaults to those instead. Change-Id: I3a2afb53c7205a2e2748d1cfad46319f2e93d3b3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385516 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
118 lines
2.3 KiB
Plaintext
118 lines
2.3 KiB
Plaintext
# Copyright 2019 Google LLC.
|
|
|
|
import("../../gn/skia.gni")
|
|
import("../skshaper/skshaper.gni")
|
|
|
|
declare_args() {
|
|
skia_enable_skparagraph = true
|
|
paragraph_gms_enabled = true
|
|
paragraph_tests_enabled = true
|
|
paragraph_bench_enabled = false
|
|
}
|
|
|
|
if (skia_enable_skparagraph && skia_enable_skshaper && skia_use_icu &&
|
|
skia_use_harfbuzz) {
|
|
config("public_config") {
|
|
include_dirs = [
|
|
"include",
|
|
"utils",
|
|
]
|
|
}
|
|
|
|
skia_component("skparagraph") {
|
|
import("skparagraph.gni")
|
|
public_configs = [ ":public_config" ]
|
|
public = skparagraph_public
|
|
sources = skparagraph_sources
|
|
deps = [
|
|
"../..:skia",
|
|
"../skshaper",
|
|
]
|
|
}
|
|
|
|
config("utils_config") {
|
|
include_dirs = [ "utils" ]
|
|
}
|
|
|
|
if (defined(is_skia_standalone) && skia_enable_tools) {
|
|
skia_source_set("utils") {
|
|
import("skparagraph.gni")
|
|
public_configs = [ ":utils_config" ]
|
|
configs = [ "../../:skia_private" ]
|
|
sources = skparagraph_utils
|
|
deps = [
|
|
"../..:skia",
|
|
"../skshaper",
|
|
]
|
|
}
|
|
|
|
skia_source_set("gm") {
|
|
if (paragraph_gms_enabled) {
|
|
testonly = true
|
|
sources = [ "gm/simple_gm.cpp" ]
|
|
deps = [
|
|
":skparagraph",
|
|
"../..:gpu_tool_utils",
|
|
"../..:skia",
|
|
"../skshaper",
|
|
]
|
|
} else {
|
|
sources = []
|
|
}
|
|
}
|
|
|
|
skia_source_set("tests") {
|
|
if (paragraph_tests_enabled) {
|
|
testonly = true
|
|
sources = [ "tests/SkParagraphTest.cpp" ]
|
|
deps = [
|
|
":skparagraph",
|
|
"../..:skia",
|
|
"../..:test",
|
|
"../skshaper",
|
|
]
|
|
} else {
|
|
sources = []
|
|
}
|
|
}
|
|
|
|
skia_source_set("bench") {
|
|
if (paragraph_bench_enabled) {
|
|
testonly = true
|
|
sources = [ "bench/ParagraphBench.cpp" ]
|
|
deps = [
|
|
":skparagraph",
|
|
"../..:skia",
|
|
"../skshaper",
|
|
]
|
|
} else {
|
|
sources = []
|
|
}
|
|
}
|
|
|
|
skia_source_set("samples") {
|
|
testonly = true
|
|
sources = [ "samples/SampleParagraph.cpp" ]
|
|
deps = [
|
|
":skparagraph",
|
|
":utils",
|
|
"../..:skia",
|
|
"../skshaper",
|
|
]
|
|
}
|
|
}
|
|
} else {
|
|
group("skparagraph") {
|
|
}
|
|
group("utils") {
|
|
}
|
|
group("gm") {
|
|
}
|
|
group("tests") {
|
|
}
|
|
group("bench") {
|
|
}
|
|
group("samples") {
|
|
}
|
|
}
|