| 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..57c3d09690601da7443b410789821245957509d0
|
| --- /dev/null
|
| +++ b/components/version_info/BUILD.gn
|
| @@ -0,0 +1,58 @@
|
| +# 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.
|
| +
|
| +import("//chrome/version.gni")
|
| +
|
| +if (is_ios) {
|
| + declare_args() {
|
| + # Path to the file used to override the version PATH level on iOS.
|
| + # Default to ios/build/util/VERSION.
|
| + ios_extra_version_path = "//ios/build/util/VERSION"
|
| +
|
| + # Controls whether the extra version path should be overridden to
|
| + # use ios/build/util/CANARY_VERSION (legacy until the bots have
|
| + # been updated to override ios_extra_version_path instead).
|
| + # TODO(sdefresne): remove once http://crbug.com/514560 is fixed.
|
| + 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",
|
| + ]
|
| +}
|
| +
|
| +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) {
|
| + extra_version_path = "//ios/build/util/CANARY_VERSION"
|
| + } else {
|
| + extra_version_path = ios_extra_version_path
|
| + }
|
| +
|
| + # 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.
|
| +
|
| + inputs += [ extra_version_path ]
|
| + extra_args = [
|
| + "-f",
|
| + rebase_path(extra_version_path, root_build_dir),
|
| + ]
|
| + }
|
| +}
|
|
|