OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 'chromium_code': 1, | 7 'chromium_code': 1, |
8 }, | 8 'common_constants_sources': [ |
9 | |
10 'includes': [ | |
11 '../build/util/version.gypi', | |
12 ], | |
13 | |
14 'target_defaults': { | |
15 'sources': [ | |
16 'common/chrome_constants.cc', | 9 'common/chrome_constants.cc', |
17 'common/chrome_constants.h', | 10 'common/chrome_constants.h', |
18 'common/chrome_icon_resources_win.cc', | 11 'common/chrome_icon_resources_win.cc', |
19 'common/chrome_icon_resources_win.h', | 12 'common/chrome_icon_resources_win.h', |
20 'common/chrome_paths.cc', | 13 'common/chrome_paths.cc', |
21 'common/chrome_paths.h', | 14 'common/chrome_paths.h', |
22 'common/chrome_paths_android.cc', | 15 'common/chrome_paths_android.cc', |
23 'common/chrome_paths_internal.h', | 16 'common/chrome_paths_internal.h', |
24 'common/chrome_paths_linux.cc', | 17 'common/chrome_paths_linux.cc', |
25 'common/chrome_paths_mac.mm', | 18 'common/chrome_paths_mac.mm', |
26 'common/chrome_paths_win.cc', | 19 'common/chrome_paths_win.cc', |
27 'common/chrome_switches.cc', | 20 'common/chrome_switches.cc', |
28 'common/chrome_switches.h', | 21 'common/chrome_switches.h', |
29 'common/env_vars.cc', | 22 'common/env_vars.cc', |
30 'common/env_vars.h', | 23 'common/env_vars.h', |
31 'common/pref_font_script_names-inl.h', | 24 'common/pref_font_script_names-inl.h', |
32 'common/pref_font_webkit_names.h', | 25 'common/pref_font_webkit_names.h', |
33 'common/pref_names.cc', | 26 'common/pref_names.cc', |
34 'common/pref_names.h', | 27 'common/pref_names.h', |
35 ], | 28 ], |
36 'actions': [ | 29 }, |
37 { | 30 |
38 'action_name': 'Make chrome_version.cc', | 31 'includes': [ |
39 'variables': { | 32 '../build/util/version.gypi', |
40 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE', | 33 ], |
41 'template_input_path': 'common/chrome_version.cc.version', | 34 |
| 35 'targets': [ |
| 36 { |
| 37 # GN version: //chrome/common:version_header |
| 38 'target_name': 'version_header', |
| 39 'type': 'none', |
| 40 'hard_dependency': 1, |
| 41 'actions': [ |
| 42 { |
| 43 'action_name': 'version_header', |
| 44 'variables': { |
| 45 'lastchange_path': |
| 46 '<(DEPTH)/build/util/LASTCHANGE', |
| 47 'branding_path': 'app/theme/<(branding_path_component)/BRANDING', |
| 48 }, |
| 49 'inputs': [ |
| 50 '<(version_path)', |
| 51 '<(branding_path)', |
| 52 '<(lastchange_path)', |
| 53 'common/chrome_version.h.in', |
| 54 ], |
| 55 'outputs': [ |
| 56 '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version.h', |
| 57 ], |
| 58 'action': [ |
| 59 'python', |
| 60 '<(version_py_path)', |
| 61 '-f', '<(version_path)', |
| 62 '-f', '<(branding_path)', |
| 63 '-f', '<(lastchange_path)', |
| 64 'common/chrome_version.h.in', |
| 65 '<@(_outputs)', |
| 66 ], |
| 67 'message': 'Generating version header file: <@(_outputs)', |
42 }, | 68 }, |
43 'inputs': [ | 69 ], |
44 '<(version_py_path)', | 70 }, |
45 '<(version_path)', | |
46 '<(lastchange_path)', | |
47 '<(template_input_path)', | |
48 ], | |
49 'outputs': [ | |
50 '<(INTERMEDIATE_DIR)/chrome_version.cc', | |
51 ], | |
52 'action': [ | |
53 'python', | |
54 '<(version_py_path)', | |
55 '-f', '<(version_path)', | |
56 '-f', '<(lastchange_path)', | |
57 '<(template_input_path)', | |
58 '<@(_outputs)', | |
59 ], | |
60 'process_outputs_as_sources': 1, | |
61 }, | |
62 ], | |
63 }, | |
64 'targets': [ | |
65 { | 71 { |
66 # GN version: //chrome/common:constants | 72 # GN version: //chrome/common:constants |
67 'target_name': 'common_constants', | 73 'target_name': 'common_constants', |
68 'type': 'static_library', | 74 'type': 'static_library', |
| 75 'sources': [ |
| 76 '<@(common_constants_sources)' |
| 77 ], |
69 'include_dirs': [ | 78 'include_dirs': [ |
70 '<(SHARED_INTERMEDIATE_DIR)', # Needed by chrome_paths.cc. | 79 '<(SHARED_INTERMEDIATE_DIR)', # Needed by chrome_paths.cc. |
71 ], | 80 ], |
72 'dependencies': [ | 81 'dependencies': [ |
| 82 'version_header', |
73 '../base/base.gyp:base', | 83 '../base/base.gyp:base', |
74 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', | 84 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', |
75 '../components/components.gyp:bookmarks_common', | 85 '../components/components.gyp:bookmarks_common', |
76 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', | 86 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', |
77 ], | 87 ], |
78 'target_conditions': [ | 88 'target_conditions': [ |
79 ['OS=="ios"', { | 89 ['OS=="ios"', { |
80 # iOS needs chrome_paths_mac, which is excluded by filename rules; | 90 # iOS needs chrome_paths_mac, which is excluded by filename rules; |
81 # re-add it in target_conditionals so it's after that exclusion. | 91 # re-add it in target_conditionals so it's after that exclusion. |
82 'sources/': [ | 92 'sources/': [ |
83 ['include', '^common/chrome_paths_mac\\.mm$'], | 93 ['include', '^common/chrome_paths_mac\\.mm$'], |
84 ], | 94 ], |
85 }], | 95 }], |
86 ], | 96 ], |
87 'conditions': [ | 97 'conditions': [ |
88 ['disable_nacl==0', { | 98 ['disable_nacl==0', { |
89 'dependencies': [ | 99 'dependencies': [ |
90 '../components/nacl.gyp:nacl_switches', | 100 '../components/nacl.gyp:nacl_switches', |
91 ], | 101 ], |
92 }], | 102 }], |
93 ], | 103 ], |
94 }, | 104 }, |
95 ], | 105 ], |
96 'conditions': [ | 106 'conditions': [ |
97 ['OS=="win" and target_arch=="ia32"', { | 107 ['OS=="win" and target_arch=="ia32"', { |
98 'targets': [ | 108 'targets': [ |
99 { | 109 { |
100 'target_name': 'common_constants_win64', | 110 'target_name': 'common_constants_win64', |
101 'type': 'static_library', | 111 'type': 'static_library', |
| 112 'sources': [ |
| 113 '<@(common_constants_sources)' |
| 114 ], |
102 'include_dirs': [ | 115 'include_dirs': [ |
103 '<(SHARED_INTERMEDIATE_DIR)', # Needed by chrome_paths.cc. | 116 '<(SHARED_INTERMEDIATE_DIR)', # Needed by chrome_paths.cc. |
104 ], | 117 ], |
105 'dependencies': [ | 118 'dependencies': [ |
| 119 'version_header', |
106 '../base/base.gyp:base_win64', | 120 '../base/base.gyp:base_win64', |
107 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dyn
amic_annotations_win64', | 121 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dyn
amic_annotations_win64', |
108 '../components/nacl.gyp:nacl_switches_win64', | 122 '../components/nacl.gyp:nacl_switches_win64', |
109 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h
', | 123 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h
', |
110 ], | 124 ], |
111 'defines': [ | 125 'defines': [ |
112 '<@(nacl_win64_defines)', | 126 '<@(nacl_win64_defines)', |
113 'COMPILE_CONTENT_STATICALLY', | 127 'COMPILE_CONTENT_STATICALLY', |
114 ], | 128 ], |
115 'configurations': { | 129 'configurations': { |
116 'Common_Base': { | 130 'Common_Base': { |
117 'msvs_target_platform': 'x64', | 131 'msvs_target_platform': 'x64', |
118 }, | 132 }, |
119 }, | 133 }, |
120 }, | 134 }, |
121 ], | 135 ], |
122 }], | 136 }], |
123 ], | 137 ], |
124 } | 138 } |
OLD | NEW |