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 { | 5 { |
6 'variables': { | 6 'variables': { |
7 # Some plaform want to override part of the version number generation | 7 # Some plaform want to override part of the version number generation |
8 # (for example iOS uses a different value for PATCH level for canary). | 8 # (for example iOS uses a different value for PATCH level for canary). |
9 # This can be done settings "extra_version_path" variable to the path | 9 # This can be done settings "extra_version_path" variable to the path |
10 # of a file with the corresponding value overrides. If present it will | 10 # of a file with the corresponding value overrides. If present it will |
11 # be loaded after all other input files. | 11 # be loaded after all other input files. |
12 'extra_version_name': '', | 12 'extra_version_name': '', |
| 13 'conditions': [ |
| 14 ['branding == "Chrome"', { |
| 15 'use_unofficial_version_number%': 0, |
| 16 }, { |
| 17 'use_unofficial_version_number%': 1, |
| 18 }], |
| 19 ], |
13 }, | 20 }, |
14 'targets': [ | 21 'targets': [ |
15 { | 22 { |
16 # GN version: //components/version_info | 23 # GN version: //components/version_info |
17 'target_name': 'version_info', | 24 'target_name': 'version_info', |
18 'type': 'static_library', | 25 'type': 'static_library', |
19 'include_dirs': [ | 26 'include_dirs': [ |
20 '..', | 27 '..', |
21 ], | 28 ], |
22 'dependencies': [ | 29 'dependencies': [ |
23 '../base/base.gyp:base', | 30 '../base/base.gyp:base', |
24 '../ui/base/ui_base.gyp:ui_base', | |
25 'components_strings.gyp:components_strings', | 31 'components_strings.gyp:components_strings', |
26 'generate_version_info', | 32 'generate_version_info', |
27 ], | 33 ], |
28 'sources': [ | 34 'sources': [ |
29 'version_info/version_info.cc', | 35 'version_info/version_info.cc', |
30 'version_info/version_info.h', | 36 'version_info/version_info.h', |
31 ], | 37 ], |
| 38 'conditions': [ |
| 39 ['use_unofficial_version_number==1', { |
| 40 'dependencies': [ |
| 41 '../ui/base/ui_base.gyp:ui_base', |
| 42 ], |
| 43 'defines': ['USE_UNOFFICIAL_VERSION_NUMBER'], |
| 44 }], |
| 45 ], |
32 'export_dependent_settings': [ | 46 'export_dependent_settings': [ |
33 'generate_version_info', | 47 'generate_version_info', |
34 ], | 48 ], |
35 }, | 49 }, |
36 { | 50 { |
37 # GN version: //components/version_info:generate_version | 51 # GN version: //components/version_info:generate_version |
38 'target_name': 'generate_version_info', | 52 'target_name': 'generate_version_info', |
39 'type': 'none', | 53 'type': 'none', |
40 'direct_dependent_settings': { | 54 'direct_dependent_settings': { |
41 'include_dirs': [ | 55 'include_dirs': [ |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 'variables': { | 121 'variables': { |
108 # Path to the file used to override the version PATH level on iOS. | 122 # Path to the file used to override the version PATH level on iOS. |
109 # Default to ios/build/util/VERSION. | 123 # Default to ios/build/util/VERSION. |
110 'ios_extra_version_path%': '../ios/build/util/VERSION', | 124 'ios_extra_version_path%': '../ios/build/util/VERSION', |
111 }, | 125 }, |
112 'extra_version_name': '<(ios_extra_version_path)' | 126 'extra_version_name': '<(ios_extra_version_path)' |
113 }, | 127 }, |
114 }], | 128 }], |
115 ], | 129 ], |
116 } | 130 } |
OLD | NEW |