| 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),
|
| + ]
|
| + }
|
| +}
|
|
|