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