2009-12-04 James Hawkins <jhawkins@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         'conditions': [
37             # Location of the chromium src directory and target type is different
38             # if webkit is built inside chromium or as standalone project.
39             ['inside_chromium_build==0', {
40                 # Webkit is being built outside of the full chromium project.
41                 # e.g. via build-webkit --chromium
42                 'chromium_src_dir': '.',
43                 'webkit_target_type': 'shared_library',
44             },{
45                 # WebKit is checked out in src/chromium/third_party/WebKit
46                 'chromium_src_dir': '../../../..',
47                 'webkit_target_type': 'static_library',
48             }],
49             # We can't turn on warnings on Windows and Linux until we upstream the
50             # WebKit API.
51             ['OS=="mac"', {
52                 'chromium_code': 1,
53             }],
54         ],
55     },
56     'targets': [
57         {
58             'target_name': 'webkit',
59             'type': '<(webkit_target_type)',
60             'msvs_guid': '5ECEC9E5-8F23-47B6-93E0-C3B328B3BE65',
61             'dependencies': [
62                 '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
63             ],
64             'include_dirs': [
65                 'public',
66                 'src',
67             ],
68             'defines': [
69                 'WEBKIT_IMPLEMENTATION',
70             ],
71             'sources': [
72                 'public/gtk/WebInputEventFactory.h',
73                 'public/linux/WebFontRendering.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/WebApplicationCacheHost.h',
81                 'public/WebApplicationCacheHostClient.h',
82                 'public/WebBindings.h',
83                 'public/WebCache.h',
84                 'public/WebCanvas.h',
85                 'public/WebClipboard.h',
86                 'public/WebColor.h',
87                 'public/WebColorName.h',
88                 'public/WebCommon.h',
89                 'public/WebCommonWorkerClient.h',
90                 'public/WebCompositionCommand.h',
91                 'public/WebConsoleMessage.h',
92                 'public/WebContextMenuData.h',
93                 'public/WebCookie.h',
94                 'public/WebCrossOriginPreflightResultCache.h',
95                 'public/WebCString.h',
96                 'public/WebCursorInfo.h',
97                 'public/WebData.h',
98                 'public/WebDatabase.h',
99                 'public/WebDatabaseObserver.h',
100                 'public/WebDataSource.h',
101                 'public/WebDevToolsAgent.h',
102                 'public/WebDevToolsAgentClient.h',
103                 'public/WebDevToolsFrontend.h',
104                 'public/WebDevToolsFrontendClient.h',
105                 'public/WebDragData.h',
106                 'public/WebEditingAction.h',
107                 'public/WebElement.h',
108                 'public/WebFileChooserCompletion.h',
109                 'public/WebFindOptions.h',
110                 'public/WebFrame.h',
111                 'public/WebFrameClient.h',
112                 'public/WebFontCache.h',
113                 'public/WebFormElement.h',
114                 'public/WebHistoryItem.h',
115                 'public/WebHTTPBody.h',
116                 'public/WebImage.h',
117                 'public/WebInputElement.h',
118                 'public/WebInputEvent.h',
119                 'public/WebKit.h',
120                 'public/WebKitClient.h',
121                 'public/WebLocalizedString.h',
122                 'public/WebMediaPlayer.h',
123                 'public/WebMediaPlayerAction.h',
124                 'public/WebMediaPlayerClient.h',
125                 'public/WebMessagePortChannel.h',
126                 'public/WebMessagePortChannelClient.h',
127                 'public/WebMimeRegistry.h',
128                 'public/WebNavigationType.h',
129                 'public/WebNode.h',
130                 'public/WebNonCopyable.h',
131                 'public/WebNotification.h',
132                 'public/WebNotificationPresenter.h',
133                 'public/WebNotificationPermissionCallback.h',
134                 'public/WebPasswordAutocompleteListener.h',
135                 'public/WebPasswordFormData.h',
136                 'public/WebPlugin.h',
137                 'public/WebPluginContainer.h',
138                 'public/WebPluginListBuilder.h',
139                 'public/WebPoint.h',
140                 'public/WebPopupMenu.h',
141                 'public/WebPopupMenuInfo.h',
142                 'public/WebRange.h',
143                 'public/WebRect.h',
144                 'public/WebRegularExpression.h',
145                 'public/WebRuntimeFeatures.h',
146                 'public/WebScreenInfo.h',
147                 'public/WebScriptController.h',
148                 'public/WebScriptSource.h',
149                 'public/WebSearchableFormData.h',
150                 'public/WebSecurityOrigin.h',
151                 'public/WebSecurityPolicy.h',
152                 'public/WebSettings.h',
153                 'public/WebSharedWorker.h',
154                 'public/WebSharedWorkerRepository.h',
155                 'public/WebSize.h',
156                 'public/WebSocketStreamError.h',
157                 'public/WebSocketStreamHandle.h',
158                 'public/WebSocketStreamHandleClient.h',
159                 'public/WebStorageArea.h',
160                 'public/WebStorageEventDispatcher.h',
161                 'public/WebStorageNamespace.h',
162                 'public/WebString.h',
163                 'public/WebTextAffinity.h',
164                 'public/WebTextCaseSensitivity.h',
165                 'public/WebTextDirection.h',
166                 'public/WebURL.h',
167                 'public/WebURLError.h',
168                 'public/WebURLLoader.h',
169                 'public/WebURLLoaderClient.h',
170                 'public/WebURLRequest.h',
171                 'public/WebURLResponse.h',
172                 'public/WebVector.h',
173                 'public/WebView.h',
174                 'public/WebViewClient.h',
175                 'public/WebWidget.h',
176                 'public/WebWidgetClient.h',
177                 'public/WebWorker.h',
178                 'public/WebWorkerClient.h',
179                 'public/win/WebInputEventFactory.h',
180                 'public/win/WebSandboxSupport.h',
181                 'public/win/WebScreenInfoFactory.h',
182                 'public/win/WebScreenInfoFactory.h',
183                 'src/ApplicationCacheHost.cpp',
184                 'src/AssertMatchingEnums.cpp',
185                 'src/AutocompletePopupMenuClient.cpp',
186                 'src/AutocompletePopupMenuClient.h',
187                 'src/BackForwardListClientImpl.cpp',
188                 'src/BackForwardListClientImpl.h',
189                 'src/ChromeClientImpl.cpp',
190                 'src/ChromeClientImpl.h',
191                 'src/ChromiumBridge.cpp',
192                 'src/ChromiumCurrentTime.cpp',
193                 'src/ChromiumThreading.cpp',
194                 'src/ContextMenuClientImpl.cpp',
195                 'src/ContextMenuClientImpl.h',
196                 'src/DatabaseObserver.cpp',
197                 'src/DOMUtilitiesPrivate.cpp',
198                 'src/DOMUtilitiesPrivate.h',
199                 'src/DragClientImpl.cpp',
200                 'src/DragClientImpl.h',
201                 'src/EditorClientImpl.cpp',
202                 'src/EditorClientImpl.h',
203                 'src/FrameLoaderClientImpl.cpp',
204                 'src/FrameLoaderClientImpl.h',
205                 'src/gtk/WebFontInfo.cpp',
206                 'src/gtk/WebFontInfo.h',
207                 'src/gtk/WebInputEventFactory.cpp',
208                 'src/InspectorClientImpl.cpp',
209                 'src/InspectorClientImpl.h',
210                 'src/linux/WebFontRendering.cpp',
211                 'src/x11/WebScreenInfoFactory.cpp',
212                 'src/mac/WebInputEventFactory.mm',
213                 'src/mac/WebScreenInfoFactory.mm',
214                 'src/LocalizedStrings.cpp',
215                 'src/MediaPlayerPrivateChromium.cpp',
216                 'src/NotificationPresenterImpl.h',
217                 'src/NotificationPresenterImpl.cpp',
218                 'src/PlatformMessagePortChannel.cpp',
219                 'src/PlatformMessagePortChannel.h',
220                 'src/ResourceHandle.cpp',
221                 'src/SharedWorkerRepository.cpp',
222                 'src/SocketStreamHandle.cpp',
223                 'src/StorageAreaProxy.cpp',
224                 'src/StorageAreaProxy.h',
225                 'src/StorageEventDispatcherChromium.cpp',
226                 'src/StorageEventDispatcherImpl.cpp',
227                 'src/StorageEventDispatcherImpl.h',
228                 'src/StorageNamespaceProxy.cpp',
229                 'src/StorageNamespaceProxy.h',
230                 'src/TemporaryGlue.h',
231                 'src/WebAccessibilityCache.cpp',
232                 'src/WebAccessibilityCacheImpl.cpp',
233                 'src/WebAccessibilityCacheImpl.h',
234                 'src/WebAccessibilityObject.cpp',
235                 'src/WebBindings.cpp',
236                 'src/WebCache.cpp',
237                 'src/WebColor.cpp',
238                 'src/WebCrossOriginPreflightResultCache.cpp',
239                 'src/WebCString.cpp',
240                 'src/WebCursorInfo.cpp',
241                 'src/WebData.cpp',
242                 'src/WebDatabase.cpp',
243                 'src/WebDataSourceImpl.cpp',
244                 'src/WebDataSourceImpl.h',
245                 'src/WebDragData.cpp',
246                 'src/WebElement.cpp',
247                 'src/WebFileChooserCompletionImpl.cpp',
248                 'src/WebFileChooserCompletionImpl.h',
249                 'src/WebFontCache.cpp',
250                 'src/WebFormElement.cpp',
251                 'src/WebFrameImpl.cpp',
252                 'src/WebFrameImpl.h',
253                 'src/WebHistoryItem.cpp',
254                 'src/WebHTTPBody.cpp',
255                 'src/WebImageCG.cpp',
256                 'src/WebImageSkia.cpp',
257                 'src/WebInputElement.cpp',
258                 'src/WebInputEvent.cpp',
259                 'src/WebInputEventConversion.cpp',
260                 'src/WebInputEventConversion.h',
261                 'src/WebKit.cpp',
262                 'src/WebMediaPlayerClientImpl.cpp',
263                 'src/WebMediaPlayerClientImpl.h',
264                 'src/WebNode.cpp',
265                 'src/WebNotification.cpp',
266                 'src/WebPasswordFormData.cpp',
267                 'src/WebPasswordFormUtils.cpp',
268                 'src/WebPasswordFormUtils.h',
269                 'src/WebPluginContainerImpl.h',
270                 'src/WebPluginContainerImpl.cpp',
271                 'src/WebPluginListBuilderImpl.cpp',
272                 'src/WebPluginListBuilderImpl.h',
273                 'src/WebPluginLoadObserver.cpp',
274                 'src/WebPluginLoadObserver.h',
275                 'src/WebPopupMenuImpl.cpp',
276                 'src/WebPopupMenuImpl.h',
277                 'src/WebRange.cpp',
278                 'src/WebRegularExpression.cpp',
279                 'src/WebRuntimeFeatures.cpp',
280                 'src/WebScriptController.cpp',
281                 'src/WebSearchableFormData.cpp',
282                 'src/WebSecurityOrigin.cpp',
283                 'src/WebSecurityPolicy.cpp',
284                 'src/WebSettingsImpl.cpp',
285                 'src/WebSettingsImpl.h',
286                 'src/WebSharedWorkerImpl.cpp',
287                 'src/WebSharedWorkerImpl.h',
288                 'src/WebStorageAreaImpl.cpp',
289                 'src/WebStorageAreaImpl.h',
290                 'src/WebStorageEventDispatcherImpl.cpp',
291                 'src/WebStorageEventDispatcherImpl.h',
292                 'src/WebStorageNamespaceImpl.cpp',
293                 'src/WebStorageNamespaceImpl.h',
294                 'src/WebString.cpp',
295                 'src/WebURL.cpp',
296                 'src/WebURLRequest.cpp',
297                 'src/WebURLRequestPrivate.h',
298                 'src/WebURLResponse.cpp',
299                 'src/WebURLResponsePrivate.h',
300                 'src/WebURLError.cpp',
301                 'src/WebViewImpl.cpp',
302                 'src/WebViewImpl.h',
303                 'src/WebWorkerBase.cpp',
304                 'src/WebWorkerBase.h',
305                 'src/WebWorkerClientImpl.cpp',
306                 'src/WebWorkerClientImpl.h',
307                 'src/WebWorkerImpl.cpp',
308                 'src/WebWorkerImpl.h',
309                 'src/WrappedResourceRequest.h',
310                 'src/WrappedResourceResponse.h',
311                 'src/win/WebInputEventFactory.cpp',
312                 'src/win/WebScreenInfoFactory.cpp',
313             ],
314             'conditions': [
315                 ['OS=="linux" or OS=="freebsd"', {
316                     'dependencies': [
317                         '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
318                         '<(chromium_src_dir)/build/linux/system.gyp:gtk',
319                         '<(chromium_src_dir)/build/linux/system.gyp:x11',
320                     ],
321                     'include_dirs': [
322                         'public/x11',
323                         'public/gtk',
324                         'public/linux',
325                     ],
326                 }, { # else: OS!="linux" and OS!="freebsd"
327                     'sources/': [
328                         ['exclude', '/gtk/'],
329                         ['exclude', '/x11/'],
330                         ['exclude', '/linux/'],
331                     ],
332                 }],
333                 ['OS=="mac"', {
334                     'include_dirs': [
335                         'public/mac',
336                     ],
337                     'sources/': [
338                         ['exclude', 'Skia\\.cpp$'],
339                     ],
340                 }, { # else: OS!="mac"
341                     'sources/': [
342                         ['exclude', '/mac/'],
343                         ['exclude', 'CG\\.cpp$'],
344                     ],
345                 }],
346                 ['OS=="win"', {
347                     'include_dirs': [
348                         'public/win',
349                     ],
350                 }, { # else: OS!="win"
351                     'sources/': [['exclude', '/win/']],
352                 }],
353                 ['"ENABLE_3D_CANVAS=1" in feature_defines', {
354                     # Conditionally compile in GLEW and our GraphicsContext3D implementation.
355                     'sources+': [
356                         'src/GraphicsContext3D.cpp',
357                         '<(chromium_src_dir)/third_party/glew/src/glew.c'
358                     ],
359                     'include_dirs+': [
360                         '<(chromium_src_dir)/third_party/glew/include'
361                     ],
362                     'defines+': [
363                         'GLEW_STATIC=1',
364                         'GLEW_NO_GLU=1',
365                     ],
366                     'conditions': [
367                         ['OS=="win"', {
368                             'link_settings': {
369                                 'libraries': [
370                                     '-lopengl32.lib',
371                                 ],
372                             },
373                         }],
374                         ['OS=="mac"', {
375                             'link_settings': {
376                                 'libraries': [
377                                     '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
378                                 ],
379                             },
380                         }],
381                     ],
382                 }],
383             ],
384         },
385     ], # targets
386 }
387
388 # Local Variables:
389 # tab-width:2
390 # indent-tabs-mode:nil
391 # End:
392 # vim: set expandtab tabstop=2 shiftwidth=2: