2010-06-26 Sheriff Bot <webkit.review.bot@gmail.com>
[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         '../../WebKitTools/DumpRenderTree/DumpRenderTree.gypi',
35     ],
36     'variables': {
37         'webkit_target_type': 'static_library',
38         'conditions': [
39             # Location of the chromium src directory and target type is different
40             # if webkit is built inside chromium or as standalone project.
41             ['inside_chromium_build==0', {
42                 # Webkit is being built outside of the full chromium project.
43                 # e.g. via build-webkit --chromium
44                 'chromium_src_dir': '../../WebKit/chromium',
45             },{
46                 # WebKit is checked out in src/chromium/third_party/WebKit
47                 'chromium_src_dir': '../../../..',
48             }],
49         ],
50         'ahem_path': '../../WebKitTools/DumpRenderTree/qt/fonts/AHEM____.TTF',
51     },
52     'targets': [
53         {
54             'target_name': 'webkit',
55             'msvs_guid': '5ECEC9E5-8F23-47B6-93E0-C3B328B3BE65',
56             'dependencies': [
57                 '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
58                 '<(chromium_src_dir)/skia/skia.gyp:skia',
59                 '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
60             ],
61             'export_dependent_settings': [
62                 '<(chromium_src_dir)/skia/skia.gyp:skia',
63                 '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
64             ],
65             'include_dirs': [
66                 'public',
67                 'src',
68             ],
69             'defines': [
70                 'WEBKIT_IMPLEMENTATION',
71             ],
72             'sources': [
73                 'public/gtk/WebInputEventFactory.h',
74                 'public/linux/WebFontRendering.h',
75                 'public/linux/WebFontRenderStyle.h',
76                 'public/linux/WebRenderTheme.h',
77                 'public/x11/WebScreenInfoFactory.h',
78                 'public/mac/WebInputEventFactory.h',
79                 'public/mac/WebSandboxSupport.h',
80                 'public/mac/WebScreenInfoFactory.h',
81                 'public/WebAccessibilityCache.h',
82                 'public/WebAccessibilityObject.h',
83                 'public/WebAccessibilityRole.h',
84                 'public/WebAnimationController.h',
85                 'public/WebApplicationCacheHost.h',
86                 'public/WebApplicationCacheHostClient.h',
87                 'public/WebBindings.h',
88                 'public/WebCache.h',
89                 'public/WebCanvas.h',
90                 'public/WebClipboard.h',
91                 'public/WebColor.h',
92                 'public/WebColorName.h',
93                 'public/WebCommon.h',
94                 'public/WebCommonWorkerClient.h',
95                 'public/WebCompositionCommand.h',
96                 'public/WebCompositionUnderline.h',
97                 'public/WebConsoleMessage.h',
98                 'public/WebContextMenuData.h',
99                 'public/WebCookie.h',
100                 'public/WebCookieJar.h',
101                 'public/WebCrossOriginPreflightResultCache.h',
102                 'public/WebCString.h',
103                 'public/WebCursorInfo.h',
104                 'public/WebDOMStringList.h',
105                 'public/WebData.h',
106                 'public/WebDatabase.h',
107                 'public/WebDatabaseObserver.h',
108                 'public/WebDataSource.h',
109                 'public/WebDevToolsAgent.h',
110                 'public/WebDevToolsAgentClient.h',
111                 'public/WebDevToolsFrontend.h',
112                 'public/WebDevToolsFrontendClient.h',
113                 'public/WebDevToolsMessageData.h',
114                 'public/WebDevToolsMessageTransport.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/WebGeolocationServiceMock.h',
134                 'public/WebGlyphCache.h',
135                 'public/WebGLES2Context.h',
136                 'public/WebGraphicsContext3D.h',
137                 'public/WebHistoryItem.h',
138                 'public/WebHTTPBody.h',
139                 'public/WebImage.h',
140                 'public/WebImageDecoder.h',
141                 'public/WebIDBCallbacks.h',
142                 'public/WebIDBDatabase.h',
143                 'public/WebIDBDatabaseError.h',
144                 'public/WebIDBIndex.h',
145                 'public/WebIDBObjectStore.h',
146                 'public/WebIndexedDatabase.h',
147                 'public/WebInputElement.h',
148                 'public/WebInputEvent.h',
149                 'public/WebKit.h',
150                 'public/WebKitClient.h',
151                 'public/WebLabelElement.h',
152                 'public/WebLocalizedString.h',
153                 'public/WebMediaPlayer.h',
154                 'public/WebMediaPlayerAction.h',
155                 'public/WebMediaPlayerClient.h',
156                 'public/WebMenuItemInfo.h',
157                 'public/WebMessagePortChannel.h',
158                 'public/WebMessagePortChannelClient.h',
159                 'public/WebMimeRegistry.h',
160                 'public/WebMutationEvent.h',
161                 'public/WebNavigationType.h',
162                 'public/WebNode.h',
163                 'public/WebNodeCollection.h',
164                 'public/WebNodeList.h',
165                 'public/WebNonCopyable.h',
166                 'public/WebNotification.h',
167                 'public/WebNotificationPresenter.h',
168                 'public/WebNotificationPermissionCallback.h',
169                 'public/WebPageSerializer.h',
170                 'public/WebPageSerializerClient.h',
171                 'public/WebPasswordAutocompleteListener.h',
172                 'public/WebPasswordFormData.h',
173                 'public/WebPlugin.h',
174                 'public/WebPluginContainer.h',
175                 'public/WebPluginDocument.h',
176                 'public/WebPluginListBuilder.h',
177                 'public/WebPoint.h',
178                 'public/WebPopupMenu.h',
179                 'public/WebPopupMenuInfo.h',
180                 'public/WebPopupType.h',
181                 'public/WebPrivatePtr.h',
182                 'public/WebRange.h',
183                 'public/WebRect.h',
184                 'public/WebRegularExpression.h',
185                 'public/WebRuntimeFeatures.h',
186                 'public/WebScrollbar.h',
187                 'public/WebScrollbarClient.h',
188                 'public/WebScreenInfo.h',
189                 'public/WebScriptController.h',
190                 'public/WebScriptSource.h',
191                 'public/WebSearchableFormData.h',
192                 'public/WebSecurityOrigin.h',
193                 'public/WebSecurityPolicy.h',
194                 'public/WebSelectElement.h',
195                 'public/WebSerializedScriptValue.h',
196                 'public/WebSettings.h',
197                 'public/WebSharedWorker.h',
198                 'public/WebSharedWorkerRepository.h',
199                 'public/WebSize.h',
200                 'public/WebSocketStreamError.h',
201                 'public/WebSocketStreamHandle.h',
202                 'public/WebSocketStreamHandleClient.h',
203                 'public/WebStorageArea.h',
204                 'public/WebStorageEventDispatcher.h',
205                 'public/WebStorageNamespace.h',
206                 'public/WebString.h',
207                 'public/WebTextAffinity.h',
208                 'public/WebTextCaseSensitivity.h',
209                 'public/WebTextDirection.h',
210                 'public/WebTextInputType.h',
211                 'public/WebThemeEngine.h',
212                 'public/WebURL.h',
213                 'public/WebURLError.h',
214                 'public/WebURLLoader.h',
215                 'public/WebURLLoaderClient.h',
216                 'public/WebURLRequest.h',
217                 'public/WebURLResponse.h',
218                 'public/WebVector.h',
219                 'public/WebView.h',
220                 'public/WebViewClient.h',
221                 'public/WebWidget.h',
222                 'public/WebWidgetClient.h',
223                 'public/WebWorker.h',
224                 'public/WebWorkerClient.h',
225                 'public/win/WebInputEventFactory.h',
226                 'public/win/WebSandboxSupport.h',
227                 'public/win/WebScreenInfoFactory.h',
228                 'public/win/WebScreenInfoFactory.h',
229                 'src/APUAgentDelegate.h',
230                 'src/ApplicationCacheHost.cpp',
231                 'src/ApplicationCacheHostInternal.h',
232                 'src/AssertMatchingEnums.cpp',
233                 'src/AutocompletePopupMenuClient.cpp',
234                 'src/AutocompletePopupMenuClient.h',
235                 'src/AutoFillPopupMenuClient.cpp',
236                 'src/AutoFillPopupMenuClient.h',
237                 'src/BackForwardListClientImpl.cpp',
238                 'src/BackForwardListClientImpl.h',
239                 'src/BoundObject.cpp',
240                 'src/BoundObject.h',
241                 'src/ChromeClientImpl.cpp',
242                 'src/ChromeClientImpl.h',
243                 'src/ChromiumBridge.cpp',
244                 'src/ChromiumCurrentTime.cpp',
245                 'src/ChromiumThreading.cpp',
246                 'src/CompositionUnderlineBuilder.h',
247                 'src/CompositionUnderlineVectorBuilder.cpp',
248                 'src/CompositionUnderlineVectorBuilder.h',
249                 'src/ContextMenuClientImpl.cpp',
250                 'src/ContextMenuClientImpl.h',
251                 'src/DatabaseObserver.cpp',
252                 'src/DebuggerAgent.h',
253                 'src/DebuggerAgentImpl.cpp',
254                 'src/DebuggerAgentImpl.h',
255                 'src/DebuggerAgentManager.cpp',
256                 'src/DebuggerAgentManager.h',
257                 'src/DevToolsRPC.h',
258                 'src/DevToolsRPCJS.h',
259                 'src/DOMUtilitiesPrivate.cpp',
260                 'src/DOMUtilitiesPrivate.h',
261                 'src/DragClientImpl.cpp',
262                 'src/DragClientImpl.h',
263                 'src/DragScrollTimer.cpp',
264                 'src/DragScrollTimer.h',
265                 'src/EditorClientImpl.cpp',
266                 'src/EditorClientImpl.h',
267                 'src/EventListenerWrapper.cpp',
268                 'src/EventListenerWrapper.h',
269                 'src/FrameLoaderClientImpl.cpp',
270                 'src/FrameLoaderClientImpl.h',
271                 'src/GLES2Context.cpp',
272                 'src/gtk/WebFontInfo.cpp',
273                 'src/gtk/WebFontInfo.h',
274                 'src/gtk/WebInputEventFactory.cpp',
275                 'src/IDBCallbacksProxy.cpp',
276                 'src/IDBCallbacksProxy.h',
277                 'src/IDBDatabaseProxy.cpp',
278                 'src/IDBDatabaseProxy.h',
279                 'src/IDBIndexProxy.cpp',
280                 'src/IDBIndexProxy.h',
281                 'src/IDBObjectStoreProxy.cpp',
282                 'src/IDBObjectStoreProxy.h',
283                 'src/IndexedDatabaseProxy.cpp',
284                 'src/IndexedDatabaseProxy.h',
285                 'src/InspectorClientImpl.cpp',
286                 'src/InspectorClientImpl.h',
287                 'src/InspectorFrontendClientImpl.cpp',
288                 'src/InspectorFrontendClientImpl.h',
289                 'src/linux/WebFontRendering.cpp',
290                 'src/linux/WebFontRenderStyle.cpp',
291                 'src/linux/WebRenderTheme.cpp',
292                 'src/x11/WebScreenInfoFactory.cpp',
293                 'src/mac/WebInputEventFactory.mm',
294                 'src/mac/WebScreenInfoFactory.mm',
295                 'src/LocalizedStrings.cpp',
296                 'src/MediaPlayerPrivateChromium.cpp',
297                 'src/NotificationPresenterImpl.h',
298                 'src/NotificationPresenterImpl.cpp',
299                 'src/PlatformMessagePortChannel.cpp',
300                 'src/PlatformMessagePortChannel.h',
301                 'src/ProfilerAgent.h',
302                 'src/ProfilerAgentImpl.cpp',
303                 'src/ProfilerAgentImpl.h',
304                 'src/ResourceHandle.cpp',
305                 'src/SharedWorkerRepository.cpp',
306                 'src/SocketStreamHandle.cpp',
307                 'src/StorageAreaProxy.cpp',
308                 'src/StorageAreaProxy.h',
309                 'src/StorageEventDispatcherChromium.cpp',
310                 'src/StorageEventDispatcherImpl.cpp',
311                 'src/StorageEventDispatcherImpl.h',
312                 'src/StorageNamespaceProxy.cpp',
313                 'src/StorageNamespaceProxy.h',
314                 'src/SuggestionsPopupMenuClient.cpp',
315                 'src/SuggestionsPopupMenuClient.h',
316                 'src/TemporaryGlue.h',
317                 'src/ToolsAgent.h',
318                 'src/WebAccessibilityCache.cpp',
319                 'src/WebAccessibilityCacheImpl.cpp',
320                 'src/WebAccessibilityCacheImpl.h',
321                 'src/WebAccessibilityObject.cpp',
322                 'src/WebAnimationControllerImpl.cpp',
323                 'src/WebAnimationControllerImpl.h',
324                 'src/WebBindings.cpp',
325                 'src/WebCache.cpp',
326                 'src/WebColor.cpp',
327                 'src/WebCommon.cpp',
328                 'src/WebCrossOriginPreflightResultCache.cpp',
329                 'src/WebCString.cpp',
330                 'src/WebCursorInfo.cpp',
331                 'src/WebDOMStringList.cpp',
332                 'src/WebData.cpp',
333                 'src/WebDatabase.cpp',
334                 'src/WebDataSourceImpl.cpp',
335                 'src/WebDataSourceImpl.h',
336                 'src/WebDevToolsAgentImpl.cpp',
337                 'src/WebDevToolsAgentImpl.h',
338                 'src/WebDevToolsFrontendImpl.cpp',
339                 'src/WebDevToolsFrontendImpl.h',
340                 'src/WebDocument.cpp',
341                 'src/WebDragData.cpp',
342                 'src/WebElement.cpp',
343                 'src/WebEntities.cpp',
344                 'src/WebEntities.h',
345                 'src/WebEvent.cpp',
346                 'src/WebEventListener.cpp',
347                 'src/WebEventListenerPrivate.cpp',
348                 'src/WebEventListenerPrivate.h',
349                 'src/WebFileChooserCompletionImpl.cpp',
350                 'src/WebFileChooserCompletionImpl.h',
351                 'src/WebFontCache.cpp',
352                 'src/WebFormControlElement.cpp',
353                 'src/WebFormElement.cpp',
354                 'src/WebFrameImpl.cpp',
355                 'src/WebFrameImpl.h',
356                 'src/WebGeolocationServiceBridgeImpl.cpp',
357                 'src/WebGeolocationServiceBridgeImpl.h',
358                 'src/WebGeolocationServiceMock.cpp',
359                 'src/WebGlyphCache.cpp',
360                 'src/WebGraphicsContext3D.cpp',
361                 'src/WebGraphicsContext3DDefaultImpl.cpp',
362                 'src/WebGraphicsContext3DDefaultImpl.h',
363                 'src/WebHistoryItem.cpp',
364                 'src/WebHTTPBody.cpp',
365                 'src/WebIDBCallbacksImpl.cpp',
366                 'src/WebIDBCallbacksImpl.h',
367                 'src/WebIDBDatabaseError.cpp',
368                 'src/WebIDBDatabaseImpl.cpp',
369                 'src/WebIDBDatabaseImpl.h',
370                 'src/WebIDBIndexImpl.cpp',
371                 'src/WebIDBIndexImpl.h',
372                 'src/WebIDBObjectStoreImpl.cpp',
373                 'src/WebIDBObjectStoreImpl.h',
374                 'src/WebImageCG.cpp',
375                 'src/WebImageDecoder.cpp',
376                 'src/WebImageSkia.cpp',
377                 'src/WebIndexedDatabaseImpl.cpp',
378                 'src/WebIndexedDatabaseImpl.h',
379                 'src/WebInputElement.cpp',
380                 'src/WebInputEvent.cpp',
381                 'src/WebInputEventConversion.cpp',
382                 'src/WebInputEventConversion.h',
383                 'src/WebKit.cpp',
384                 'src/WebLabelElement.cpp',
385                 'src/WebMediaPlayerClientImpl.cpp',
386                 'src/WebMediaPlayerClientImpl.h',
387                 'src/WebMutationEvent.cpp',
388                 'src/WebNode.cpp',
389                 'src/WebNodeCollection.cpp',
390                 'src/WebNodeList.cpp',
391                 'src/WebNotification.cpp',
392                 'src/WebPageSerializer.cpp',
393                 'src/WebPageSerializerImpl.cpp',
394                 'src/WebPageSerializerImpl.h',
395                 'src/WebPasswordFormData.cpp',
396                 'src/WebPasswordFormUtils.cpp',
397                 'src/WebPasswordFormUtils.h',
398                 'src/WebPluginContainerImpl.h',
399                 'src/WebPluginContainerImpl.cpp',
400                 'src/WebPluginDocument.cpp',
401                 'src/WebPluginListBuilderImpl.cpp',
402                 'src/WebPluginListBuilderImpl.h',
403                 'src/WebPluginLoadObserver.cpp',
404                 'src/WebPluginLoadObserver.h',
405                 'src/WebPopupMenuImpl.cpp',
406                 'src/WebPopupMenuImpl.h',
407                 'src/WebRange.cpp',
408                 'src/WebRegularExpression.cpp',
409                 'src/WebRuntimeFeatures.cpp',
410                 'src/WebScriptController.cpp',
411                 'src/WebScrollbarImpl.cpp',
412                 'src/WebScrollbarImpl.h',
413                 'src/WebSearchableFormData.cpp',
414                 'src/WebSecurityOrigin.cpp',
415                 'src/WebSecurityPolicy.cpp',
416                 'src/WebSelectElement.cpp',
417                 'src/WebSerializedScriptValue.cpp',
418                 'src/WebSettingsImpl.cpp',
419                 'src/WebSettingsImpl.h',
420                 'src/WebSharedWorkerImpl.cpp',
421                 'src/WebSharedWorkerImpl.h',
422                 'src/WebStorageAreaImpl.cpp',
423                 'src/WebStorageAreaImpl.h',
424                 'src/WebStorageEventDispatcherImpl.cpp',
425                 'src/WebStorageEventDispatcherImpl.h',
426                 'src/WebStorageNamespaceImpl.cpp',
427                 'src/WebStorageNamespaceImpl.h',
428                 'src/WebString.cpp',
429                 'src/WebURL.cpp',
430                 'src/WebURLRequest.cpp',
431                 'src/WebURLRequestPrivate.h',
432                 'src/WebURLResponse.cpp',
433                 'src/WebURLResponsePrivate.h',
434                 'src/WebURLError.cpp',
435                 'src/WebViewImpl.cpp',
436                 'src/WebViewImpl.h',
437                 'src/WebWorkerBase.cpp',
438                 'src/WebWorkerBase.h',
439                 'src/WebWorkerClientImpl.cpp',
440                 'src/WebWorkerClientImpl.h',
441                 'src/WebWorkerImpl.cpp',
442                 'src/WebWorkerImpl.h',
443                 'src/WrappedResourceRequest.h',
444                 'src/WrappedResourceResponse.h',
445                 'src/win/WebInputEventFactory.cpp',
446                 'src/win/WebScreenInfoFactory.cpp',
447             ],
448             'conditions': [
449                 ['inside_chromium_build==1 and OS=="win"', {
450                     'type': '<(component)',
451
452                     'conditions': [
453                         ['component=="shared_library"', {
454                             'defines': [
455                                 'WEBKIT_DLL',
456                                 'USING_V8_SHARED',
457                             ],
458                             'dependencies': [
459                                 '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
460                                 '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
461                                 '<(chromium_src_dir)/third_party/icu/icu.gyp:*',
462                                 '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
463                                 '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
464                                 '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
465                                 '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
466                                 '<(chromium_src_dir)/third_party/modp_b64/modp_b64.gyp:modp_b64',
467                                 '<(chromium_src_dir)/third_party/nss/nss.gyp:*',
468                                 '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
469                                 '<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib',
470                                 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
471                             ],
472                         }],
473                     ],
474                 }, {
475                     'type': '<(webkit_target_type)'
476                 }],
477                 ['OS=="linux" or OS=="freebsd"', {
478                     'dependencies': [
479                         '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
480                         '<(chromium_src_dir)/build/linux/system.gyp:gtk',
481                         '<(chromium_src_dir)/build/linux/system.gyp:x11',
482                     ],
483                     'include_dirs': [
484                         'public/x11',
485                         'public/gtk',
486                         'public/linux',
487                     ],
488                 }, { # else: OS!="linux" and OS!="freebsd"
489                     'sources/': [
490                         ['exclude', '/gtk/'],
491                         ['exclude', '/x11/'],
492                         ['exclude', '/linux/'],
493                     ],
494                 }],
495                 ['OS=="mac"', {
496                     'include_dirs': [
497                         'public/mac',
498                     ],
499                     'sources/': [
500                         ['exclude', 'Skia\\.cpp$'],
501                     ],
502                     'variables': {
503                         # FIXME: Turn on warnings on other platforms and for
504                         # other targets.
505                         'chromium_code': 1,
506                     }
507                 }, { # else: OS!="mac"
508                     'sources/': [
509                         ['exclude', '/mac/'],
510                         ['exclude', 'CG\\.cpp$'],
511                     ],
512                 }],
513                 ['OS=="win"', {
514                     'include_dirs': [
515                         'public/win',
516                     ],
517                 }, { # else: OS!="win"
518                     'sources/': [['exclude', '/win/']],
519                 }],
520                 ['"ENABLE_3D_CANVAS=1" in feature_defines', {
521                     # Conditionally compile in GLEW and our GraphicsContext3D implementation.
522                     'sources+': [
523                         'src/GraphicsContext3D.cpp',
524                         '<(chromium_src_dir)/third_party/glew/src/glew.c'
525                     ],
526                     'include_dirs+': [
527                         '<(chromium_src_dir)/third_party/glew/include'
528                     ],
529                     'defines+': [
530                         'GLEW_STATIC=1',
531                         'GLEW_NO_GLU=1',
532                     ],
533                     'conditions': [
534                         ['OS=="win"', {
535                             'link_settings': {
536                                 'libraries': [
537                                     '-lopengl32.lib',
538                                 ],
539                             },
540                         }],
541                         ['OS=="mac"', {
542                             'link_settings': {
543                                 'libraries': [
544                                     '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
545                                 ],
546                             },
547                         }],
548                     ],
549                 }],
550             ],
551         },
552         {
553             'target_name': 'webkit_unit_tests',
554             'type': 'executable',
555             'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
556             'dependencies': [
557                 'webkit',
558                 '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
559                 '<(chromium_src_dir)/testing/gtest.gyp:gtest',
560                 '<(chromium_src_dir)/base/base.gyp:base',
561                 '<(chromium_src_dir)/base/base.gyp:base_i18n',
562                 '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
563             ],
564             'include_dirs': [
565                 'public',
566                 'src',
567             ],
568             'sources': [
569                 'tests/DragImageTest.cpp',
570                 'tests/KeyboardTest.cpp',
571                 'tests/KURLTest.cpp',
572                 'tests/RunAllTests.cpp',
573             ],
574             'conditions': [
575                 ['OS=="win"', {
576                     'sources': [
577                         # FIXME: Port PopupMenuTest to Linux and Mac.
578                         'tests/PopupMenuTest.cpp',
579                         'tests/TransparencyWinTest.cpp',
580                         'tests/UniscribeHelperTest.cpp',
581                     ],
582                 }],
583                 ['OS=="mac"', {
584                     'sources!': [
585                         # FIXME: Port DragImageTest to Mac.
586                         'tests/DragImageTest.cpp',
587                     ],
588                 }],
589             ],
590         },
591         {
592             'target_name': 'ImageDiff',
593             'type': 'executable',
594             'dependencies': [
595                 'webkit',
596                 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
597                 '<(chromium_src_dir)/gfx/gfx.gyp:gfx',
598             ],
599             'include_dirs': [
600                 '../../JavaScriptCore',
601                 '<(DEPTH)',
602             ],
603             'sources': [
604                 '../../WebKitTools/DumpRenderTree/chromium/ImageDiff.cpp',
605             ],
606         },
607         {
608             'target_name': 'DumpRenderTree',
609             'type': 'executable',
610             'mac_bundle': 1,
611             'dependencies': [
612                 'webkit',
613                 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config',
614                 '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
615                 '<(chromium_src_dir)/webkit/support/webkit_support.gyp:npapi_layout_test_plugin',
616                 '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
617                 '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib'
618             ],
619             'include_dirs': [
620                 '.',
621                 '../../JavaScriptCore',
622                 '../../JavaScriptCore/wtf', # wtf/text/*.h refers headers in wtf/ without wtf/.
623                 '<(DEPTH)',
624             ],
625             'defines': [
626                 # Technically not a unit test but require functions available only to
627                 # unit tests.
628                 'UNIT_TEST',
629             ],
630             'sources': [
631                 '<@(drt_files)',
632             ],
633             'conditions': [
634                 ['OS=="win"', {
635                     'dependencies': ['LayoutTestHelper'],
636
637                     'resource_include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/webkit'],
638                     'sources': [
639                         '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
640                         '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
641                         '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
642                         '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
643                     ],
644                     'copies': [{
645                         'destination': '<(PRODUCT_DIR)',
646                         'files': ['<(ahem_path)'],
647                     }, {
648                         # This should really be done in the 'npapi_layout_test_plugin'
649                         # target, but the current VS generator handles 'copies'
650                         # settings as AdditionalDependencies, which means that
651                         # when it's over there, it tries to do the copy *before*
652                         # the file is built, instead of after.  We work around this
653                         # by attaching the copy here, since it depends on that
654                         # target.
655                         'destination': '<(PRODUCT_DIR)/plugins',
656                         'files': ['<(PRODUCT_DIR)/npapi_layout_test_plugin.dll'],
657                     }],
658                 },{ # OS!="win"
659                     'sources/': [
660                         ['exclude', 'Win\\.cpp$'],
661                     ],
662                     'actions': [
663                         {
664                             'action_name': 'repack_locale',
665                             'variables': {
666                                 'repack_path': '<(chromium_src_dir)/tools/data_pack/repack.py',
667                                 'pak_inputs': [
668                                     '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
669                                     '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
670                                     '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
671                                     '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
672                             ]},
673                             'inputs': [
674                                 '<(repack_path)',
675                                 '<@(pak_inputs)',
676                             ],
677                             'outputs': [
678                                 '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
679                             ],
680                             'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
681                             'process_outputs_as_mac_bundle_resources': 1,
682                         },
683                     ], # actions
684                 }],
685                 ['OS=="mac"', {
686                     'dependencies': ['LayoutTestHelper'],
687
688                     'mac_bundle_resources': [
689                         '<(ahem_path)',
690                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
691                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf',
692                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf',
693                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf',
694                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf',
695                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf',
696                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf',
697                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf',
698                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
699                         '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
700                     ],
701                     'copies': [{
702                         'destination': '<(PRODUCT_DIR)/DumpRenderTree.app/Contents/PlugIns/',
703                         'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'],
704                     }],
705                 },{ # OS!="mac"
706                     'sources/': [
707                         # .mm is already excluded by common.gypi
708                         ['exclude', 'Mac\\.cpp$'],
709                     ]
710                 }],
711                 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
712                     'copies': [{
713                         'destination': '<(PRODUCT_DIR)',
714                         'files': [
715                             '<(ahem_path)',
716                             '../../WebKitTools/DumpRenderTree/chromium/fonts.conf',
717                             '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
718                         ]
719                     }, {
720                         'destination': '<(PRODUCT_DIR)/plugins',
721                         'files': ['<(PRODUCT_DIR)/libnpapi_layout_test_plugin.so'],
722                     }],
723                 },{ # OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="solaris"
724                     'sources/': [
725                         ['exclude', '(Gtk|Linux)\\.cpp$']
726                     ]
727                 }],
728             ],
729         },
730     ], # targets
731     'conditions': [
732         ['OS=="win"', {
733             'targets': [{
734                 'target_name': 'LayoutTestHelper',
735                 'type': 'executable',
736                 'sources': ['../../WebKitTools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp'],
737             }],
738         }],
739         ['OS=="mac"', {
740             'targets': [
741                 {
742                     'target_name': 'LayoutTestHelper',
743                     'type': 'executable',
744                     'sources': ['../../WebKitTools/DumpRenderTree/chromium/LayoutTestHelper.mm'],
745                     'link_settings': {
746                         'libraries': [
747                             '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
748                         ],
749                     },
750                 },
751             ],
752         }],
753     ], # conditions
754 }
755
756 # Local Variables:
757 # tab-width:2
758 # indent-tabs-mode:nil
759 # End:
760 # vim: set expandtab tabstop=2 shiftwidth=2: