1# Copyright 2019 Google LLC. 2 3import("../../gn/skia.gni") 4 5declare_args() { 6 skia_enable_skparagraph = true 7 paragraph_tests_enabled = true 8 paragraph_bench_enabled = false 9} 10 11if (skia_enable_skparagraph) { 12 config("public_config") { 13 include_dirs = [ 14 "include", 15 "utils", 16 ] 17 } 18 19 component("skparagraph") { 20 import("skparagraph.gni") 21 public_configs = [ ":public_config" ] 22 public = skparagraph_public 23 if (skia_use_icu && skia_use_harfbuzz) { 24 sources = skparagraph_sources 25 } else { 26 sources = [] 27 } 28 deps = [ 29 "../..:skia", 30 "../skshaper", 31 "//third_party/icu", 32 ] 33 } 34 35 config("utils_config") { 36 include_dirs = [ "utils" ] 37 } 38 39 if (defined(is_skia_standalone) && skia_enable_tools) { 40 source_set("utils") { 41 import("skparagraph.gni") 42 public_configs = [ ":utils_config" ] 43 configs += [ "../../:skia_private" ] 44 if (skia_use_icu && skia_use_harfbuzz) { 45 sources = skparagraph_utils 46 } else { 47 sources = [] 48 } 49 deps = [ 50 "../..:skia", 51 "../skshaper", 52 "//third_party/icu", 53 ] 54 } 55 56 source_set("tests") { 57 if (skia_use_icu && skia_use_harfbuzz && paragraph_tests_enabled) { 58 testonly = true 59 sources = [ 60 "//tests/SkParagraphTest.cpp", 61 ] 62 deps = [ 63 ":skparagraph", 64 "../..:gpu_tool_utils", 65 "../..:skia", 66 "../skshaper", 67 "//third_party/icu", 68 ] 69 } 70 } 71 72 source_set("bench") { 73 if (skia_use_icu && skia_use_harfbuzz && paragraph_bench_enabled) { 74 testonly = true 75 sources = [ 76 "//bench/ParagraphBench.cpp", 77 ] 78 deps = [ 79 ":skparagraph", 80 "../..:skia", 81 "../skshaper", 82 "//third_party/icu", 83 ] 84 } 85 } 86 87 source_set("samples") { 88 if (skia_use_icu && skia_use_harfbuzz) { 89 testonly = true 90 sources = [ 91 "//samplecode/SampleParagraph.cpp", 92 ] 93 deps = [ 94 ":skparagraph", 95 ":utils", 96 "../..:skia", 97 "../skshaper", 98 "//third_party/icu", 99 ] 100 } 101 } 102 } 103} 104