Roll src/third_party/WebKit 7d313db:88b90a6 (svn 202266:202267)
[chromium-blink-merge.git] / extensions / extensions.gyp
blob6e807d4333d7297d96c24b01eb5ccb84937ae31a
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'includes': [
7     'extensions.gypi',
8   ],
9   'variables': {
10     'chromium_code': 1,
11   },
12   'targets': [
13     {
14       # GN version: //extensions/common
15       'target_name': 'extensions_common_constants',
16       'type': 'static_library',
17       'include_dirs': [
18         '..',
19         '<(INTERMEDIATE_DIR)',
20       ],
21       'sources': [
22         '<@(extensions_common_constants_sources)',
23       ],
24       # Disable c4267 warnings until we fix size_t to int truncations.
25       'msvs_disabled_warnings': [ 4267, ],
26     },
27     {
28       # GN version: //extensions/common:mojo
29       'target_name': 'extensions_common_mojo',
30       # The type of this target must be none. This is so that resources can
31       # depend upon this target for generating the js bindings files. Any
32       # generated cpp files must be listed explicitly in extensions_common
33       'type': 'none',
34       'includes': [
35         '../third_party/mojo/mojom_bindings_generator.gypi',
36       ],
37       'sources': [
38         '<@(extensions_common_mojo_sources)',
39       ],
40     },
41     {
42       # GN version: //extensions/common
43       'target_name': 'extensions_common',
44       'type': 'static_library',
45       'dependencies': [
46         '../components/components.gyp:crx_file',
47         '../components/components.gyp:url_matcher',
48         '../content/content.gyp:content_common',
49         '../crypto/crypto.gyp:crypto',
50         '../device/bluetooth/bluetooth.gyp:device_bluetooth',
51         # For Mojo generated headers for generated_api.cc.
52         '../device/serial/serial.gyp:device_serial_mojo',
53         '../device/usb/usb.gyp:device_usb',
54         '../ipc/ipc.gyp:ipc',
55         '../net/net.gyp:net',
56         '../third_party/icu/icu.gyp:icuuc',
57         '../third_party/re2/re2.gyp:re2',
58         '../ui/base/ui_base.gyp:ui_base',
59         '../ui/gfx/gfx.gyp:gfx_geometry',
60         '../ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
61         '../url/url.gyp:url_lib',
62         '../third_party/libxml/libxml.gyp:libxml',
63         'common/api/api.gyp:extensions_api',
64         'extensions_resources.gyp:extensions_resources',
65         'extensions_strings.gyp:extensions_strings',
66         'extensions_common_constants',
67         'extensions_common_mojo',
68       ],
69       'include_dirs': [
70         '..',
71         '<(INTERMEDIATE_DIR)',
72       ],
73       'sources': [
74         '<@(extensions_common_sources)',
76         # Mojom generated files should not be included in the common gypi source
77         # list because GN has proper mojom dependency support.
78         '<(SHARED_INTERMEDIATE_DIR)/extensions/common/mojo/keep_alive.mojom.cc',
79         '<(SHARED_INTERMEDIATE_DIR)/extensions/common/mojo/keep_alive.mojom.h',
80         '<(SHARED_INTERMEDIATE_DIR)/extensions/common/mojo/stash.mojom.cc',
81         '<(SHARED_INTERMEDIATE_DIR)/extensions/common/mojo/stash.mojom.h',
82       ],
83       # Disable c4267 warnings until we fix size_t to int truncations.
84       'msvs_disabled_warnings': [ 4267, ],
85       'conditions': [
86         ['disable_nacl==0', {
87           # NaClModulesHandler does not use any code in NaCl, so no dependency
88           # on nacl_common.
89           'sources': [
90             '<@(extensions_common_sources_nacl)',
91           ],
92         }],
93         ['use_openssl==1', {
94           'sources': [
95             '<@(extensions_common_sources_openssl)',
96           ],
97           'dependencies': [
98             '../third_party/boringssl/boringssl.gyp:boringssl',
99           ],
100         }, {
101           'sources': [
102             '<@(extensions_common_sources_nonopenssl)'
103           ],
104           'conditions': [
105             ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
106               'dependencies': [
107                 '../build/linux/system.gyp:ssl',
108               ],
109             }],
110             ['OS == "mac" or OS == "ios" or OS == "win"', {
111               'dependencies': [
112                 '../third_party/nss/nss.gyp:nspr',
113                 '../third_party/nss/nss.gyp:nss',
114               ],
115             }],
116           ],
117         }],
118       ],
119     },
120     {
121       # GN version: //extensions/browser
122       'target_name': 'extensions_browser',
123       'type': 'static_library',
124       'dependencies': [
125         '../base/base.gyp:base',
126         '../base/base.gyp:base_i18n',
127         '../base/base.gyp:base_prefs',
128         '../components/components.gyp:browsing_data',
129         '../components/components.gyp:device_event_log_component',
130         '../components/components.gyp:guest_view_browser',
131         '../components/components.gyp:keyed_service_content',
132         '../components/components.gyp:keyed_service_core',
133         '../components/components.gyp:onc_component',
134         '../components/components.gyp:pref_registry',
135         '../components/components.gyp:sessions_content',
136         '../components/components.gyp:storage_monitor',
137         '../components/components.gyp:ui_zoom',
138         '../components/components.gyp:variations',
139         '../components/components.gyp:web_cache_browser',
140         '../components/components.gyp:web_modal',
141         '../content/content.gyp:content_browser',
142         '../device/bluetooth/bluetooth.gyp:device_bluetooth',
143         '../device/serial/serial.gyp:device_serial',
144         '../google_apis/google_apis.gyp:google_apis',
145         '../skia/skia.gyp:skia',
146         '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
147         '../third_party/re2/re2.gyp:re2',
148         'browser/api/api_registration.gyp:extensions_api_registration',
149         'common/api/api.gyp:cast_channel_proto',
150         'common/api/api.gyp:extensions_api',
151         'extensions_common',
152         'extensions_resources.gyp:extensions_resources',
153         'extensions_strings.gyp:extensions_strings',
154       ],
155       'include_dirs': [
156         '..',
157         '<(INTERMEDIATE_DIR)',
158         # Needed to access generated API headers.
159         '<(SHARED_INTERMEDIATE_DIR)',
160       ],
161       'sources': [
162         '<@(extensions_browser_sources)',
163       ],
164       'conditions': [
165         # This condition exists only because the extensions_common_constants
166         # target is always built and thus this file gets evaluated by GYP.
167         # This does not need to be replicated into extensions/browser/BUILD.gn.
168         ['OS == "ios" or OS == "android"', {
169           'dependencies!': [
170             '../components/components.gyp:storage_monitor',
171           ],
172         }],
173         ['chromeos == 1', {
174           'dependencies': [
175             '../chromeos/chromeos.gyp:chromeos',
176           ],
177           'sources': [
178             '<@(extensions_browser_sources_chromeos)',
179           ],
180         }, {  # chromeos==0
181           'sources': [
182             '<@(extensions_browser_sources_nonchromeos)',
183           ],
184         }],
185         ['OS == "win" or OS == "mac"', {
186           'dependencies': [
187             '../components/components.gyp:wifi_component',
188           ],
189           'sources': [
190             '<@(extensions_browser_sources_win_or_mac)',
191           ],
192         }],
193         ['OS == "linux" and chromeos == 0', {
194           'dependencies': [
195             '../build/linux/system.gyp:dbus',
196             '../dbus/dbus.gyp:dbus',
197           ],
198           'sources': [
199             '<@(extensions_browser_sources_linux_nonchromeos)',
200           ],
201         }],
202       ],
203       # Disable c4267 warnings until we fix size_t to int truncations.
204       'msvs_disabled_warnings': [ 4267, ],
205     },
206     {
207       # GN version: //extensions/renderer
208       'target_name': 'extensions_renderer',
209       'type': 'static_library',
210       'dependencies': [
211         'extensions_resources.gyp:extensions_resources',
212         '../components/components.gyp:guest_view_renderer',
213         '../content/content.gyp:content_resources',
214         '../gin/gin.gyp:gin',
215         '../third_party/WebKit/public/blink.gyp:blink',
216         '../third_party/mojo/mojo_public.gyp:mojo_js_bindings',
217       ],
218       'include_dirs': [
219         '..',
220       ],
221       'sources': [
222         '<@(extensions_renderer_sources)',
223       ],
224       # Disable c4267 warnings until we fix size_t to int truncations.
225       'msvs_disabled_warnings': [ 4267, ],
226     },
227     {
228       # GN version: //extensions/utility
229       'target_name': 'extensions_utility',
230       'type': 'static_library',
231       'dependencies': [
232         '../content/content.gyp:content_common',
233         '../content/content.gyp:content_utility',
234         '../skia/skia.gyp:skia',
235         '../third_party/zlib/google/zip.gyp:zip',
236         'extensions_common',
237         'extensions_strings.gyp:extensions_strings',
238       ],
239       'include_dirs': [
240         '..',
241       ],
242       'sources': [
243         '<@(extensions_utility_sources)',
244       ],
245     },
246     {
247       # GN version: //extensions:test_support
248       'target_name': 'extensions_test_support',
249       'type': 'static_library',
250       'dependencies': [
251         '../base/base.gyp:base',
252         '../base/base.gyp:base_prefs_test_support',
253         '../components/components.gyp:pref_registry_test_support',
254         '../components/components.gyp:user_prefs',
255         '../content/content.gyp:content_browser',
256         '../content/content.gyp:content_common',
257         '../content/content_shell_and_tests.gyp:test_support_content',
258         '../net/net.gyp:net_test_support',
259         '../testing/gtest.gyp:gtest',
260         'browser/api/api_registration.gyp:extensions_api_registration',
261         'common/api/api.gyp:cast_channel_proto',
262         'common/api/api.gyp:extensions_api',
263         'extensions_browser',
264         'extensions_common',
265         'extensions_resources.gyp:extensions_resources',
266       ],
267       'include_dirs': [
268         '..',
269         '<(SHARED_INTERMEDIATE_DIR)',
270       ],
271       'sources': [
272         '<@(extensions_test_support_sources)',
273       ],
274       # Disable c4267 warnings until we fix size_t to int truncations.
275       'msvs_disabled_warnings': [ 4267, ],
276       'conditions': [
277         [ 'cld_version==2', {
278             'dependencies': [
279               '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_static', ],
280         }],
281       ],
282     },
283     {
284       # The pak file generated by this target is intended to be shared by
285       # both shell and test targets. It was combined because it might help a
286       # little bit with build time by avoiding a repack step (one instead of
287       # two).
288       'target_name': 'extensions_shell_and_test_pak',
289       'type': 'none',
290       'dependencies': [
291         '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
292         '../content/content.gyp:content_resources',
293         '../content/content_shell_and_tests.gyp:content_shell_resources',
294         '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
295         '../ui/resources/ui_resources.gyp:ui_resources',
296         '../ui/strings/ui_strings.gyp:ui_strings',
297         'extensions_resources.gyp:extensions_resources',
298         'extensions_strings.gyp:extensions_strings',
299         'shell/app_shell_resources.gyp:app_shell_resources',
300       ],
301       'actions': [
302         {
303           'action_name': 'repack_extensions_shell_and_test_pak',
304           'variables': {
305             'pak_inputs': [
306               '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
307               '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
308               '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
309               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
310               '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
311               '<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_browser_resources_100_percent.pak',
312               '<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_renderer_resources.pak',
313               '<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
314               '<(SHARED_INTERMEDIATE_DIR)/extensions/shell/app_shell_resources.pak',
315               '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_en-US.pak',
316               '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
317               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
318               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
319               '<(SHARED_INTERMEDIATE_DIR)/blink/devtools_resources.pak',
320             ],
321             'pak_output': '<(PRODUCT_DIR)/extensions_shell_and_test.pak',
322           },
323           'includes': [ '../build/repack_action.gypi' ],
324         },
325       ],
326     },
327   ]