OSDN Git Service

merge from open-source master
[android-x86/external-webkit.git] / WebKit / chromium / WebKit.gyp
1 #
2 # Copyright (C) 2009 Google Inc. All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met:
7 #
8 #         * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 #         * Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following disclaimer
12 # in the documentation and/or other materials provided with the
13 # distribution.
14 #         * Neither the name of Google Inc. nor the names of its
15 # contributors may be used to endorse or promote products derived from
16 # this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #
30
31 {
32     'includes': [
33         'features.gypi',
34     ],
35     'variables': {
36         'webkit_target_type': 'static_library',
37         'conditions': [
38             # Location of the chromium src directory and target type is different
39             # if webkit is built inside chromium or as standalone project.
40             ['inside_chromium_build==0', {
41                 # Webkit is being built outside of the full chromium project.
42                 # e.g. via build-webkit --chromium
43                 'chromium_src_dir': '../../WebKit/chromium',
44             },{
45                 # WebKit is checked out in src/chromium/third_party/WebKit
46                 'chromium_src_dir': '../../../..',
47             }],
48             # We can't turn on warnings on Windows and Linux until we upstream the
49             # WebKit API.
50             ['OS=="mac"', {
51                 'chromium_code': 1,
52             }],
53         ],
54     },
55     'targets': [
56         {
57             'target_name': 'webkit',
58             'type': '<(webkit_target_type)',
59             'msvs_guid': '5ECEC9E5-8F23-47B6-93E0-C3B328B3BE65',
60             'dependencies': [
61                 '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
62             ],
63             'include_dirs': [
64                 'public',
65                 'src',
66             ],
67             'defines': [
68                 'WEBKIT_IMPLEMENTATION',
69             ],
70             'sources': [
71                 'public/gtk/WebInputEventFactory.h',
72                 'public/linux/WebFontRendering.h',
73                 'public/linux/WebRenderTheme.h',
74                 'public/x11/WebScreenInfoFactory.h',
75                 'public/mac/WebInputEventFactory.h',
76                 'public/mac/WebScreenInfoFactory.h',
77                 'public/WebAccessibilityCache.h',
78                 'public/WebAccessibilityObject.h',
79                 'public/WebAccessibilityRole.h',
80                 'public/WebAnimationController.h',
81                 'public/WebApplicationCacheHost.h',
82                 'public/WebApplicationCacheHostClient.h',
83                 'public/WebBindings.h',
84                 'public/WebCache.h',
85                 'public/WebCanvas.h',
86                 'public/WebClipboard.h',
87                 'public/WebColor.h',
88                 'public/WebColorName.h',
89                 'public/WebCommon.h',
90                 'public/WebCommonWorkerClient.h',
91                 'public/WebCompositionCommand.h',
92                 'public/WebConsoleMessage.h',
93                 'public/WebContextMenuData.h',
94                 'public/WebCookie.h',
95                 'public/WebCrossOriginPreflightResultCache.h',
96                 'public/WebCString.h',
97                 'public/WebCursorInfo.h',
98                 'public/WebData.h',
99                 'public/WebDatabase.h',
100                 'public/WebDatabaseObserver.h',
101                 'public/WebDataSource.h',
102                 'public/WebDevToolsAgent.h',
103                 'public/WebDevToolsAgentClient.h',
104                 'public/WebDevToolsFrontend.h',
105                 'public/WebDevToolsFrontendClient.h',
106                 'public/WebDevToolsMessageData.h',
107                 'public/WebDocument.h',
108                 'public/WebDragData.h',
109                 'public/WebEditingAction.h',
110                 'public/WebElement.h',
111                 'public/WebEvent.h',
112                 'public/WebEventListener.h',
113                 'public/WebFileChooserCompletion.h',
114                 'public/WebFileChooserParams.h',
115                 'public/WebFileInfo.h',
116                 'public/WebFindOptions.h',
117                 'public/WebFrame.h',
118                 'public/WebFrameClient.h',
119                 'public/WebFontCache.h',
120                 'public/WebFormElement.h',
121                 'public/WebGlyphCache.h',
122                 'public/WebHistoryItem.h',
123                 'public/WebHTTPBody.h',
124                 'public/WebImage.h',
125                 'public/WebInputElement.h',
126                 'public/WebInputEvent.h',
127                 'public/WebKit.h',
128                 'public/WebKitClient.h',
129                 'public/WebLocalizedString.h',
130                 'public/WebMediaPlayer.h',
131                 'public/WebMediaPlayerAction.h',
132                 'public/WebMediaPlayerClient.h',
133                 'public/WebMenuItemInfo.h',
134                 'public/WebMessagePortChannel.h',
135                 'public/WebMessagePortChannelClient.h',
136                 'public/WebMimeRegistry.h',
137                 'public/WebMutationEvent.h',
138                 'public/WebNavigationType.h',
139                 'public/WebNode.h',
140                 'public/WebNodeCollection.h',
141                 'public/WebNodeList.h',
142                 'public/WebNonCopyable.h',
143                 'public/WebNotification.h',
144                 'public/WebNotificationPresenter.h',
145                 'public/WebNotificationPermissionCallback.h',
146                 'public/WebPageSerializer.h',
147                 'public/WebPageSerializerClient.h',
148                 'public/WebPasswordAutocompleteListener.h',
149                 'public/WebPasswordFormData.h',
150                 'public/WebPlugin.h',
151                 'public/WebPluginContainer.h',
152                 'public/WebPluginListBuilder.h',
153                 'public/WebPoint.h',
154                 'public/WebPopupMenu.h',
155                 'public/WebPopupMenuInfo.h',
156                 'public/WebRange.h',
157                 'public/WebRect.h',
158                 'public/WebRegularExpression.h',
159                 'public/WebRuntimeFeatures.h',
160                 'public/WebScreenInfo.h',
161                 'public/WebScriptController.h',
162                 'public/WebScriptSource.h',
163                 'public/WebSearchableFormData.h',
164                 'public/WebSecurityOrigin.h',
165                 'public/WebSecurityPolicy.h',
166                 'public/WebSettings.h',
167                 'public/WebSharedWorker.h',
168                 'public/WebSharedWorkerRepository.h',
169                 'public/WebSize.h',
170                 'public/WebSocketStreamError.h',
171                 'public/WebSocketStreamHandle.h',
172                 'public/WebSocketStreamHandleClient.h',
173                 'public/WebStorageArea.h',
174                 'public/WebStorageEventDispatcher.h',
175                 'public/WebStorageNamespace.h',
176                 'public/WebString.h',
177                 'public/WebTextAffinity.h',
178                 'public/WebTextCaseSensitivity.h',
179                 'public/WebTextDirection.h',
180                 'public/WebURL.h',
181                 'public/WebURLError.h',
182                 'public/WebURLLoader.h',
183                 'public/WebURLLoaderClient.h',
184                 'public/WebURLRequest.h',
185                 'public/WebURLResponse.h',
186                 'public/WebVector.h',
187                 'public/WebView.h',
188                 'public/WebViewClient.h',
189                 'public/WebWidget.h',
190                 'public/WebWidgetClient.h',
191                 'public/WebWorker.h',
192                 'public/WebWorkerClient.h',
193                 'public/win/WebInputEventFactory.h',
194                 'public/win/WebSandboxSupport.h',
195                 'public/win/WebScreenInfoFactory.h',
196                 'public/win/WebScreenInfoFactory.h',
197                 'src/APUAgentDelegate.h',
198                 'src/ApplicationCacheHost.cpp',
199                 'src/ApplicationCacheHostInternal.h',
200                 'src/AssertMatchingEnums.cpp',
201                 'src/AutocompletePopupMenuClient.cpp',
202                 'src/AutocompletePopupMenuClient.h',
203                 'src/AutoFillPopupMenuClient.cpp',
204                 'src/AutoFillPopupMenuClient.h',
205                 'src/BackForwardListClientImpl.cpp',
206                 'src/BackForwardListClientImpl.h',
207                 'src/BoundObject.cpp',
208                 'src/BoundObject.h',
209                 'src/ChromeClientImpl.cpp',
210                 'src/ChromeClientImpl.h',
211                 'src/ChromiumBridge.cpp',
212                 'src/ChromiumCurrentTime.cpp',
213                 'src/ChromiumThreading.cpp',
214                 'src/ContextMenuClientImpl.cpp',
215                 'src/ContextMenuClientImpl.h',
216                 'src/DatabaseObserver.cpp',
217                 'src/DebuggerAgent.h',
218                 'src/DebuggerAgentImpl.cpp',
219                 'src/DebuggerAgentImpl.h',
220                 'src/DebuggerAgentManager.cpp',
221                 'src/DebuggerAgentManager.h',
222                 'src/DevToolsRPC.h',
223                 'src/DevToolsRPCJS.h',
224                 'src/DOMUtilitiesPrivate.cpp',
225                 'src/DOMUtilitiesPrivate.h',
226                 'src/DragClientImpl.cpp',
227                 'src/DragClientImpl.h',
228                 'src/EditorClientImpl.cpp',
229                 'src/EditorClientImpl.h',
230                 'src/EventListenerWrapper.cpp',
231                 'src/EventListenerWrapper.h',
232                 'src/FrameLoaderClientImpl.cpp',
233                 'src/FrameLoaderClientImpl.h',
234                 'src/gtk/WebFontInfo.cpp',
235                 'src/gtk/WebFontInfo.h',
236                 'src/gtk/WebInputEventFactory.cpp',
237                 'src/InspectorClientImpl.cpp',
238                 'src/InspectorClientImpl.h',
239                 'src/linux/WebFontRendering.cpp',
240                 'src/linux/WebRenderTheme.cpp',
241                 'src/x11/WebScreenInfoFactory.cpp',
242                 'src/mac/WebInputEventFactory.mm',
243                 'src/mac/WebScreenInfoFactory.mm',
244                 'src/LocalizedStrings.cpp',
245                 'src/MediaPlayerPrivateChromium.cpp',
246                 'src/NotificationPresenterImpl.h',
247                 'src/NotificationPresenterImpl.cpp',
248                 'src/PlatformMessagePortChannel.cpp',
249                 'src/PlatformMessagePortChannel.h',
250                 'src/ProfilerAgent.h',
251                 'src/ProfilerAgentImpl.cpp',
252                 'src/ProfilerAgentImpl.h',
253                 'src/ResourceHandle.cpp',
254                 'src/SharedWorkerRepository.cpp',
255                 'src/SocketStreamHandle.cpp',
256                 'src/StorageAreaProxy.cpp',
257                 'src/StorageAreaProxy.h',
258                 'src/StorageEventDispatcherChromium.cpp',
259                 'src/StorageEventDispatcherImpl.cpp',
260                 'src/StorageEventDispatcherImpl.h',
261                 'src/StorageNamespaceProxy.cpp',
262                 'src/StorageNamespaceProxy.h',
263                 'src/SuggestionsPopupMenuClient.cpp',
264                 'src/SuggestionsPopupMenuClient.h',
265                 'src/TemporaryGlue.h',
266                 'src/ToolsAgent.h',
267                 'src/WebAccessibilityCache.cpp',
268                 'src/WebAccessibilityCacheImpl.cpp',
269                 'src/WebAccessibilityCacheImpl.h',
270                 'src/WebAccessibilityObject.cpp',
271                 'src/WebAnimationControllerImpl.cpp',
272                 'src/WebAnimationControllerImpl.h',
273                 'src/WebBindings.cpp',
274                 'src/WebCache.cpp',
275                 'src/WebColor.cpp',
276                 'src/WebCrossOriginPreflightResultCache.cpp',
277                 'src/WebCString.cpp',
278                 'src/WebCursorInfo.cpp',
279                 'src/WebData.cpp',
280                 'src/WebDatabase.cpp',
281                 'src/WebDataSourceImpl.cpp',
282                 'src/WebDataSourceImpl.h',
283                 'src/WebDevToolsAgentImpl.cpp',
284                 'src/WebDevToolsAgentImpl.h',
285                 'src/WebDevToolsFrontendImpl.cpp',
286                 'src/WebDevToolsFrontendImpl.h',
287                 'src/WebDocument.cpp',
288                 'src/WebDragData.cpp',
289                 'src/WebElement.cpp',
290                 'src/WebEntities.cpp',
291                 'src/WebEntities.h',
292                 'src/WebEvent.cpp',
293                 'src/WebEventListener.cpp',
294                 'src/WebEventListenerPrivate.cpp',
295                 'src/WebEventListenerPrivate.h',
296                 'src/WebFileChooserCompletionImpl.cpp',
297                 'src/WebFileChooserCompletionImpl.h',
298                 'src/WebFontCache.cpp',
299                 'src/WebFormElement.cpp',
300                 'src/WebFrameImpl.cpp',
301                 'src/WebFrameImpl.h',
302                 'src/WebGlyphCache.cpp',
303                 'src/WebHistoryItem.cpp',
304                 'src/WebHTTPBody.cpp',
305                 'src/WebImageCG.cpp',
306                 'src/WebImageSkia.cpp',
307                 'src/WebInputElement.cpp',
308                 'src/WebInputEvent.cpp',
309                 'src/WebInputEventConversion.cpp',
310                 'src/WebInputEventConversion.h',
311                 'src/WebKit.cpp',
312                 'src/WebMediaPlayerClientImpl.cpp',
313                 'src/WebMediaPlayerClientImpl.h',
314                 'src/WebMutationEvent.cpp',
315                 'src/WebNode.cpp',
316                 'src/WebNodeCollection.cpp',
317                 'src/WebNodeList.cpp',
318                 'src/WebNotification.cpp',
319                 'src/WebPageSerializer.cpp',
320                 'src/WebPageSerializerImpl.cpp',
321                 'src/WebPageSerializerImpl.h',
322                 'src/WebPasswordFormData.cpp',
323                 'src/WebPasswordFormUtils.cpp',
324                 'src/WebPasswordFormUtils.h',
325                 'src/WebPluginContainerImpl.h',
326                 'src/WebPluginContainerImpl.cpp',
327                 'src/WebPluginListBuilderImpl.cpp',
328                 'src/WebPluginListBuilderImpl.h',
329                 'src/WebPluginLoadObserver.cpp',
330                 'src/WebPluginLoadObserver.h',
331                 'src/WebPopupMenuImpl.cpp',
332                 'src/WebPopupMenuImpl.h',
333                 'src/WebRange.cpp',
334                 'src/WebRegularExpression.cpp',
335                 'src/WebRuntimeFeatures.cpp',
336                 'src/WebScriptController.cpp',
337                 'src/WebSearchableFormData.cpp',
338                 'src/WebSecurityOrigin.cpp',
339                 'src/WebSecurityPolicy.cpp',
340                 'src/WebSettingsImpl.cpp',
341                 'src/WebSettingsImpl.h',
342                 'src/WebSharedWorkerImpl.cpp',
343                 'src/WebSharedWorkerImpl.h',
344                 'src/WebStorageAreaImpl.cpp',
345                 'src/WebStorageAreaImpl.h',
346                 'src/WebStorageEventDispatcherImpl.cpp',
347                 'src/WebStorageEventDispatcherImpl.h',
348                 'src/WebStorageNamespaceImpl.cpp',
349                 'src/WebStorageNamespaceImpl.h',
350                 'src/WebString.cpp',
351                 'src/WebURL.cpp',
352                 'src/WebURLRequest.cpp',
353                 'src/WebURLRequestPrivate.h',
354                 'src/WebURLResponse.cpp',
355                 'src/WebURLResponsePrivate.h',
356                 'src/WebURLError.cpp',
357                 'src/WebViewImpl.cpp',
358                 'src/WebViewImpl.h',
359                 'src/WebWorkerBase.cpp',
360                 'src/WebWorkerBase.h',
361                 'src/WebWorkerClientImpl.cpp',
362                 'src/WebWorkerClientImpl.h',
363                 'src/WebWorkerImpl.cpp',
364                 'src/WebWorkerImpl.h',
365                 'src/WrappedResourceRequest.h',
366                 'src/WrappedResourceResponse.h',
367                 'src/win/WebInputEventFactory.cpp',
368                 'src/win/WebScreenInfoFactory.cpp',
369             ],
370             'conditions': [
371                 ['OS=="linux" or OS=="freebsd"', {
372                     'dependencies': [
373                         '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
374                         '<(chromium_src_dir)/build/linux/system.gyp:gtk',
375                         '<(chromium_src_dir)/build/linux/system.gyp:x11',
376                     ],
377                     'include_dirs': [
378                         'public/x11',
379                         'public/gtk',
380                         'public/linux',
381                     ],
382                 }, { # else: OS!="linux" and OS!="freebsd"
383                     'sources/': [
384                         ['exclude', '/gtk/'],
385                         ['exclude', '/x11/'],
386                         ['exclude', '/linux/'],
387                     ],
388                 }],
389                 ['OS=="mac"', {
390                     'include_dirs': [
391                         'public/mac',
392                     ],
393                     'sources/': [
394                         ['exclude', 'Skia\\.cpp$'],
395                     ],
396                 }, { # else: OS!="mac"
397                     'sources/': [
398                         ['exclude', '/mac/'],
399                         ['exclude', 'CG\\.cpp$'],
400                     ],
401                 }],
402                 ['OS=="win"', {
403                     'include_dirs': [
404                         'public/win',
405                     ],
406                 }, { # else: OS!="win"
407                     'sources/': [['exclude', '/win/']],
408                 }],
409                 ['"ENABLE_3D_CANVAS=1" in feature_defines', {
410                     # Conditionally compile in GLEW and our GraphicsContext3D implementation.
411                     'sources+': [
412                         'src/GraphicsContext3D.cpp',
413                         '<(chromium_src_dir)/third_party/glew/src/glew.c'
414                     ],
415                     'include_dirs+': [
416                         '<(chromium_src_dir)/third_party/glew/include'
417                     ],
418                     'defines+': [
419                         'GLEW_STATIC=1',
420                         'GLEW_NO_GLU=1',
421                     ],
422                     'conditions': [
423                         ['OS=="win"', {
424                             'link_settings': {
425                                 'libraries': [
426                                     '-lopengl32.lib',
427                                 ],
428                             },
429                         }],
430                         ['OS=="mac"', {
431                             'link_settings': {
432                                 'libraries': [
433                                     '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
434                                 ],
435                             },
436                         }],
437                     ],
438                 }],
439             ],
440         },
441         {
442             'target_name': 'webkit_unit_tests',
443             'type': 'executable',
444             'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
445             'dependencies': [
446                 'webkit',
447                 '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
448                 '<(chromium_src_dir)/testing/gtest.gyp:gtest',
449                 '<(chromium_src_dir)/base/base.gyp:base',
450                 '<(chromium_src_dir)/base/base.gyp:base_i18n',
451             ],
452             'include_dirs': [
453                 'public',
454                 'src',
455             ],
456             'sources': [
457                 'tests/KeyboardTest.cpp',
458                 'tests/KURLTest.cpp',
459                 'tests/RunAllTests.cpp',
460             ],
461             'conditions': [
462                 ['OS=="win"', {
463                     'sources': [
464                         'tests/TransparencyWinTest.cpp',
465                         'tests/UniscribeHelperTest.cpp',
466                     ],
467                 }],
468             ],
469         },
470     ], # targets
471 }
472
473 # Local Variables:
474 # tab-width:2
475 # indent-tabs-mode:nil
476 # End:
477 # vim: set expandtab tabstop=2 shiftwidth=2: