summaryrefslogtreecommitdiffstats
path: root/chrome/app/BUILD.gn
blob: 6be2ff36694d06d77d12bd1b5ffa7cbf4ac481b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//tools/grit/grit_rule.gni")

# GYP version: chrome/chrome_resources.gyp:chrome_strings
#              (generate_generated_resources action)
grit("generated_resources") {
  source = "generated_resources.grd"
}

# GYP version: chrome/chrome_resources.gyp:chrome_strings_map
action("make_generated_resources_map") {
  # Targets should depend on generated_resources_map instead.
  visibility = ":generated_resources_map"

  script = "//chrome/browser/metrics/variations/generate_resources_map.py"

  inputs = [ "$target_gen_dir/grit/generated_resources.h" ]
  outputs = [ "$target_gen_dir/generated_resources_map.cc" ]

  args = rebase_path(inputs, root_build_dir) +
      rebase_path(outputs, root_build_dir)

  deps = [ ":generated_resources" ]
}

# Collect the generated .cc file from make_generated_resources_map and put it
# in a source set so targets that depend on it will link the source rather than
# specifying it manually. This doesn't happen in the GYP build.
source_set("generated_resources_map") {
  sources = get_target_outputs(":make_generated_resources_map")
}

# GYP version: chrome/chrome_resources.gyp:chrome_strings
#              (generate_google_chrome_strings action)
grit("google_chrome_strings") {
  source = "google_chrome_strings.grd"
}

# GYP version: chrome/chrome_resources.gyp:chrome_strings
#              (generate_chromium_strings action)
grit("chromium_strings") {
  source = "chromium_strings.grd"
}