chromium/chrome/app/resources/BUILD.gn

# Copyright 2014 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/chrome_build.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/locales.gni")
import("//chrome/common/features.gni")
import("//tools/grit/grit_rule.gni")

assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome")
assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome")

grit("locale_settings") {
  source = "locale_settings.grd"
  defines = chrome_grit_defines
  output_dir = "$root_gen_dir/chrome"
  outputs =
      [ "grit/locale_settings.h" ] +
      process_file_template(all_chrome_locales,
                            [ "locale_settings_{{source_name_part}}.pak" ])
}

grit("platform_locale_settings") {
  if (is_win) {
    source = "locale_settings_win.grd"
  } else if (is_mac) {
    source = "locale_settings_mac.grd"
  } else if (is_chromeos) {
    if (is_chrome_branded) {
      source = "locale_settings_google_chromeos.grd"
    } else {
      source = "locale_settings_chromiumos.grd"
    }
  } else if (is_posix) {
    # All other POSIX systems and Fuchsia use the Linux one.
    source = "locale_settings_linux.grd"
  }

  defines = chrome_grit_defines
  outputs = [ "grit/platform_locale_settings.h" ] +
            process_file_template(
                locales_with_pseudolocales,
                [ "platform_locale_settings_{{source_name_part}}.pak" ])
  output_dir = "$root_gen_dir/chrome"
}