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

Unified Diff: components/version_info/BUILD.gn

Issue 1257633002: Componentize VersionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix lost changes to //chrome/common/BUILD.gn and fix compilation of app_window_intercept_all_keys_u… Created 5 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
Index: components/version_info/BUILD.gn
diff --git a/components/version_info/BUILD.gn b/components/version_info/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..c12da28783de3437230be3fb0daaebe9e7bfe984
--- /dev/null
+++ b/components/version_info/BUILD.gn
@@ -0,0 +1,51 @@
+# Copyright 2015 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.
+
+if (is_ios) {
+ declare_args() {
+ # Controls whether ios/build/util/CANARY_VERSION should be used to
+ # override the PATCH version level or not (set on official builds).
+ use_canary_version_file = false
+ }
+}
+
+source_set("version_info") {
+ sources = [
+ "version_info.cc",
+ "version_info.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/strings",
+ "//ui/base",
+ ":generate_version_info",
+ ]
+}
+
+import("//chrome/version.gni")
+process_version("generate_version_info") {
+ visibility = [ ":version_info" ]
+ template_file = "version_info_values.h.version"
+ output = "$target_gen_dir/version_info_values.h"
+
+ if (is_ios) {
+ if (use_canary_version_file) {
+ ios_version_path = "//ios/build/util/CANARY_VERSION"
+ } else {
+ ios_version_path = "//ios/build/util/VERSION"
+ }
+
+ # iOS overrides PATCH level of the version with the value from the file
+ # named by ios_version_path, however, this needs to be the last argument
+ # to the version.py script, so it cannot be added to the source variable
+ # and instead need to be managed manually.
+
+ input += [ ios_version_path ]
+ extra_args = [
+ "-f",
+ rebase_path(ios_version_path, root_build_dir),
+ ]
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698