2019-05-30 20:12:56 +00:00
|
|
|
# Copyright 2019 Google LLC.
|
|
|
|
|
|
|
|
import("../../gn/skia.gni")
|
|
|
|
|
|
|
|
declare_args() {
|
2019-11-18 22:19:42 +00:00
|
|
|
skia_enable_skparagraph = true
|
2019-05-30 20:12:56 +00:00
|
|
|
paragraph_tests_enabled = true
|
|
|
|
paragraph_bench_enabled = false
|
|
|
|
}
|
|
|
|
|
|
|
|
if (skia_enable_skparagraph) {
|
|
|
|
config("public_config") {
|
2019-07-25 16:33:48 +00:00
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"utils",
|
|
|
|
]
|
2019-05-30 20:12:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
component("skparagraph") {
|
|
|
|
import("skparagraph.gni")
|
|
|
|
public_configs = [ ":public_config" ]
|
|
|
|
public = skparagraph_public
|
|
|
|
if (skia_use_icu && skia_use_harfbuzz) {
|
|
|
|
sources = skparagraph_sources
|
|
|
|
} else {
|
|
|
|
sources = []
|
|
|
|
}
|
|
|
|
deps = [
|
|
|
|
"../..:skia",
|
|
|
|
"../skshaper",
|
|
|
|
"//third_party/icu",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
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) {
|
2019-06-19 17:32:01 +00:00
|
|
|
source_set("utils") {
|
|
|
|
import("skparagraph.gni")
|
|
|
|
public_configs = [ ":utils_config" ]
|
|
|
|
configs += [ "../../:skia_private" ]
|
|
|
|
if (skia_use_icu && skia_use_harfbuzz) {
|
|
|
|
sources = skparagraph_utils
|
|
|
|
} else {
|
|
|
|
sources = []
|
|
|
|
}
|
|
|
|
deps = [
|
|
|
|
"../..:skia",
|
|
|
|
"../skshaper",
|
|
|
|
"//third_party/icu",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-05-30 20:12:56 +00:00
|
|
|
source_set("tests") {
|
|
|
|
if (skia_use_icu && skia_use_harfbuzz && paragraph_tests_enabled) {
|
|
|
|
testonly = true
|
|
|
|
sources = [
|
2019-07-25 16:33:48 +00:00
|
|
|
"//tests/SkParagraphTest.cpp",
|
2019-05-30 20:12:56 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skparagraph",
|
2019-07-25 16:33:48 +00:00
|
|
|
"../..:gpu_tool_utils",
|
|
|
|
"../..:skia",
|
2019-05-30 20:12:56 +00:00
|
|
|
"../skshaper",
|
|
|
|
"//third_party/icu",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
source_set("bench") {
|
|
|
|
if (skia_use_icu && skia_use_harfbuzz && paragraph_bench_enabled) {
|
|
|
|
testonly = true
|
|
|
|
sources = [
|
2019-07-25 16:33:48 +00:00
|
|
|
"//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",
|
|
|
|
"//third_party/icu",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
source_set("samples") {
|
|
|
|
if (skia_use_icu && skia_use_harfbuzz) {
|
|
|
|
testonly = true
|
|
|
|
sources = [
|
|
|
|
"//samplecode/SampleParagraph.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skparagraph",
|
2019-06-19 17:32:01 +00:00
|
|
|
":utils",
|
2019-07-25 16:33:48 +00:00
|
|
|
"../..:skia",
|
2019-05-30 20:12:56 +00:00
|
|
|
"../skshaper",
|
|
|
|
"//third_party/icu",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-07-25 16:33:48 +00:00
|
|
|
}
|