1# Copyright 2021 Google Inc. 2# 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6import("../../gn/skia.gni") 7import("skunicode.gni") 8 9declare_args() { 10 skia_use_runtime_icu = false 11} 12 13if (skia_use_icu) { 14 config("public_config") { 15 include_dirs = [ "include" ] 16 defines = [ "SK_UNICODE_AVAILABLE" ] 17 if (is_component_build) { 18 defines += [ "SKUNICODE_DLL" ] 19 } 20 } 21 22 component("skunicode") { 23 check_includes = false 24 public_configs = [ ":public_config" ] 25 public = skia_unicode_public 26 deps = [ "../..:skia" ] 27 defines = [ "SKUNICODE_IMPLEMENTATION=1" ] 28 sources = skia_unicode_sources 29 30 # only available for Android at the moment 31 if (skia_use_runtime_icu && (is_android || is_linux)) { 32 sources += skia_unicode_runtime_icu_sources 33 deps += [ "${skia_third_party_dir}/icu:headers" ] 34 } else { 35 sources += skia_unicode_builtin_icu_sources 36 deps += [ "${skia_third_party_dir}/icu" ] 37 } 38 configs += [ 39 "../../:skia_private", 40 "../../third_party/icu/config:no_cxx", 41 ] 42 } 43} else { 44 group("skunicode") { 45 } 46} 47