# Copyright 2021 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("../../gn/skia.gni") import("skunicode.gni") declare_args() { skia_use_runtime_icu = false skunicode_tests_enabled = true } if (skia_use_icu || skia_use_client_icu) { config("public_config") { include_dirs = [ "include" ] defines = [ "SK_UNICODE_AVAILABLE" ] if (skia_use_icu) { defines += [ "SK_UNICODE_ICU_IMPLEMENTATION" ] } else if (skia_use_client_icu) { defines += [ "SK_UNICODE_CLIENT_IMPLEMENTATION" ] } if (is_component_build) { defines += [ "SKUNICODE_DLL" ] } } component("skunicode") { check_includes = false public_configs = [ ":public_config" ] public = skia_unicode_public if (!use_oh_skia) { deps = [ "../..:skia" ] } else { include_dirs = [ "//third_party/skia" ] deps = [] } defines = [ "SKUNICODE_IMPLEMENTATION=1" ] sources = skia_unicode_sources defines += [ "SK_UNICODE_AVAILABLE" ] configs += [ "../../:skia_private" ] if (skia_use_icu) { sources += skia_unicode_icu_sources defines += [ "SK_UNICODE_ICU_IMPLEMENTATION" ] # only available for Android at the moment if (skia_use_runtime_icu && (is_android || is_linux)) { sources += skia_unicode_runtime_icu_sources deps += [ "${skia_third_party_dir}/icu:headers" ] } else { sources += skia_unicode_builtin_icu_sources deps += [ "${skia_third_party_dir}/icu" ] if (is_arkui_x) { deps -= [ "${skia_third_party_dir}/icu" ] deps += [ "//third_party/icu/icu4c:static_icuuc" ] include_dirs += [ "//third_party/icu/icu4c/source/common" ] } } configs += [ "../../third_party/icu/config:no_cxx" ] } else if (skia_use_client_icu) { sources += skia_unicode_client_icu_sources defines += [ "SK_UNICODE_CLIENT_IMPLEMENTATION" ] deps += [ skia_icu_bidi_third_party_dir ] } } } else { group("skunicode") { } }