[M67 Dev][Tizen] Integrate GN and set up build environment
[platform/framework/web/chromium-efl.git] / chrome / chrome_repack_locales.gni
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/chrome_build.gni")
6 import("//build/config/features.gni")
7 import("//build/config/ui.gni")
8 import("//extensions/buildflags/buildflags.gni")
9 import("//tools/grit/repack.gni")
10
11 assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome")
12
13 # Wraps repack_locales(), setting the source_patterns and deps required for
14 # Chrome.
15 #
16 # Extra Parameters:
17 #
18 #   additional_source_patterns [optional]
19 #      Extra source_patterns for repack_locales().
20 template("chrome_repack_locales") {
21   repack_locales(target_name) {
22     forward_variables_from(invoker, "*", [ "additional_source_patterns" ])
23
24     # Each input pak file should also have a deps line.
25     source_patterns = [
26       "${root_gen_dir}/chrome/generated_resources_",
27       "${root_gen_dir}/chrome/locale_settings_",
28       "${root_gen_dir}/chrome/platform_locale_settings_",
29       "${root_gen_dir}/components/strings/components_locale_settings_",
30       "${root_gen_dir}/components/strings/components_strings_",
31       "${root_gen_dir}/content/app/strings/content_strings_",
32       "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_",
33       "${root_gen_dir}/third_party/libaddressinput/address_input_strings_",
34       "${root_gen_dir}/ui/strings/app_locale_settings_",
35       "${root_gen_dir}/ui/strings/ui_strings_",
36     ]
37     if (!defined(deps)) {
38       deps = []
39     }
40     deps += [
41       "//chrome/app:generated_resources",
42       "//chrome/app/resources:locale_settings",
43       "//chrome/app/resources:platform_locale_settings",
44       "//components/strings:components_locale_settings",
45       "//components/strings:components_strings",
46       "//content/app/strings",
47       "//device/bluetooth/strings",
48       "//third_party/libaddressinput:strings",
49       "//ui/strings:app_locale_settings",
50       "//ui/strings:ui_strings",
51     ]
52     if (defined(invoker.deps)) {
53       deps += invoker.deps
54     }
55
56     if (is_chromeos) {
57       source_patterns += [
58         "${root_gen_dir}/ash/components/strings/ash_components_strings_",
59         "${root_gen_dir}/ash/strings/ash_strings_",
60         "${root_gen_dir}/remoting/resources/",
61         "${root_gen_dir}/ui/chromeos/strings/ui_chromeos_strings_",
62       ]
63       deps += [
64         "//ash/components/strings",
65         "//ash/strings",
66         "//remoting/resources",
67         "//ui/chromeos/strings",
68       ]
69     }
70     if (enable_extensions) {
71       source_patterns +=
72           [ "${root_gen_dir}/extensions/strings/extensions_strings_" ]
73       deps += [ "//extensions/strings" ]
74     }
75
76     if (is_chrome_branded) {
77       source_patterns += [
78         "${root_gen_dir}/chrome/google_chrome_strings_",
79         "${root_gen_dir}/components/strings/components_google_chrome_strings_",
80       ]
81       deps += [
82         "//chrome/app:google_chrome_strings",
83         "//components/strings:components_google_chrome_strings",
84       ]
85     } else {
86       source_patterns += [
87         "${root_gen_dir}/chrome/chromium_strings_",
88         "${root_gen_dir}/components/strings/components_chromium_strings_",
89       ]
90       deps += [
91         "//chrome/app:chromium_strings",
92         "//components/strings:components_chromium_strings",
93       ]
94     }
95
96     if (defined(invoker.additional_source_patterns)) {
97       source_patterns += invoker.additional_source_patterns
98     }
99   }
100 }