# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

public_include_dirs = [
  "//third_party/icu/source/common",
  "//third_party/icu/source/i18n",
]

config("icu_bidi_public") {
  include_dirs = public_include_dirs
  defines = [
    "U_USING_ICU_NAMESPACE=0",
    "U_DISABLE_RENAMING=0",
    "U_HAVE_LIB_SUFFIX=1",
    "U_LIB_SUFFIX_C_NAME=_skia",
    "U_DISABLE_VERSION_SUFFIX=1",
    "SK_USING_THIRD_PARTY_ICU",
  ]
  cflags = []

  foreach(dir, include_dirs) {
    cflags += [
      "-isystem",
      rebase_path(dir),
    ]
  }
}

static_library("icu_bidi") {
  defines = [
    "U_COMMON_IMPLEMENTATION",
    "U_STATIC_IMPLEMENTATION",
    "U_I18N_IMPLEMENTATION",
  ]
  sources = [
    "//third_party/icu/source/common/cmemory.cpp",
    "//third_party/icu/source/common/cstring.cpp",
    "//third_party/icu/source/common/ubidi.cpp",
    "//third_party/icu/source/common/ubidi_props.cpp",
    "//third_party/icu/source/common/ubidiln.cpp",
    "//third_party/icu/source/common/ubidiwrt.cpp",
    "//third_party/icu/source/common/uchar.cpp",
    "//third_party/icu/source/common/udataswp.cpp",
    "//third_party/icu/source/common/uinvchar.cpp",
    "//third_party/icu/source/common/ustring.cpp",
    "//third_party/icu/source/common/ustrtrns.cpp",
    "//third_party/icu/source/common/utf_impl.cpp",
    "//third_party/icu/source/common/utrie2.cpp",
    "//third_party/icu/source/common/utypes.cpp",
  ]
  public_configs = [ ":icu_bidi_public" ]
  cflags = [ "-w" ]
}
