2010-04-29 James Robinson <jamesr@chromium.org>
[WebKit-https.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                 '<(chromium_src_dir)/skia/skia.gyp:skia',
63                 '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
64             ],
65             'export_dependent_settings': [
66                 '<(chromium_src_dir)/skia/skia.gyp:skia',
67                 '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
68             ],
69             'include_dirs': [
70                 'public',
71                 'src',
72             ],
73             'defines': [
74                 'WEBKIT_IMPLEMENTATION',
75             ],
76             'sources': [
77                 'public/gtk/WebInputEventFactory.h',
78                 'public/linux/WebFontRendering.h',
79                 'public/linux/WebFontRenderStyle.h',
80                 'public/linux/WebRenderTheme.h',
81                 'public/x11/WebScreenInfoFactory.h',
82                 'public/mac/WebInputEventFactory.h',
83                 'public/mac/WebScreenInfoFactory.h',
84                 'public/WebAccessibilityCache.h',
85                 'public/WebAccessibilityObject.h',
86                 'public/WebAccessibilityRole.h',
87                 'public/WebAnimationController.h',
88                 'public/WebApplicationCacheHost.h',
89                 'public/WebApplicationCacheHostClient.h',
90                 'public/WebBindings.h',
91                 'public/WebCache.h',
92                 'public/WebCanvas.h',
93                 'public/WebClipboard.h',
94                 'public/WebColor.h',
95                 'public/WebColorName.h',
96                 'public/WebCommon.h',
97                 'public/WebCommonWorkerClient.h',
98                 'public/WebCompositionCommand.h',
99                 'public/WebConsoleMessage.h',
100                 'public/WebContextMenuData.h',
101                 'public/WebCookie.h',
102                 'public/WebCookieJar.h',
103                 'public/WebCrossOriginPreflightResultCache.h',
104                 'public/WebCString.h',
105                 'public/WebCursorInfo.h',
106                 'public/WebData.h',
107                 'public/WebDatabase.h',
108                 'public/WebDatabaseObserver.h',
109                 'public/WebDataSource.h',
110                 'public/WebDevToolsAgent.h',
111                 'public/WebDevToolsAgentClient.h',
112                 'public/WebDevToolsFrontend.h',
113                 'public/WebDevToolsFrontendClient.h',
114                 'public/WebDevToolsMessageData.h',
115                 'public/WebDocument.h',
116                 'public/WebDragData.h',
117                 'public/WebEditingAction.h',
118                 'public/WebElement.h',
119                 'public/WebEvent.h',
120                 'public/WebEventListener.h',
121                 'public/WebFileChooserCompletion.h',
122                 'public/WebFileChooserParams.h',
123                 'public/WebFileInfo.h',
124                 'public/WebFileSystem.h',
125                 'public/WebFindOptions.h',
126                 'public/WebFrame.h',
127                 'public/WebFrameClient.h',
128                 'public/WebFontCache.h',
129                 'public/WebFormControlElement.h',
130                 'public/WebFormElement.h',
131                 'public/WebGeolocationService.h',
132                 'public/WebGeolocationServiceBridge.h',
133                 'public/WebGlyphCache.h',
134                 'public/WebGLES2Context.h',
135                 'public/WebGraphicsContext3D.h',
136                 'public/WebHistoryItem.h',
137                 'public/WebHTTPBody.h',
138                 'public/WebImage.h',
139                 'public/WebImageDecoder.h',
140                 'public/WebIDBCallbacks.h',
141                 'public/WebIDBDatabase.h',
142                 'public/WebIDBDatabaseError.h',
143                 'public/WebIndexedDatabase.h',
144                 'public/WebInputElement.h',
145                 'public/WebInputEvent.h',
146                 'public/WebKit.h',
147                 'public/WebKitClient.h',
148                 'public/WebLabelElement.h',
149                 'public/WebLocalizedString.h',
150                 'public/WebMediaPlayer.h',
151                 'public/WebMediaPlayerAction.h',
152                 'public/WebMediaPlayerClient.h',
153                 'public/WebMenuItemInfo.h',
154                 'public/WebMessagePortChannel.h',
155                 'public/WebMessagePortChannelClient.h',
156                 'public/WebMimeRegistry.h',
157                 'public/WebMutationEvent.h',
158                 'public/WebNavigationType.h',
159                 'public/WebNode.h',
160                 'public/WebNodeCollection.h',
161                 'public/WebNodeList.h',
162                 'public/WebNonCopyable.h',
163                 'public/WebNotification.h',
164                 'public/WebNotificationPresenter.h',
165                 'public/WebNotificationPermissionCallback.h',
166                 'public/WebPageSerializer.h',
167                 'public/WebPageSerializerClient.h',
168                 'public/WebPasswordAutocompleteListener.h',
169                 'public/WebPasswordFormData.h',
170                 'public/WebPlugin.h',
171                 'public/WebPluginContainer.h',
172                 'public/WebPluginDocument.h',
173                 'public/WebPluginListBuilder.h',
174                 'public/WebPoint.h',
175                 'public/WebPopupMenu.h',
176                 'public/WebPopupMenuInfo.h',
177                 'public/WebPopupType.h',
178                 'public/WebPrivatePtr.h',
179                 'public/WebRange.h',
180                 'public/WebRect.h',
181                 'public/WebRegularExpression.h',
182                 'public/WebRuntimeFeatures.h',
183                 'public/WebScreenInfo.h',
184                 'public/WebScriptController.h',
185                 'public/WebScriptSource.h',
186                 'public/WebSearchableFormData.h',
187                 'public/WebSecurityOrigin.h',
188                 'public/WebSecurityPolicy.h',
189                 'public/WebSelectElement.h',
190                 'public/WebSerializedScriptValue.h',
191                 'public/WebSettings.h',
192                 'public/WebSharedWorker.h',
193                 'public/WebSharedWorkerRepository.h',
194                 'public/WebSize.h',
195                 'public/WebSocketStreamError.h',
196                 'public/WebSocketStreamHandle.h',
197                 'public/WebSocketStreamHandleClient.h',
198                 'public/WebStorageArea.h',
199                 'public/WebStorageEventDispatcher.h',
200                 'public/WebStorageNamespace.h',
201                 'public/WebString.h',
202                 'public/WebTextAffinity.h',
203                 'public/WebTextCaseSensitivity.h',
204                 'public/WebTextDirection.h',
205                 'public/WebThemeEngine.h',
206                 'public/WebURL.h',
207                 'public/WebURLError.h',
208                 'public/WebURLLoader.h',
209                 'public/WebURLLoaderClient.h',
210                 'public/WebURLRequest.h',
211                 'public/WebURLResponse.h',
212                 'public/WebVector.h',
213                 'public/WebView.h',
214                 'public/WebViewClient.h',
215                 'public/WebWidget.h',
216                 'public/WebWidgetClient.h',
217                 'public/WebWorker.h',
218                 'public/WebWorkerClient.h',
219                 'public/win/WebInputEventFactory.h',
220                 'public/win/WebSandboxSupport.h',
221                 'public/win/WebScreenInfoFactory.h',
222                 'public/win/WebScreenInfoFactory.h',
223                 'src/APUAgentDelegate.h',
224                 'src/ApplicationCacheHost.cpp',
225                 'src/ApplicationCacheHostInternal.h',
226                 'src/AssertMatchingEnums.cpp',
227                 'src/AutocompletePopupMenuClient.cpp',
228                 'src/AutocompletePopupMenuClient.h',
229                 'src/AutoFillPopupMenuClient.cpp',
230                 'src/AutoFillPopupMenuClient.h',
231                 'src/BackForwardListClientImpl.cpp',
232                 'src/BackForwardListClientImpl.h',
233                 'src/BoundObject.cpp',
234                 'src/BoundObject.h',
235                 'src/ChromeClientImpl.cpp',
236                 'src/ChromeClientImpl.h',
237                 'src/ChromiumBridge.cpp',
238                 'src/ChromiumCurrentTime.cpp',
239                 'src/ChromiumThreading.cpp',
240                 'src/ContextMenuClientImpl.cpp',
241                 'src/ContextMenuClientImpl.h',
242                 'src/DatabaseObserver.cpp',
243                 'src/DebuggerAgent.h',
244                 'src/DebuggerAgentImpl.cpp',
245                 'src/DebuggerAgentImpl.h',
246                 'src/DebuggerAgentManager.cpp',
247                 'src/DebuggerAgentManager.h',
248                 'src/DevToolsRPC.h',
249                 'src/DevToolsRPCJS.h',
250                 'src/DOMUtilitiesPrivate.cpp',
251                 'src/DOMUtilitiesPrivate.h',
252                 'src/DragClientImpl.cpp',
253                 'src/DragClientImpl.h',
254                 'src/EditorClientImpl.cpp',
255                 'src/EditorClientImpl.h',
256                 'src/EventListenerWrapper.cpp',
257                 'src/EventListenerWrapper.h',
258                 'src/FrameLoaderClientImpl.cpp',
259                 'src/FrameLoaderClientImpl.h',
260                 'src/GLES2Context.cpp',
261                 'src/gtk/WebFontInfo.cpp',
262                 'src/gtk/WebFontInfo.h',
263                 'src/gtk/WebInputEventFactory.cpp',
264                 'src/IDBCallbacksProxy.h',
265                 'src/IDBDatabaseProxy.cpp',
266                 'src/IDBDatabaseProxy.h',
267                 'src/IndexedDatabaseProxy.cpp',
268                 'src/IndexedDatabaseProxy.h',
269                 'src/InspectorClientImpl.cpp',
270                 'src/InspectorClientImpl.h',
271                 'src/InspectorFrontendClientImpl.cpp',
272                 'src/InspectorFrontendClientImpl.h',
273                 'src/linux/WebFontRendering.cpp',
274                 'src/linux/WebFontRenderStyle.cpp',
275                 'src/linux/WebRenderTheme.cpp',
276                 'src/x11/WebScreenInfoFactory.cpp',
277                 'src/mac/WebInputEventFactory.mm',
278                 'src/mac/WebScreenInfoFactory.mm',
279                 'src/LocalizedStrings.cpp',
280                 'src/MediaPlayerPrivateChromium.cpp',
281                 'src/NotificationPresenterImpl.h',
282                 'src/NotificationPresenterImpl.cpp',
283                 'src/PlatformMessagePortChannel.cpp',
284                 'src/PlatformMessagePortChannel.h',
285                 'src/ProfilerAgent.h',
286                 'src/ProfilerAgentImpl.cpp',
287                 'src/ProfilerAgentImpl.h',
288                 'src/ResourceHandle.cpp',
289                 'src/SharedWorkerRepository.cpp',
290                 'src/SocketStreamHandle.cpp',
291                 'src/StorageAreaProxy.cpp',
292                 'src/StorageAreaProxy.h',
293                 'src/StorageEventDispatcherChromium.cpp',
294                 'src/StorageEventDispatcherImpl.cpp',
295                 'src/StorageEventDispatcherImpl.h',
296                 'src/StorageNamespaceProxy.cpp',
297                 'src/StorageNamespaceProxy.h',
298                 'src/SuggestionsPopupMenuClient.cpp',
299                 'src/SuggestionsPopupMenuClient.h',
300                 'src/TemporaryGlue.h',
301                 'src/ToolsAgent.h',
302                 'src/WebAccessibilityCache.cpp',
303                 'src/WebAccessibilityCacheImpl.cpp',
304                 'src/WebAccessibilityCacheImpl.h',
305                 'src/WebAccessibilityObject.cpp',
306                 'src/WebAnimationControllerImpl.cpp',
307                 'src/WebAnimationControllerImpl.h',
308                 'src/WebBindings.cpp',
309                 'src/WebCache.cpp',
310                 'src/WebColor.cpp',
311                 'src/WebCommon.cpp',
312                 'src/WebCrossOriginPreflightResultCache.cpp',
313                 'src/WebCString.cpp',
314                 'src/WebCursorInfo.cpp',
315                 'src/WebData.cpp',
316                 'src/WebDatabase.cpp',
317                 'src/WebDataSourceImpl.cpp',
318                 'src/WebDataSourceImpl.h',
319                 'src/WebDevToolsAgentImpl.cpp',
320                 'src/WebDevToolsAgentImpl.h',
321                 'src/WebDevToolsFrontendImpl.cpp',
322                 'src/WebDevToolsFrontendImpl.h',
323                 'src/WebDocument.cpp',
324                 'src/WebDragData.cpp',
325                 'src/WebElement.cpp',
326                 'src/WebEntities.cpp',
327                 'src/WebEntities.h',
328                 'src/WebEvent.cpp',
329                 'src/WebEventListener.cpp',
330                 'src/WebEventListenerPrivate.cpp',
331                 'src/WebEventListenerPrivate.h',
332                 'src/WebFileChooserCompletionImpl.cpp',
333                 'src/WebFileChooserCompletionImpl.h',
334                 'src/WebFontCache.cpp',
335                 'src/WebFormControlElement.cpp',
336                 'src/WebFormElement.cpp',
337                 'src/WebFrameImpl.cpp',
338                 'src/WebFrameImpl.h',
339                 'src/WebGeolocationServiceBridgeImpl.cpp',
340                 'src/WebGeolocationServiceBridgeImpl.h',
341                 'src/WebGlyphCache.cpp',
342                 'src/WebGraphicsContext3D.cpp',
343                 'src/WebGraphicsContext3DDefaultImpl.cpp',
344                 'src/WebGraphicsContext3DDefaultImpl.h',
345                 'src/WebHistoryItem.cpp',
346                 'src/WebHTTPBody.cpp',
347                 'src/WebIDBDatabaseError.cpp',
348                 'src/WebImageCG.cpp',
349                 'src/WebImageDecoder.cpp',
350                 'src/WebImageSkia.cpp',
351                 'src/WebIndexedDatabaseImpl.cpp',
352                 'src/WebIndexedDatabaseImpl.h',
353                 'src/WebInputElement.cpp',
354                 'src/WebInputEvent.cpp',
355                 'src/WebInputEventConversion.cpp',
356                 'src/WebInputEventConversion.h',
357                 'src/WebKit.cpp',
358                 'src/WebLabelElement.cpp',
359                 'src/WebMediaPlayerClientImpl.cpp',
360                 'src/WebMediaPlayerClientImpl.h',
361                 'src/WebMutationEvent.cpp',
362                 'src/WebNode.cpp',
363                 'src/WebNodeCollection.cpp',
364                 'src/WebNodeList.cpp',
365                 'src/WebNotification.cpp',
366                 'src/WebPageSerializer.cpp',
367                 'src/WebPageSerializerImpl.cpp',
368                 'src/WebPageSerializerImpl.h',
369                 'src/WebPasswordFormData.cpp',
370                 'src/WebPasswordFormUtils.cpp',
371                 'src/WebPasswordFormUtils.h',
372                 'src/WebPluginContainerImpl.h',
373                 'src/WebPluginContainerImpl.cpp',
374                 'src/WebPluginDocument.cpp',
375                 'src/WebPluginListBuilderImpl.cpp',
376                 'src/WebPluginListBuilderImpl.h',
377                 'src/WebPluginLoadObserver.cpp',
378                 'src/WebPluginLoadObserver.h',
379                 'src/WebPopupMenuImpl.cpp',
380                 'src/WebPopupMenuImpl.h',
381                 'src/WebRange.cpp',
382                 'src/WebRegularExpression.cpp',
383                 'src/WebRuntimeFeatures.cpp',
384                 'src/WebScriptController.cpp',
385                 'src/WebSearchableFormData.cpp',
386                 'src/WebSecurityOrigin.cpp',
387                 'src/WebSecurityPolicy.cpp',
388                 'src/WebSelectElement.cpp',
389                 'src/WebSerializedScriptValue.cpp',
390                 'src/WebSettingsImpl.cpp',
391                 'src/WebSettingsImpl.h',
392                 'src/WebSharedWorkerImpl.cpp',
393                 'src/WebSharedWorkerImpl.h',
394                 'src/WebStorageAreaImpl.cpp',
395                 'src/WebStorageAreaImpl.h',
396                 'src/WebStorageEventDispatcherImpl.cpp',
397                 'src/WebStorageEventDispatcherImpl.h',
398                 'src/WebStorageNamespaceImpl.cpp',
399                 'src/WebStorageNamespaceImpl.h',
400                 'src/WebString.cpp',
401                 'src/WebURL.cpp',
402                 'src/WebURLRequest.cpp',
403                 'src/WebURLRequestPrivate.h',
404                 'src/WebURLResponse.cpp',
405                 'src/WebURLResponsePrivate.h',
406                 'src/WebURLError.cpp',
407                 'src/WebViewImpl.cpp',
408                 'src/WebViewImpl.h',
409                 'src/WebWorkerBase.cpp',
410                 'src/WebWorkerBase.h',
411                 'src/WebWorkerClientImpl.cpp',
412                 'src/WebWorkerClientImpl.h',
413                 'src/WebWorkerImpl.cpp',
414                 'src/WebWorkerImpl.h',
415                 'src/WrappedResourceRequest.h',
416                 'src/WrappedResourceResponse.h',
417                 'src/win/WebInputEventFactory.cpp',
418                 'src/win/WebScreenInfoFactory.cpp',
419             ],
420             'conditions': [
421                 ['OS=="linux" or OS=="freebsd"', {
422                     'dependencies': [
423                         '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
424                         '<(chromium_src_dir)/build/linux/system.gyp:gtk',
425                         '<(chromium_src_dir)/build/linux/system.gyp:x11',
426                     ],
427                     'include_dirs': [
428                         'public/x11',
429                         'public/gtk',
430                         'public/linux',
431                     ],
432                 }, { # else: OS!="linux" and OS!="freebsd"
433                     'sources/': [
434                         ['exclude', '/gtk/'],
435                         ['exclude', '/x11/'],
436                         ['exclude', '/linux/'],
437                     ],
438                 }],
439                 ['OS=="mac"', {
440                     'include_dirs': [
441                         'public/mac',
442                     ],
443                     'sources/': [
444                         ['exclude', 'Skia\\.cpp$'],
445                     ],
446                 }, { # else: OS!="mac"
447                     'sources/': [
448                         ['exclude', '/mac/'],
449                         ['exclude', 'CG\\.cpp$'],
450                     ],
451                 }],
452                 ['OS=="win"', {
453                     'include_dirs': [
454                         'public/win',
455                     ],
456                 }, { # else: OS!="win"
457                     'sources/': [['exclude', '/win/']],
458                 }],
459                 ['"ENABLE_3D_CANVAS=1" in feature_defines', {
460                     # Conditionally compile in GLEW and our GraphicsContext3D implementation.
461                     'sources+': [
462                         'src/GraphicsContext3D.cpp',
463                         '<(chromium_src_dir)/third_party/glew/src/glew.c'
464                     ],
465                     'include_dirs+': [
466                         '<(chromium_src_dir)/third_party/glew/include'
467                     ],
468                     'defines+': [
469                         'GLEW_STATIC=1',
470                         'GLEW_NO_GLU=1',
471                     ],
472                     'conditions': [
473                         ['OS=="win"', {
474                             'link_settings': {
475                                 'libraries': [
476                                     '-lopengl32.lib',
477                                 ],
478                             },
479                         }],
480                         ['OS=="mac"', {
481                             'link_settings': {
482                                 'libraries': [
483                                     '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
484                                 ],
485                             },
486                         }],
487                     ],
488                 }],
489             ],
490         },
491         {
492             'target_name': 'webkit_unit_tests',
493             'type': 'executable',
494             'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
495             'dependencies': [
496                 'webkit',
497                 '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
498                 '<(chromium_src_dir)/testing/gtest.gyp:gtest',
499                 '<(chromium_src_dir)/base/base.gyp:base',
500                 '<(chromium_src_dir)/base/base.gyp:base_i18n',
501             ],
502             'include_dirs': [
503                 'public',
504                 'src',
505             ],
506             'sources': [
507                 'tests/DragImageTest.cpp',
508                 'tests/KeyboardTest.cpp',
509                 'tests/KURLTest.cpp',
510                 'tests/RunAllTests.cpp',
511             ],
512             'conditions': [
513                 ['OS=="win"', {
514                     'sources': [
515                         # FIXME: Port PopupMenuTest to Linux and Mac.
516                         'tests/PopupMenuTest.cpp',
517                         'tests/TransparencyWinTest.cpp',
518                         'tests/UniscribeHelperTest.cpp',
519                     ],
520                 }],
521                 ['OS=="mac"', {
522                     'sources!': [
523                         # FIXME: Port DragImageTest to Mac.
524                         'tests/DragImageTest.cpp',
525                     ],
526                 }],
527             ],
528         },
529     ], # targets
530 }
531
532 # Local Variables:
533 # tab-width:2
534 # indent-tabs-mode:nil
535 # End:
536 # vim: set expandtab tabstop=2 shiftwidth=2: