chromium/ui/base/ime/linux/BUILD.gn

# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chromeos/ui_mode.gni")
import("//build/config/linux/pangocairo/pangocairo.gni")

assert(is_linux || is_chromeos_lacros)

component("linux") {
  output_name = "ui_base_ime_linux"
  sources = [
    "fake_input_method_context.cc",
    "fake_input_method_context.h",
    "input_method_auralinux.cc",
    "input_method_auralinux.h",
    "linux_input_method_context.h",
    "linux_input_method_context_factory.cc",
    "linux_input_method_context_factory.h",
    "text_edit_command_auralinux.cc",
    "text_edit_command_auralinux.h",
  ]

  defines = [ "IS_UI_BASE_IME_LINUX_IMPL" ]

  public_deps = [ "//ui/base/ime" ]

  if (use_pangocairo) {
    configs += [ "//build/config/linux/pangocairo" ]
    sources += [
      "composition_text_util_pango.cc",
      "composition_text_util_pango.h",
    ]
  }

  deps = [
    "//ui/base",

    # TODO(crbug.com/40761214): Remove this on unifying lacros and linux desktop
    # behavior again.
    "//build:chromeos_buildflags",
  ]

  if (is_linux) {
    deps += [ "//ui/linux:linux_ui" ]
  }
}