Chromium Code Reviews| Index: tools/gn/secondary/tools/grit/grit_rule.gni |
| diff --git a/tools/gn/secondary/tools/grit/grit_rule.gni b/tools/gn/secondary/tools/grit/grit_rule.gni |
| index f375574f4c3e87bb0bb050c100b33c33acebbbaf..78d42f2ac0b8ab3a0fc6b205de7ba889fe7620a6 100644 |
| --- a/tools/gn/secondary/tools/grit/grit_rule.gni |
| +++ b/tools/gn/secondary/tools/grit/grit_rule.gni |
| @@ -5,7 +5,20 @@ |
| # Instantiate grit. This will produce a script target to run grit, and a |
| # static library that compiles the .cc files. |
| # |
| -# Example: |
| +# Parameters |
| +# |
| +# source |
| +# Path to .grd file. |
| +# |
| +# grit_flags (optional) |
| +# List of strings containing extra command-line flags to pass to Grit. |
| +# |
| +# deps (optional) |
| +# visibility (optional) |
| +# Normal meaning. |
| +# |
| +# Example |
| +# |
| # grit("my_resources") { |
| # source = "myfile.grd" # source is required. |
| # grit_flags = [ "-E", "foo=bar" ] # Optional extra flags. |
| @@ -13,6 +26,7 @@ |
| # # files. |
| # } |
| import ("//build/config/ui.gni") |
| +import ("//build/config/features.gni") |
|
Lei Zhang
2014/06/16 17:58:37
nit: alphabetical order?
|
| grit_defines = [] |
| @@ -34,6 +48,15 @@ if (is_android) { |
| ] |
| } |
| +if (enable_extensions) { |
| + grit_defines += [ "-D", "enable_extensions" ] |
| +} |
| +if (enable_plugins) { |
| + grit_defines += [ "-D", "enable_plugins" ] |
| +} |
| + |
| +# TODO(GYP) the rest of the grit_defines from the gyp build. |
| + |
| grit_resource_id_file = "//tools/gritsettings/resource_ids" |
| grit_info_script = "//tools/grit/grit_info.py" |
| @@ -102,6 +125,10 @@ template("grit") { |
| ] + grit_defines + grit_flags |
| visibility = target_visibility |
| + |
| + if (defined(invoker.deps)) { |
| + deps = invoker.deps |
| + } |
| } |
| # This is the thing that people actually link with, it must be named the |