2019-05-30 20:12:56 +00:00
|
|
|
# Copyright 2019 Google LLC.
|
|
|
|
|
|
|
|
import("../../gn/skia.gni")
|
2020-09-11 13:59:49 +00:00
|
|
|
import("../skshaper/skshaper.gni")
|
2019-05-30 20:12:56 +00:00
|
|
|
|
|
|
|
declare_args() {
|
2019-11-18 22:19:42 +00:00
|
|
|
skia_enable_skparagraph = true
|
2020-06-02 15:34:24 +00:00
|
|
|
paragraph_gms_enabled = true
|
2019-05-30 20:12:56 +00:00
|
|
|
paragraph_tests_enabled = true
|
|
|
|
paragraph_bench_enabled = false
|
|
|
|
}
|
|
|
|
|
2020-09-11 13:59:49 +00:00
|
|
|
if (skia_enable_skparagraph && skia_enable_skshaper && skia_use_icu &&
|
|
|
|
skia_use_harfbuzz) {
|
2019-05-30 20:12:56 +00:00
|
|
|
config("public_config") {
|
2019-07-25 16:33:48 +00:00
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"utils",
|
|
|
|
]
|
2019-05-30 20:12:56 +00:00
|
|
|
}
|
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_component("skparagraph") {
|
2019-05-30 20:12:56 +00:00
|
|
|
import("skparagraph.gni")
|
|
|
|
public_configs = [ ":public_config" ]
|
|
|
|
public = skparagraph_public
|
2020-09-11 13:59:49 +00:00
|
|
|
sources = skparagraph_sources
|
2019-05-30 20:12:56 +00:00
|
|
|
deps = [
|
|
|
|
"../..:skia",
|
|
|
|
"../skshaper",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-06-19 17:32:01 +00:00
|
|
|
config("utils_config") {
|
|
|
|
include_dirs = [ "utils" ]
|
|
|
|
}
|
|
|
|
|
2019-05-30 20:12:56 +00:00
|
|
|
if (defined(is_skia_standalone) && skia_enable_tools) {
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set("utils") {
|
2019-06-19 17:32:01 +00:00
|
|
|
import("skparagraph.gni")
|
|
|
|
public_configs = [ ":utils_config" ]
|
2021-03-16 18:29:20 +00:00
|
|
|
configs = [ "../../:skia_private" ]
|
2020-09-11 13:59:49 +00:00
|
|
|
sources = skparagraph_utils
|
2019-06-19 17:32:01 +00:00
|
|
|
deps = [
|
|
|
|
"../..:skia",
|
|
|
|
"../skshaper",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set("gm") {
|
2020-09-11 13:59:49 +00:00
|
|
|
if (paragraph_gms_enabled) {
|
2020-06-02 15:34:24 +00:00
|
|
|
testonly = true
|
|
|
|
sources = [ "gm/simple_gm.cpp" ]
|
|
|
|
deps = [
|
|
|
|
":skparagraph",
|
|
|
|
"../..:gpu_tool_utils",
|
|
|
|
"../..:skia",
|
|
|
|
"../skshaper",
|
|
|
|
]
|
2020-09-11 13:59:49 +00:00
|
|
|
} else {
|
|
|
|
sources = []
|
2020-06-02 15:34:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set("tests") {
|
2020-09-11 13:59:49 +00:00
|
|
|
if (paragraph_tests_enabled) {
|
2019-05-30 20:12:56 +00:00
|
|
|
testonly = true
|
2020-05-28 00:12:55 +00:00
|
|
|
sources = [ "tests/SkParagraphTest.cpp" ]
|
2019-05-30 20:12:56 +00:00
|
|
|
deps = [
|
|
|
|
":skparagraph",
|
2019-07-25 16:33:48 +00:00
|
|
|
"../..:skia",
|
2021-02-18 03:14:34 +00:00
|
|
|
"../..:test",
|
2019-05-30 20:12:56 +00:00
|
|
|
"../skshaper",
|
|
|
|
]
|
2020-09-11 13:59:49 +00:00
|
|
|
} else {
|
|
|
|
sources = []
|
2019-05-30 20:12:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set("bench") {
|
2020-09-11 13:59:49 +00:00
|
|
|
if (paragraph_bench_enabled) {
|
2019-05-30 20:12:56 +00:00
|
|
|
testonly = true
|
2020-05-28 00:12:55 +00:00
|
|
|
sources = [ "bench/ParagraphBench.cpp" ]
|
2019-05-30 20:12:56 +00:00
|
|
|
deps = [
|
|
|
|
":skparagraph",
|
2019-07-25 16:33:48 +00:00
|
|
|
"../..:skia",
|
2019-05-30 20:12:56 +00:00
|
|
|
"../skshaper",
|
|
|
|
]
|
2020-09-11 13:59:49 +00:00
|
|
|
} else {
|
|
|
|
sources = []
|
2019-05-30 20:12:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set("samples") {
|
2020-09-11 13:59:49 +00:00
|
|
|
testonly = true
|
|
|
|
sources = [ "samples/SampleParagraph.cpp" ]
|
|
|
|
deps = [
|
|
|
|
":skparagraph",
|
|
|
|
":utils",
|
|
|
|
"../..:skia",
|
|
|
|
"../skshaper",
|
|
|
|
]
|
2019-05-30 20:12:56 +00:00
|
|
|
}
|
|
|
|
}
|
2020-09-11 13:59:49 +00:00
|
|
|
} else {
|
|
|
|
group("skparagraph") {
|
|
|
|
}
|
|
|
|
group("utils") {
|
|
|
|
}
|
|
|
|
group("gm") {
|
|
|
|
}
|
|
|
|
group("tests") {
|
|
|
|
}
|
|
|
|
group("bench") {
|
|
|
|
}
|
|
|
|
group("samples") {
|
|
|
|
}
|
2019-07-25 16:33:48 +00:00
|
|
|
}
|