2021-02-24 17:15:08 +00:00
|
|
|
# Copyright 2021 Google LLC.
|
|
|
|
|
|
|
|
import("../../gn/skia.gni")
|
|
|
|
import("../../modules/skshaper/skshaper.gni")
|
|
|
|
|
|
|
|
declare_args() {
|
|
|
|
skia_enable_sktext = true
|
|
|
|
text_gms_enabled = true
|
|
|
|
text_tests_enabled = true
|
|
|
|
text_bench_enabled = false
|
|
|
|
}
|
|
|
|
|
|
|
|
if (skia_enable_sktext && skia_enable_skshaper && skia_use_icu &&
|
|
|
|
skia_use_harfbuzz) {
|
|
|
|
config("public_config") {
|
|
|
|
include_dirs = [ "include" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
component("sktext") {
|
|
|
|
import("sktext.gni")
|
|
|
|
public_configs = [ ":public_config" ]
|
|
|
|
public = sktext_public
|
|
|
|
sources = sktext_sources
|
|
|
|
deps = [
|
|
|
|
"../..:skia",
|
|
|
|
"../../modules/skshaper",
|
2021-07-27 18:02:28 +00:00
|
|
|
"../../modules/skunicode",
|
2021-02-24 17:15:08 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (defined(is_skia_standalone) && skia_enable_tools) {
|
|
|
|
source_set("gm") {
|
|
|
|
if (text_gms_enabled) {
|
|
|
|
testonly = true
|
|
|
|
sources = []
|
|
|
|
deps = [
|
|
|
|
":sktext",
|
|
|
|
"../..:gpu_tool_utils",
|
|
|
|
"../..:skia",
|
|
|
|
"../../modules/skshaper",
|
|
|
|
]
|
|
|
|
} else {
|
|
|
|
sources = []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
source_set("tests") {
|
|
|
|
if (text_tests_enabled) {
|
|
|
|
testonly = true
|
|
|
|
sources = []
|
|
|
|
deps = [
|
|
|
|
":sktext",
|
|
|
|
"../..:gpu_tool_utils",
|
|
|
|
"../..:skia",
|
|
|
|
"../../modules/skshaper",
|
|
|
|
]
|
|
|
|
} else {
|
|
|
|
sources = []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
source_set("bench") {
|
|
|
|
if (text_bench_enabled) {
|
|
|
|
testonly = true
|
|
|
|
sources = []
|
|
|
|
deps = [
|
|
|
|
":sktext",
|
|
|
|
"../..:skia",
|
|
|
|
"../../modules/skshaper",
|
|
|
|
]
|
|
|
|
} else {
|
|
|
|
sources = []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
source_set("samples") {
|
|
|
|
testonly = true
|
2021-06-10 14:26:36 +00:00
|
|
|
sources = [
|
2021-07-21 23:51:37 +00:00
|
|
|
"editor/Cursor.cpp",
|
2021-06-10 14:26:36 +00:00
|
|
|
"editor/Editor.cpp",
|
2021-07-21 23:51:37 +00:00
|
|
|
"editor/Mouse.cpp",
|
|
|
|
"editor/Selection.cpp",
|
|
|
|
"editor/Texts.cpp",
|
2021-06-10 14:26:36 +00:00
|
|
|
"samples/Text.cpp",
|
|
|
|
]
|
2021-02-24 17:15:08 +00:00
|
|
|
deps = [
|
|
|
|
":sktext",
|
|
|
|
"../..:skia",
|
|
|
|
"../../modules/skshaper",
|
|
|
|
]
|
|
|
|
}
|
2021-06-10 14:26:36 +00:00
|
|
|
|
|
|
|
skia_source_set("text_editor") {
|
|
|
|
testonly = true
|
|
|
|
sources = [
|
|
|
|
"editor/App.cpp",
|
2021-07-21 23:51:37 +00:00
|
|
|
"editor/Cursor.cpp",
|
2021-06-10 14:26:36 +00:00
|
|
|
"editor/Editor.cpp",
|
2021-07-21 23:51:37 +00:00
|
|
|
"editor/Mouse.cpp",
|
|
|
|
"editor/Selection.cpp",
|
|
|
|
"editor/Texts.cpp",
|
2021-06-10 14:26:36 +00:00
|
|
|
]
|
|
|
|
public_deps = [ "../..:sk_app" ]
|
|
|
|
deps = [ ":sktext" ]
|
|
|
|
}
|
2021-02-24 17:15:08 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
group("sktext") {
|
|
|
|
}
|
|
|
|
group("gm") {
|
|
|
|
}
|
|
|
|
group("tests") {
|
|
|
|
}
|
|
|
|
group("bench") {
|
|
|
|
}
|
|
|
|
group("samples") {
|
|
|
|
}
|
|
|
|
}
|