OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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("//tools/grit/grit_rule.gni") | 5 import("//tools/grit/grit_rule.gni") |
6 | 6 |
7 gypi_values = exec_script( | 7 gypi_values = exec_script("//build/gypi_to_gn.py", |
8 "//build/gypi_to_gn.py", | 8 [ rebase_path("../chrome_common.gypi") ], |
9 [ rebase_path("../chrome_common.gypi") ], | 9 "scope", |
10 "scope", | 10 [ "../chrome_common.gypi" ]) |
11 [ "../chrome_common.gypi" ]) | |
12 | 11 |
13 # GYP version: chrome/chrome_resources.gyp:chrome_resources | 12 # GYP version: chrome/chrome_resources.gyp:chrome_resources |
14 # (generate_common_resources action) | 13 # (generate_common_resources action) |
15 grit("resources") { | 14 grit("resources") { |
16 source = "common_resources.grd" | 15 source = "common_resources.grd" |
17 output_dir = "$root_gen_dir/chrome" | 16 output_dir = "$root_gen_dir/chrome" |
18 output_name = "common_resources" | 17 output_name = "common_resources" |
19 outputs = [ | 18 outputs = [ |
20 "grit/common_resources.h", | 19 "grit/common_resources.h", |
21 "common_resources.pak", | 20 "common_resources.pak", |
22 ] | 21 ] |
23 } | 22 } |
24 | 23 |
25 # GYP version: chrome/chrome_resources.gyp:chrome_resources | 24 # GYP version: chrome/chrome_resources.gyp:chrome_resources |
26 # (generate_extensions_api_resources action) | 25 # (generate_extensions_api_resources action) |
27 if (enable_extensions) { | 26 if (enable_extensions) { |
28 | 27 grit("extensions_api_resources") { |
29 grit("extensions_api_resources") { | 28 source = "extensions_api_resources.grd" |
30 source = "extensions_api_resources.grd" | 29 output_dir = "$root_gen_dir/chrome" |
31 output_dir = "$root_gen_dir/chrome" | 30 outputs = [ |
32 outputs = [ | 31 "grit/extensions_api_resources.h", |
33 "grit/extensions_api_resources.h", | 32 "extensions_api_resources.pak", |
34 "extensions_api_resources.pak", | 33 ] |
35 ] | 34 } |
36 } | |
37 | |
38 } | 35 } |
39 | 36 |
40 # GYP version: chrome/chrome_common.gyp:common | 37 # GYP version: chrome/chrome_common.gyp:common |
41 static_library("common") { | 38 static_library("common") { |
42 sources = rebase_path(gypi_values.chrome_common_sources, ".", "//chrome") | 39 sources = rebase_path(gypi_values.chrome_common_sources, ".", "//chrome") |
43 defines = [] | 40 defines = [] |
44 | 41 |
45 configs += [ "//build/config/compiler:wexit_time_destructors" ] | 42 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
46 | 43 |
47 deps = [ | 44 deps = [ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 "//components/password_manager/core/common", | 90 "//components/password_manager/core/common", |
94 "//components/signin/core/common", | 91 "//components/signin/core/common", |
95 "//components/translate/content/common", | 92 "//components/translate/content/common", |
96 "//ipc", | 93 "//ipc", |
97 "//third_party/re2", | 94 "//third_party/re2", |
98 "//third_party/widevine/cdm:version_h", | 95 "//third_party/widevine/cdm:version_h", |
99 ] | 96 ] |
100 } | 97 } |
101 | 98 |
102 if (enable_extensions) { | 99 if (enable_extensions) { |
103 sources += rebase_path( | 100 sources += rebase_path(gypi_values.chrome_common_extensions_sources, |
104 gypi_values.chrome_common_extensions_sources, | 101 ".", |
105 ".", "//chrome") | 102 "//chrome") |
106 deps += [ | 103 deps += [ |
107 "//device/usb", | 104 "//device/usb", |
108 "//chrome/common/extensions/api", | 105 "//chrome/common/extensions/api", |
109 "//extensions/common", | 106 "//extensions/common", |
110 "//extensions/common/api", | 107 "//extensions/common/api", |
111 "//extensions:extensions_resources", | 108 "//extensions:extensions_resources", |
112 "//extensions/strings", | 109 "//extensions/strings", |
113 ] | 110 ] |
114 } | 111 } |
115 | 112 |
116 if (is_win || is_mac) { | 113 if (is_win || is_mac) { |
117 sources += rebase_path( | 114 sources += |
118 gypi_values.chrome_common_win_mac_sources, | 115 rebase_path(gypi_values.chrome_common_win_mac_sources, ".", "//chrome") |
119 ".", "//chrome") | |
120 if (use_openssl) { | 116 if (use_openssl) { |
121 sources -= [ | 117 sources -= |
122 "extensions/api/networking_private/networking_private_crypto_nss.cc", | 118 [ "extensions/api/networking_private/networking_private_crypto_nss.cc"
] |
123 ] | 119 |
124 # networking_private_crypto_openssl.cc depends on boringssl. | 120 # networking_private_crypto_openssl.cc depends on boringssl. |
125 deps += [ | 121 deps += [ "//third_party/boringssl" ] |
126 "//third_party/boringssl", | |
127 ] | |
128 } else { | 122 } else { |
129 sources -= [ | 123 sources -= |
130 "extensions/api/networking_private/networking_private_crypto_openssl.cc"
, | 124 [ "extensions/api/networking_private/networking_private_crypto_openssl
.cc" ] |
131 ] | |
132 } | 125 } |
133 deps += [ "//breakpad:client" ] | 126 deps += [ "//breakpad:client" ] |
134 } | 127 } |
135 if (is_mac) { | 128 if (is_mac) { |
136 sources += rebase_path( | 129 sources += |
137 gypi_values.chrome_common_mac_sources, | 130 rebase_path(gypi_values.chrome_common_mac_sources, ".", "//chrome") |
138 ".", "//chrome") | |
139 } | 131 } |
140 | 132 |
141 if (enable_nacl) { | 133 if (enable_nacl) { |
142 deps += [ | 134 deps += [ |
143 #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP) | 135 #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP) |
144 ] | 136 ] |
145 } | 137 } |
146 | 138 |
147 # Printing. | 139 # Printing. |
148 if (!enable_basic_printing && !enable_print_preview) { | 140 if (!enable_basic_printing && !enable_print_preview) { |
149 sources -= [ | 141 sources -= [ |
150 "print_messages.cc", | 142 "print_messages.cc", |
151 "print_messages.h", | 143 "print_messages.h", |
152 ] | 144 ] |
153 } else { | 145 } else { |
154 deps += [ "//printing" ] | 146 deps += [ "//printing" ] |
155 if (enable_print_preview) { | 147 if (enable_print_preview) { |
156 # Full printing support. | 148 # Full printing support. |
157 sources += rebase_path( | 149 sources += rebase_path(gypi_values.chrome_common_service_process_sources, |
158 gypi_values.chrome_common_service_process_sources, | 150 ".", |
159 ".", "//chrome") | 151 "//chrome") |
160 } | 152 } |
161 } | 153 } |
162 | 154 |
163 if (enable_service_discovery) { | 155 if (enable_service_discovery) { |
164 sources += [ | 156 sources += [ |
165 "local_discovery/service_discovery_client.cc", | 157 "local_discovery/service_discovery_client.cc", |
166 "local_discovery/service_discovery_client.h", | 158 "local_discovery/service_discovery_client.h", |
167 ] | 159 ] |
168 } | 160 } |
169 if (enable_mdns) { | 161 if (enable_mdns) { |
170 sources += [ | 162 sources += [ |
171 "local_discovery/service_discovery_client_impl.cc", | 163 "local_discovery/service_discovery_client_impl.cc", |
172 "local_discovery/service_discovery_client_impl.h", | 164 "local_discovery/service_discovery_client_impl.h", |
173 ] | 165 ] |
174 } | 166 } |
175 | 167 |
176 if (is_android) { | 168 if (is_android) { |
177 sources -= [ | 169 sources -= [ |
178 "badge_util.cc", | 170 "badge_util.cc", |
179 "chrome_version_info_posix.cc", | 171 "chrome_version_info_posix.cc", |
180 "icon_with_badge_image_source.cc", | 172 "icon_with_badge_image_source.cc", |
181 "media_galleries/metadata_types.h", | 173 "media_galleries/metadata_types.h", |
182 "spellcheck_common.cc", | 174 "spellcheck_common.cc", |
183 ] | 175 ] |
184 } else { | 176 } else { |
185 # Non-Android. | 177 # Non-Android. |
186 sources += rebase_path( | 178 sources += |
187 gypi_values.chrome_common_importer_sources, | 179 rebase_path(gypi_values.chrome_common_importer_sources, ".", "//chrome") |
188 ".", "//chrome") | |
189 } | 180 } |
190 | 181 |
191 if (is_chromeos) { | 182 if (is_chromeos) { |
192 sources -= [ "chrome_version_info_posix.cc" ] | 183 sources -= [ "chrome_version_info_posix.cc" ] |
193 } | 184 } |
194 | 185 |
195 if (is_win) { | 186 if (is_win) { |
196 deps += [ "//third_party/wtl" ] | 187 deps += [ "//third_party/wtl" ] |
197 } | 188 } |
198 | 189 |
199 if (enable_mdns) { | 190 if (enable_mdns) { |
200 sources += [ "local_discovery/local_discovery_messages.h" ] | 191 sources += [ "local_discovery/local_discovery_messages.h" ] |
201 } | 192 } |
202 | 193 |
203 if (is_mac) { | 194 if (is_mac) { |
204 sources -= [ | 195 sources -= [ "chrome_version_info_posix.cc" ] |
205 "chrome_version_info_posix.cc", | |
206 ] | |
207 deps += [ | 196 deps += [ |
208 "//third_party/mach_override", | 197 "//third_party/mach_override", |
209 "//third_party/google_toolbox_for_mac", | 198 "//third_party/google_toolbox_for_mac", |
210 ] | 199 ] |
211 } | 200 } |
212 | 201 |
213 if (enable_remoting) { | 202 if (enable_remoting) { |
214 deps += [ "//remoting/client/plugin" ] | 203 deps += [ "//remoting/client/plugin" ] |
215 } | 204 } |
216 if (enable_plugins) { | 205 if (enable_plugins) { |
217 sources += [ | 206 sources += [ |
218 "pepper_flash.cc", | 207 "pepper_flash.cc", |
219 "pepper_flash.h", | 208 "pepper_flash.h", |
220 "pepper_permission_util.cc", | 209 "pepper_permission_util.cc", |
221 "pepper_permission_util.h", | 210 "pepper_permission_util.h", |
222 ] | 211 ] |
223 deps += [ | 212 deps += [ "//third_party/adobe/flash:flapper_version_h" ] |
224 "//third_party/adobe/flash:flapper_version_h", | |
225 ] | |
226 } | 213 } |
227 if (!enable_webrtc) { | 214 if (!enable_webrtc) { |
228 sources -= [ "media/webrtc_logging_messages.h" ] | 215 sources -= [ "media/webrtc_logging_messages.h" ] |
229 } | 216 } |
230 if (enable_configuration_policy) { | 217 if (enable_configuration_policy) { |
231 deps += [ "//components/policy" ] | 218 deps += [ "//components/policy" ] |
232 } | 219 } |
233 | 220 |
234 if (safe_browsing_mode == 1) { | 221 if (safe_browsing_mode == 1) { |
235 defines += [ "FULL_SAFE_BROWSING" ] | 222 defines += [ "FULL_SAFE_BROWSING" ] |
236 sources += rebase_path( | 223 sources += rebase_path(gypi_values.chrome_common_full_safe_browsing_sources, |
237 gypi_values.chrome_common_full_safe_browsing_sources, | 224 ".", |
238 ".", "//chrome") | 225 "//chrome") |
239 } | 226 } |
240 if (safe_browsing_mode == 2) { | 227 if (safe_browsing_mode == 2) { |
241 defines += [ "MOBILE_SAFE_BROWSING" ] | 228 defines += [ "MOBILE_SAFE_BROWSING" ] |
242 } | 229 } |
243 } | 230 } |
244 | 231 |
245 import("//chrome/version.gni") | 232 import("//chrome/version.gni") |
246 process_version("version") { | 233 process_version("version") { |
247 visibility = [ ":common" ] | 234 visibility = [ ":common" ] |
248 source = "chrome_version_info_values.h.version" | 235 source = "chrome_version_info_values.h.version" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 deps += [ | 275 deps += [ |
289 #'../components/nacl.gyp:nacl_switches', TODO(GYP) | 276 #'../components/nacl.gyp:nacl_switches', TODO(GYP) |
290 ] | 277 ] |
291 } | 278 } |
292 } | 279 } |
293 | 280 |
294 source_set("test_support") { | 281 source_set("test_support") { |
295 testonly = true | 282 testonly = true |
296 visibility = [ "//chrome/test:test_support" ] | 283 visibility = [ "//chrome/test:test_support" ] |
297 | 284 |
298 sources = [ | 285 sources = [] |
299 ] | |
300 | 286 |
301 deps = [ | 287 deps = [ |
302 ":common", | 288 ":common", |
303 "//base", | 289 "//base", |
304 "//testing/gtest", | 290 "//testing/gtest", |
305 ] | 291 ] |
306 | 292 |
307 if (is_win || is_mac) { | 293 if (is_win || is_mac) { |
308 sources += [ | 294 sources += [ |
309 "media_galleries/picasa_test_util.cc", | 295 "media_galleries/picasa_test_util.cc", |
310 "media_galleries/picasa_test_util.h", | 296 "media_galleries/picasa_test_util.h", |
311 "media_galleries/pmp_test_util.cc", | 297 "media_galleries/pmp_test_util.cc", |
312 "media_galleries/pmp_test_util.h", | 298 "media_galleries/pmp_test_util.h", |
313 ] | 299 ] |
314 } | 300 } |
315 | 301 |
316 if (enable_extensions) { | 302 if (enable_extensions) { |
317 sources += [ | 303 sources += [ |
318 "extensions/extension_test_util.cc", | 304 "extensions/extension_test_util.cc", |
319 "extensions/extension_test_util.h", | 305 "extensions/extension_test_util.h", |
320 ] | 306 ] |
321 } | 307 } |
322 | |
323 } | 308 } |
OLD | NEW |