| # 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") { |
| defines = [ "SK_ENABLE_PARAGRAPH" ] |
| include_dirs = [ |
| "include", |
| "utils", |
| ] |
| } |
| |
| skia_component("skparagraph") { |
| import("skparagraph.gni") |
| public_configs = [ ":public_config" ] |
| public = skparagraph_public |
| sources = skparagraph_sources |
| deps = [ |
| "../..:skia", |
| "../skshaper", |
| "../skunicode", |
| ] |
| } |
| |
| 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") { |
| } |
| } |