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("//build/util/process_version.gni") | 6 import("//build/util/process_version.gni") |
7 import("//chrome/process_version_rc_template.gni") # For branding_file_path. | 7 import("//chrome/process_version_rc_template.gni") # For branding_file_path. |
8 | 8 |
9 declare_args() { | 9 declare_args() { |
10 use_unofficial_version_number = !is_chrome_branded | 10 use_unofficial_version_number = !is_chrome_branded |
11 } | 11 } |
12 | 12 |
13 static_library("version_info") { | 13 static_library("version_info") { |
14 sources = [ | 14 sources = [ |
15 "version_info.cc", | 15 "version_info.cc", |
16 "version_info.h", | 16 "version_info.h", |
17 ] | 17 ] |
18 | 18 |
19 deps = [ | 19 deps = [ |
20 ":generate_version_info", | 20 ":generate_version_info", |
21 "//base", | 21 "//base", |
22 "//components/strings", | |
23 ] | 22 ] |
24 | 23 |
25 public_deps = [ | 24 public_deps = [ |
26 ":channel", | 25 ":channel", |
27 ] | 26 ] |
| 27 } |
| 28 |
| 29 # Isolate the //ui/base dependency in this target. |
| 30 static_library("version_string") { |
| 31 sources = [ |
| 32 "version_string.cc", |
| 33 "version_string.h", |
| 34 ] |
| 35 |
| 36 deps = [ |
| 37 ":version_info", |
| 38 "//components/strings", |
| 39 ] |
28 | 40 |
29 if (use_unofficial_version_number) { | 41 if (use_unofficial_version_number) { |
30 defines = [ "USE_UNOFFICIAL_VERSION_NUMBER" ] | 42 defines = [ "USE_UNOFFICIAL_VERSION_NUMBER" ] |
31 deps += [ "//ui/base" ] | 43 deps += [ "//ui/base" ] |
32 } | 44 } |
33 } | 45 } |
34 | 46 |
35 source_set("channel") { | 47 source_set("channel") { |
36 sources = [ | 48 sources = [ |
37 "channel.h", | 49 "channel.h", |
| 50 "channel_android.cc", |
| 51 "channel_android.h", |
38 ] | 52 ] |
39 } | 53 } |
40 | 54 |
41 process_version("generate_version_info") { | 55 process_version("generate_version_info") { |
42 template_file = "version_info_values.h.version" | 56 template_file = "version_info_values.h.version" |
43 sources = [ | 57 sources = [ |
44 "//build/util/LASTCHANGE", | 58 "//build/util/LASTCHANGE", |
45 "//chrome/VERSION", | 59 "//chrome/VERSION", |
46 branding_file_path, | 60 branding_file_path, |
47 ] | 61 ] |
48 output = "$target_gen_dir/version_info_values.h" | 62 output = "$target_gen_dir/version_info_values.h" |
49 } | 63 } |
OLD | NEW |