blob: d809c858d591a6b226cdd6d0a78b4070cdff2690 [file] [log] [blame]
[email protected]81f30ce2012-01-18 22:10:331# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]5629e0c2011-09-12 22:07:362# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
[email protected]85ff16042012-03-06 23:46:346 'variables': {
7 'content_shell_product_name': 'Content Shell',
8 },
[email protected]5629e0c2011-09-12 22:07:369 'targets': [
10 {
[email protected]c1f87b22011-10-05 21:59:3311 'target_name': 'content_shell_lib',
12 'type': 'static_library',
[email protected]03ff5e52011-09-30 00:28:1413 'defines!': ['CONTENT_IMPLEMENTATION'],
[email protected]9fbd3f862011-09-20 23:31:3414 'variables': {
15 'chromium_code': 1,
16 },
[email protected]5629e0c2011-09-12 22:07:3617 'dependencies': [
18 'content_app',
19 'content_browser',
20 'content_common',
21 'content_gpu',
22 'content_plugin',
23 'content_ppapi_plugin',
24 'content_renderer',
[email protected]ee75b8992012-01-27 07:53:5725 'content_shell_resources',
[email protected]5629e0c2011-09-12 22:07:3626 'content_utility',
27 'content_worker',
[email protected]0faa0a2b2011-11-15 18:03:1428 'content_resources.gyp:content_resources',
[email protected]aa6e79762011-09-29 20:53:5229 '../base/base.gyp:base',
30 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
31 '../build/temp_gyp/googleurl.gyp:googleurl',
32 '../ipc/ipc.gyp:ipc',
[email protected]433df472012-03-07 20:33:3933 '../media/media.gyp:media',
[email protected]aa6e79762011-09-29 20:53:5234 '../net/net.gyp:net',
[email protected]5629e0c2011-09-12 22:07:3635 '../skia/skia.gyp:skia',
[email protected]97efb8e2011-10-04 17:16:1636 '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
[email protected]5629e0c2011-09-12 22:07:3637 '../ui/ui.gyp:ui',
[email protected]12bc28fcb2011-09-21 15:53:5038 '../v8/tools/gyp/v8.gyp:v8',
[email protected]aa6e79762011-09-29 20:53:5239 '../webkit/support/webkit_support.gyp:appcache',
40 '../webkit/support/webkit_support.gyp:database',
41 '../webkit/support/webkit_support.gyp:fileapi',
42 '../webkit/support/webkit_support.gyp:glue',
43 '../webkit/support/webkit_support.gyp:quota',
[email protected]5629e0c2011-09-12 22:07:3644 ],
45 'include_dirs': [
46 '..',
47 ],
48 'sources': [
[email protected]74830f02012-01-30 22:27:0449 'shell/layout_test_controller_bindings.cc',
50 'shell/layout_test_controller_bindings.h',
[email protected]9fbd3f862011-09-20 23:31:3451 'shell/shell.cc',
52 'shell/shell.h',
53 'shell/shell_gtk.cc',
54 'shell/shell_mac.mm',
55 'shell/shell_win.cc',
[email protected]b0f146f2011-09-15 22:14:2556 'shell/shell_browser_context.cc',
57 'shell/shell_browser_context.h',
[email protected]5629e0c2011-09-12 22:07:3658 'shell/shell_browser_main.cc',
59 'shell/shell_browser_main.h',
60 'shell/shell_content_browser_client.cc',
61 'shell/shell_content_browser_client.h',
62 'shell/shell_content_client.cc',
63 'shell/shell_content_client.h',
64 'shell/shell_content_plugin_client.cc',
65 'shell/shell_content_plugin_client.h',
66 'shell/shell_content_renderer_client.cc',
67 'shell/shell_content_renderer_client.h',
68 'shell/shell_content_utility_client.cc',
69 'shell/shell_content_utility_client.h',
[email protected]ee75b8992012-01-27 07:53:5770 'shell/shell_devtools_delegate.cc',
71 'shell/shell_devtools_delegate.h',
[email protected]98d6f152011-09-29 19:35:5172 'shell/shell_download_manager_delegate.cc',
73 'shell/shell_download_manager_delegate.h',
[email protected]c1f87b22011-10-05 21:59:3374 'shell/shell_main_delegate.cc',
75 'shell/shell_main_delegate.h',
[email protected]efb5f572012-01-29 10:57:3376 'shell/shell_messages.cc',
77 'shell/shell_messages.h',
[email protected]74830f02012-01-30 22:27:0478 'shell/shell_render_process_observer.cc',
79 'shell/shell_render_process_observer.h',
[email protected]efb5f572012-01-29 10:57:3380 'shell/shell_render_view_host_observer.cc',
81 'shell/shell_render_view_host_observer.h',
[email protected]31d71b02012-01-26 03:42:3182 'shell/shell_render_view_observer.cc',
83 'shell/shell_render_view_observer.h',
[email protected]c5f1e332011-09-27 01:08:0384 'shell/shell_resource_context.cc',
85 'shell/shell_resource_context.h',
[email protected]efb5f572012-01-29 10:57:3386 'shell/shell_switches.cc',
87 'shell/shell_switches.h',
[email protected]c5f1e332011-09-27 01:08:0388 'shell/shell_url_request_context_getter.cc',
89 'shell/shell_url_request_context_getter.h',
[email protected]5629e0c2011-09-12 22:07:3690 ],
91 'msvs_settings': {
92 'VCLinkerTool': {
93 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
94 },
95 },
96 'conditions': [
97 ['OS=="win" and win_use_allocator_shim==1', {
98 'dependencies': [
99 '../base/allocator/allocator.gyp:allocator',
100 ],
101 }],
[email protected]9fbd3f862011-09-20 23:31:34102 ['OS=="win"', {
103 'resource_include_dirs': [
104 '<(SHARED_INTERMEDIATE_DIR)/webkit',
105 ],
[email protected]9fbd3f862011-09-20 23:31:34106 'dependencies': [
[email protected]9fbd3f862011-09-20 23:31:34107 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
108 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
109 ],
110 'configurations': {
111 'Debug_Base': {
112 'msvs_settings': {
113 'VCLinkerTool': {
114 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
115 },
116 },
117 },
118 },
[email protected]85ff16042012-03-06 23:46:34119 }], # OS=="win"
[email protected]5629e0c2011-09-12 22:07:36120 ],
121 },
[email protected]c1f87b22011-10-05 21:59:33122 {
[email protected]ee75b8992012-01-27 07:53:57123 'target_name': 'content_shell_resources',
124 'type': 'none',
[email protected]b581eb402012-03-09 01:31:46125 'dependencies': [
126 'generate_content_shell_resources',
127 ],
128 'variables': {
129 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
130 },
131 'includes': [ '../build/grit_target.gypi' ],
132 'copies': [
133 {
134 'destination': '<(PRODUCT_DIR)',
135 'files': [
136 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
137 ],
138 },
139 ],
140 }, {
141 'target_name': 'generate_content_shell_resources',
142 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57143 'variables': {
144 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content',
145 },
146 'actions': [
147 {
148 'action_name': 'content_shell_resources',
149 'variables': {
150 'grit_grd_file': 'shell/shell_resources.grd',
151 },
152 'includes': [ '../build/grit_action.gypi' ],
153 },
154 ],
[email protected]ee75b8992012-01-27 07:53:57155 },
156 {
[email protected]81f30ce2012-01-18 22:10:33157 # We build a minimal set of resources so WebKit in content_shell has
158 # access to necessary resources.
159 'target_name': 'content_shell_pak',
160 'type': 'none',
[email protected]ee75b8992012-01-27 07:53:57161 'dependencies': [
162 'browser/debugger/devtools_resources.gyp:devtools_resources',
163 'content_shell_resources',
[email protected]6c3e6492012-02-27 17:07:45164 '<(DEPTH)/net/net.gyp:net_resources',
165 '<(DEPTH)/ui/ui.gyp:ui_resources',
166 '<(DEPTH)/ui/ui.gyp:ui_resources_standard',
[email protected]ee75b8992012-01-27 07:53:57167 ],
[email protected]81f30ce2012-01-18 22:10:33168 'variables': {
169 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
170 },
171 'actions': [
172 {
173 'action_name': 'repack_content_shell_pack',
174 'variables': {
175 'pak_inputs': [
176 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
[email protected]ee75b8992012-01-27 07:53:57177 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33178 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
179 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.pak',
180 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak',
[email protected]ee75b8992012-01-27 07:53:57181 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
[email protected]81f30ce2012-01-18 22:10:33182 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
183 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
184 ],
185 'conditions': [
186 ['OS != "mac"', {
187 'pak_inputs': [
188 '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak',
189 ]
190 }],
191 ],
192 },
193 'inputs': [
194 '<(repack_path)',
195 '<@(pak_inputs)',
196 ],
197 'outputs': [
198 '<(PRODUCT_DIR)/content_shell.pak',
199 ],
200 'action': ['python', '<(repack_path)', '<@(_outputs)',
201 '<@(pak_inputs)'],
202 },
203 ],
204 },
205 {
[email protected]c1f87b22011-10-05 21:59:33206 'target_name': 'content_shell',
207 'type': 'executable',
[email protected]85ff16042012-03-06 23:46:34208 'mac_bundle': 1,
[email protected]c1f87b22011-10-05 21:59:33209 'defines!': ['CONTENT_IMPLEMENTATION'],
210 'variables': {
211 'chromium_code': 1,
212 },
213 'dependencies': [
214 'content_shell_lib',
[email protected]81f30ce2012-01-18 22:10:33215 'content_shell_pak',
[email protected]c1f87b22011-10-05 21:59:33216 ],
217 'include_dirs': [
218 '..',
219 ],
220 'sources': [
[email protected]27315ce42011-10-14 01:25:12221 'app/startup_helper_win.cc',
[email protected]c1f87b22011-10-05 21:59:33222 'shell/shell_main.cc',
223 ],
[email protected]85ff16042012-03-06 23:46:34224 'mac_bundle_resources': [
225 'shell/mac/app.icns',
226 'shell/mac/app-Info.plist',
227 ],
228 # TODO(mark): Come up with a fancier way to do this. It should only
229 # be necessary to list app-Info.plist once, not the three times it is
230 # listed here.
231 'mac_bundle_resources!': [
232 'shell/mac/app-Info.plist',
233 ],
234 'xcode_settings': {
235 'INFOPLIST_FILE': 'shell/mac/app-Info.plist',
236 },
[email protected]c1f87b22011-10-05 21:59:33237 'msvs_settings': {
238 'VCLinkerTool': {
239 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
240 },
241 },
242 'conditions': [
243 ['OS=="win" and win_use_allocator_shim==1', {
244 'dependencies': [
245 '../base/allocator/allocator.gyp:allocator',
246 ],
247 }],
248 ['OS=="win"', {
249 'configurations': {
250 'Debug_Base': {
251 'msvs_settings': {
252 'VCLinkerTool': {
253 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
254 },
255 },
256 },
257 },
[email protected]85ff16042012-03-06 23:46:34258 }], # OS=="win"
[email protected]27315ce42011-10-14 01:25:12259 ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
260 'dependencies': [
261 '../sandbox/sandbox.gyp:sandbox',
262 ],
[email protected]85ff16042012-03-06 23:46:34263 }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0)
[email protected]398990892012-01-20 03:25:58264 ['toolkit_uses_gtk == 1', {
265 'dependencies': [
266 '<(DEPTH)/build/linux/system.gyp:gtk',
267 ],
[email protected]85ff16042012-03-06 23:46:34268 }], # toolkit_uses_gtk
269 ['OS=="mac"', {
270 'product_name': '<(content_shell_product_name)',
271 'dependencies!': [
272 'content_shell_lib',
273 ],
274 'dependencies': [
275 'content_shell_framework',
276 ],
277 'postbuilds': [
278 {
279 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework',
280 'action': [
281 '../build/mac/copy_framework_unversioned.sh',
282 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework',
283 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
284 ],
285 },
286 {
287 'postbuild_name': 'Fix Framework Link',
288 'action': [
289 'install_name_tool',
290 '-change',
291 '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework',
292 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework',
293 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
294 ],
295 },
296 {
297 # Modify the Info.plist as needed.
298 'postbuild_name': 'Tweak Info.plist',
299 'action': ['../build/mac/tweak_info_plist.py',
[email protected]8fcde31f62012-03-07 06:25:17300 '--svn=1'],
[email protected]85ff16042012-03-06 23:46:34301 },
302 {
303 # Make sure there isn't any Objective-C in the shell's
304 # executable.
305 'postbuild_name': 'Verify No Objective-C',
306 'action': [
307 '../build/mac/verify_no_objc.sh',
308 ],
309 },
310 ],
311 }], # OS=="mac"
[email protected]c1f87b22011-10-05 21:59:33312 ],
313 },
[email protected]5629e0c2011-09-12 22:07:36314 ],
[email protected]85ff16042012-03-06 23:46:34315 'conditions': [
316 ['OS=="mac"', {
317 'targets': [
318 {
319 'target_name': 'content_shell_framework',
320 'type': 'shared_library',
321 'product_name': '<(content_shell_product_name) Framework',
322 'mac_bundle': 1,
323 'mac_bundle_resources': [
324 'shell/mac/English.lproj/MainMenu.xib',
325 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak'
326 ],
327 'dependencies': [
328 'content_shell_lib',
329 ],
330 'include_dirs': [
331 '..',
332 ],
333 'sources': [
334 'shell/shell_content_main.cc',
335 'shell/shell_content_main.h',
336 ],
337 },
338 ],
339 }], # OS=="mac"
340 ],
[email protected]5629e0c2011-09-12 22:07:36341}