OLD | NEW |
(Empty) | |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 if (is_ios) { |
| 6 declare_args() { |
| 7 # Controls whether ios/build/util/CANARY_VERSION should be used to |
| 8 # override the PATCH version level or not (set on official builds). |
| 9 use_canary_version_file = false |
| 10 } |
| 11 } |
| 12 |
| 13 source_set("version_info") { |
| 14 sources = [ |
| 15 "version_info.cc", |
| 16 "version_info.h", |
| 17 ] |
| 18 |
| 19 deps = [ |
| 20 "//base", |
| 21 "//components/strings", |
| 22 "//ui/base", |
| 23 ":generate_version_info", |
| 24 ] |
| 25 } |
| 26 |
| 27 import("//chrome/version.gni") |
| 28 process_version("generate_version_info") { |
| 29 visibility = [ ":version_info" ] |
| 30 template_file = "version_info_values.h.version" |
| 31 output = "$target_gen_dir/version_info_values.h" |
| 32 |
| 33 if (is_ios) { |
| 34 if (use_canary_version_file) { |
| 35 ios_version_path = "//ios/build/util/CANARY_VERSION" |
| 36 } else { |
| 37 ios_version_path = "//ios/build/util/VERSION" |
| 38 } |
| 39 |
| 40 # iOS overrides PATCH level of the version with the value from the file |
| 41 # named by ios_version_path, however, this needs to be the last argument |
| 42 # to the version.py script, so it cannot be added to the source variable |
| 43 # and instead need to be managed manually. |
| 44 |
| 45 input += [ ios_version_path ] |
| 46 extra_args = [ |
| 47 "-f", |
| 48 rebase_path(ios_version_path, root_build_dir), |
| 49 ] |
| 50 } |
| 51 } |
OLD | NEW |