Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Unified Diff: media/BUILD.gn

Issue 420443003: GN foreach should mark the list identifier as used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/BUILD.gn ('k') | tools/gn/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/BUILD.gn
diff --git a/media/BUILD.gn b/media/BUILD.gn
index aa7daea5828ea104a1e3d25389b4d80089c70cc8..f2acd92058a1f9ded7d903cc87cef344cc060509 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -42,6 +42,28 @@ config("media_dependent_config") {
}
}
+if (use_ozone) {
+ action("generate_ozone_constructor_list") {
+ # Ozone platform objects are auto-generated using similar
+ # patterns for naming and classes constructors. Here we build the
+ # object MediaOzonePlatform.
+ script = "../ui/ozone/generate_constructor_list.py"
+
+ platform_list_txt_file = "$target_gen_dir/ui/ozone/platform_list.txt"
+ constructor_list_cc_file = "$target_gen_dir/media/ozone/constructor_list.cc"
+
+ sources = [ platform_list_txt_file ]
+ outputs = [ constructor_list_cc_file ]
+ args = [
+ "--platform_list=$platform_list_txt_file",
+ "--output_cc=$constructor_list_cc_file",
+ "--namespace=media",
+ "--typename=MediaOzonePlatform",
+ "--include=\"media/ozone/media_ozone_platform.h\""
+ ]
+ }
+}
+
component("media") {
sources = [
"base/audio_block_fifo.cc",
@@ -506,35 +528,18 @@ component("media") {
}
if (use_ozone) {
- platform_list_txt_file = "$target_gen_dir/ui/ozone/platform_list.txt"
- constructor_list_cc_file = "$target_gen_dir/media/ozone/constructor_list.cc"
-
# Used for the generated listing header (ui/ozone/platform_list.h)
include_dirs += [ target_gen_dir ]
sources += [
- constructor_list_cc_file,
"ozone/media_ozone_platform.cc",
"ozone/media_ozone_platform.h",
- ]
-
- deps += [ "//ui/ozone/ozone" ]
+ ] + get_target_outputs(":generate_ozone_constructor_list")
- action("generate_constructor_list") {
- # Ozone platform objects are auto-generated using similar
- # patterns for naming and classes constructors. Here we build the
- # object MediaOzonePlatform.
- script = "../ui/ozone/generate_constructor_list.py"
- sources = [ platform_list_txt_file ]
- outputs = [ constructor_list_cc_file ]
- args += [
- "--platform_list=$platform_list_txt_file",
- "--output_cc=$constructor_list_cc_file",
- "--namespace=media",
- "--typename=MediaOzonePlatform",
- "--include=\"media/ozone/media_ozone_platform.h\""
- ]
- }
+ deps += [
+ ":generate_ozone_constructor_list",
+ "//ui/ozone",
+ ]
}
if (is_mac) {
« no previous file with comments | « cc/BUILD.gn ('k') | tools/gn/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698