bded42ab51
Split the :tests target into a :test target which contains the test framework and :tests which collects all of the test cases. This allows for all targets which define tests to depend on :test in order to define tests, with :tests then depending on all targets which define tests. A similar split should be considered for gms, samples, and benches. Change-Id: Ic9f373ec0c1a8ea842fa68327e854db23477caae Reviewed-on: https://skia-review.googlesource.com/c/skia/+/371696 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@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",
|
|
]
|
|
}
|
|
|
|
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) {
|
|
source_set("utils") {
|
|
import("skparagraph.gni")
|
|
public_configs = [ ":utils_config" ]
|
|
configs += [ "../../:skia_private" ]
|
|
sources = skparagraph_utils
|
|
deps = [
|
|
"../..:skia",
|
|
"../skshaper",
|
|
]
|
|
}
|
|
|
|
source_set("gm") {
|
|
if (paragraph_gms_enabled) {
|
|
testonly = true
|
|
sources = [ "gm/simple_gm.cpp" ]
|
|
deps = [
|
|
":skparagraph",
|
|
"../..:gpu_tool_utils",
|
|
"../..:skia",
|
|
"../skshaper",
|
|
]
|
|
} else {
|
|
sources = []
|
|
}
|
|
}
|
|
|
|
source_set("tests") {
|
|
if (paragraph_tests_enabled) {
|
|
testonly = true
|
|
sources = [ "tests/SkParagraphTest.cpp" ]
|
|
deps = [
|
|
":skparagraph",
|
|
"../..:skia",
|
|
"../..:test",
|
|
"../skshaper",
|
|
]
|
|
} else {
|
|
sources = []
|
|
}
|
|
}
|
|
|
|
source_set("bench") {
|
|
if (paragraph_bench_enabled) {
|
|
testonly = true
|
|
sources = [ "bench/ParagraphBench.cpp" ]
|
|
deps = [
|
|
":skparagraph",
|
|
"../..:skia",
|
|
"../skshaper",
|
|
]
|
|
} else {
|
|
sources = []
|
|
}
|
|
}
|
|
|
|
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") {
|
|
}
|
|
}
|