OSDN Git Service

Merge "Bug 2843604 : Layout_tests crash in FontAndroid.cpp."
[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         '../../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/WebCompositionUnderline.h',
96                 'public/WebConsoleMessage.h',
97                 'public/WebContextMenuData.h',
98                 'public/WebCookie.h',
99                 'public/WebCookieJar.h',
100                 'public/WebCrossOriginPreflightResultCache.h',
101                 'public/WebCString.h',
102                 'public/WebCursorInfo.h',
103                 'public/WebDOMStringList.h',
104                 'public/WebData.h',
105                 'public/WebDatabase.h',
106                 'public/WebDatabaseObserver.h',
107                 'public/WebDataSource.h',
108                 'public/WebDevToolsAgent.h',
109                 'public/WebDevToolsAgentClient.h',
110                 'public/WebDevToolsFrontend.h',
111                 'public/WebDevToolsFrontendClient.h',
112                 'public/WebDevToolsMessageData.h',
113                 'public/WebDevToolsMessageTransport.h',
114                 'public/WebDocument.h',
115                 'public/WebDragData.h',
116                 'public/WebEditingAction.h',
117                 'public/WebElement.h',
118                 'public/WebEvent.h',
119                 'public/WebEventListener.h',
120                 'public/WebFileChooserCompletion.h',
121                 'public/WebFileChooserParams.h',
122                 'public/WebFileInfo.h',
123                 'public/WebFileSystem.h',
124                 'public/WebFindOptions.h',
125                 'public/WebFrame.h',
126                 'public/WebFrameClient.h',
127                 'public/WebFontCache.h',
128                 'public/WebFormControlElement.h',
129                 'public/WebFormElement.h',
130                 'public/WebGeolocationService.h',
131                 'public/WebGeolocationServiceBridge.h',
132                 'public/WebGeolocationServiceMock.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/WebIDBIndex.h',
144                 'public/WebIDBKey.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/WebURLLoadTiming.h',
216                 'public/WebURLLoaderClient.h',
217                 'public/WebURLRequest.h',
218                 'public/WebURLResponse.h',
219                 'public/WebVector.h',
220                 'public/WebView.h',
221                 'public/WebViewClient.h',
222                 'public/WebWidget.h',
223                 'public/WebWidgetClient.h',
224                 'public/WebWorker.h',
225                 'public/WebWorkerClient.h',
226                 'public/win/WebInputEventFactory.h',
227                 'public/win/WebSandboxSupport.h',
228                 'public/win/WebScreenInfoFactory.h',
229                 'public/win/WebScreenInfoFactory.h',
230                 'src/APUAgentDelegate.h',
231                 'src/ApplicationCacheHost.cpp',
232                 'src/ApplicationCacheHostInternal.h',
233                 'src/AssertMatchingEnums.cpp',
234                 'src/AutoFillPopupMenuClient.cpp',
235                 'src/AutoFillPopupMenuClient.h',
236                 'src/BackForwardListClientImpl.cpp',
237                 'src/BackForwardListClientImpl.h',
238                 'src/BoundObject.cpp',
239                 'src/BoundObject.h',
240                 'src/ChromeClientImpl.cpp',
241                 'src/ChromeClientImpl.h',
242                 'src/ChromiumBridge.cpp',
243                 'src/ChromiumCurrentTime.cpp',
244                 'src/ChromiumThreading.cpp',
245                 'src/CompositionUnderlineBuilder.h',
246                 'src/CompositionUnderlineVectorBuilder.cpp',
247                 'src/CompositionUnderlineVectorBuilder.h',
248                 'src/ContextMenuClientImpl.cpp',
249                 'src/ContextMenuClientImpl.h',
250                 'src/DatabaseObserver.cpp',
251                 'src/DebuggerAgent.h',
252                 'src/DebuggerAgentImpl.cpp',
253                 'src/DebuggerAgentImpl.h',
254                 'src/DebuggerAgentManager.cpp',
255                 'src/DebuggerAgentManager.h',
256                 'src/DevToolsRPC.h',
257                 'src/DevToolsRPCJS.h',
258                 'src/DOMUtilitiesPrivate.cpp',
259                 'src/DOMUtilitiesPrivate.h',
260                 'src/DragClientImpl.cpp',
261                 'src/DragClientImpl.h',
262                 'src/DragScrollTimer.cpp',
263                 'src/DragScrollTimer.h',
264                 'src/EditorClientImpl.cpp',
265                 'src/EditorClientImpl.h',
266                 'src/EventListenerWrapper.cpp',
267                 'src/EventListenerWrapper.h',
268                 'src/FrameLoaderClientImpl.cpp',
269                 'src/FrameLoaderClientImpl.h',
270                 'src/GLES2Context.cpp',
271                 'src/gtk/WebFontInfo.cpp',
272                 'src/gtk/WebFontInfo.h',
273                 'src/gtk/WebInputEventFactory.cpp',
274                 'src/IDBCallbacksProxy.cpp',
275                 'src/IDBCallbacksProxy.h',
276                 'src/IDBDatabaseProxy.cpp',
277                 'src/IDBDatabaseProxy.h',
278                 'src/IDBIndexProxy.cpp',
279                 'src/IDBIndexProxy.h',
280                 'src/IDBObjectStoreProxy.cpp',
281                 'src/IDBObjectStoreProxy.h',
282                 'src/IndexedDatabaseProxy.cpp',
283                 'src/IndexedDatabaseProxy.h',
284                 'src/InspectorClientImpl.cpp',
285                 'src/InspectorClientImpl.h',
286                 'src/InspectorFrontendClientImpl.cpp',
287                 'src/InspectorFrontendClientImpl.h',
288                 'src/linux/WebFontRendering.cpp',
289                 'src/linux/WebFontRenderStyle.cpp',
290                 'src/linux/WebRenderTheme.cpp',
291                 'src/x11/WebScreenInfoFactory.cpp',
292                 'src/mac/WebInputEventFactory.mm',
293                 'src/mac/WebScreenInfoFactory.mm',
294                 'src/LocalizedStrings.cpp',
295                 'src/MediaPlayerPrivateChromium.cpp',
296                 'src/NotificationPresenterImpl.h',
297                 'src/NotificationPresenterImpl.cpp',
298                 'src/PlatformMessagePortChannel.cpp',
299                 'src/PlatformMessagePortChannel.h',
300                 'src/ProfilerAgent.h',
301                 'src/ProfilerAgentImpl.cpp',
302                 'src/ProfilerAgentImpl.h',
303                 'src/ResourceHandle.cpp',
304                 'src/SharedWorkerRepository.cpp',
305                 'src/SocketStreamHandle.cpp',
306                 'src/StorageAreaProxy.cpp',
307                 'src/StorageAreaProxy.h',
308                 'src/StorageEventDispatcherChromium.cpp',
309                 'src/StorageEventDispatcherImpl.cpp',
310                 'src/StorageEventDispatcherImpl.h',
311                 'src/StorageNamespaceProxy.cpp',
312                 'src/StorageNamespaceProxy.h',
313                 'src/TemporaryGlue.h',
314                 'src/ToolsAgent.h',
315                 'src/WebAccessibilityCache.cpp',
316                 'src/WebAccessibilityCacheImpl.cpp',
317                 'src/WebAccessibilityCacheImpl.h',
318                 'src/WebAccessibilityObject.cpp',
319                 'src/WebAnimationControllerImpl.cpp',
320                 'src/WebAnimationControllerImpl.h',
321                 'src/WebBindings.cpp',
322                 'src/WebCache.cpp',
323                 'src/WebColor.cpp',
324                 'src/WebCommon.cpp',
325                 'src/WebCrossOriginPreflightResultCache.cpp',
326                 'src/WebCString.cpp',
327                 'src/WebCursorInfo.cpp',
328                 'src/WebDOMStringList.cpp',
329                 'src/WebData.cpp',
330                 'src/WebDatabase.cpp',
331                 'src/WebDataSourceImpl.cpp',
332                 'src/WebDataSourceImpl.h',
333                 'src/WebDevToolsAgentImpl.cpp',
334                 'src/WebDevToolsAgentImpl.h',
335                 'src/WebDevToolsFrontendImpl.cpp',
336                 'src/WebDevToolsFrontendImpl.h',
337                 'src/WebDocument.cpp',
338                 'src/WebDragData.cpp',
339                 'src/WebElement.cpp',
340                 'src/WebEntities.cpp',
341                 'src/WebEntities.h',
342                 'src/WebEvent.cpp',
343                 'src/WebEventListener.cpp',
344                 'src/WebEventListenerPrivate.cpp',
345                 'src/WebEventListenerPrivate.h',
346                 'src/WebFileChooserCompletionImpl.cpp',
347                 'src/WebFileChooserCompletionImpl.h',
348                 'src/WebFontCache.cpp',
349                 'src/WebFormControlElement.cpp',
350                 'src/WebFormElement.cpp',
351                 'src/WebFrameImpl.cpp',
352                 'src/WebFrameImpl.h',
353                 'src/WebGeolocationServiceBridgeImpl.cpp',
354                 'src/WebGeolocationServiceBridgeImpl.h',
355                 'src/WebGeolocationServiceMock.cpp',
356                 'src/WebGlyphCache.cpp',
357                 'src/WebGraphicsContext3D.cpp',
358                 'src/WebGraphicsContext3DDefaultImpl.cpp',
359                 'src/WebGraphicsContext3DDefaultImpl.h',
360                 'src/WebHistoryItem.cpp',
361                 'src/WebHTTPBody.cpp',
362                 'src/WebIDBCallbacksImpl.cpp',
363                 'src/WebIDBCallbacksImpl.h',
364                 'src/WebIDBDatabaseError.cpp',
365                 'src/WebIDBDatabaseImpl.cpp',
366                 'src/WebIDBDatabaseImpl.h',
367                 'src/WebIDBIndexImpl.cpp',
368                 'src/WebIDBIndexImpl.h',
369                 'src/WebIDBKey.cpp',
370                 'src/WebIDBObjectStoreImpl.cpp',
371                 'src/WebIDBObjectStoreImpl.h',
372                 'src/WebImageCG.cpp',
373                 'src/WebImageDecoder.cpp',
374                 'src/WebImageSkia.cpp',
375                 'src/WebIndexedDatabaseImpl.cpp',
376                 'src/WebIndexedDatabaseImpl.h',
377                 'src/WebInputElement.cpp',
378                 'src/WebInputEvent.cpp',
379                 'src/WebInputEventConversion.cpp',
380                 'src/WebInputEventConversion.h',
381                 'src/WebKit.cpp',
382                 'src/WebLabelElement.cpp',
383                 'src/WebMediaPlayerClientImpl.cpp',
384                 'src/WebMediaPlayerClientImpl.h',
385                 'src/WebMutationEvent.cpp',
386                 'src/WebNode.cpp',
387                 'src/WebNodeCollection.cpp',
388                 'src/WebNodeList.cpp',
389                 'src/WebNotification.cpp',
390                 'src/WebPageSerializer.cpp',
391                 'src/WebPageSerializerImpl.cpp',
392                 'src/WebPageSerializerImpl.h',
393                 'src/WebPasswordFormData.cpp',
394                 'src/WebPasswordFormUtils.cpp',
395                 'src/WebPasswordFormUtils.h',
396                 'src/WebPluginContainerImpl.h',
397                 'src/WebPluginContainerImpl.cpp',
398                 'src/WebPluginDocument.cpp',
399                 'src/WebPluginListBuilderImpl.cpp',
400                 'src/WebPluginListBuilderImpl.h',
401                 'src/WebPluginLoadObserver.cpp',
402                 'src/WebPluginLoadObserver.h',
403                 'src/WebPopupMenuImpl.cpp',
404                 'src/WebPopupMenuImpl.h',
405                 'src/WebRange.cpp',
406                 'src/WebRegularExpression.cpp',
407                 'src/WebRuntimeFeatures.cpp',
408                 'src/WebScriptController.cpp',
409                 'src/WebScrollbarImpl.cpp',
410                 'src/WebScrollbarImpl.h',
411                 'src/WebSearchableFormData.cpp',
412                 'src/WebSecurityOrigin.cpp',
413                 'src/WebSecurityPolicy.cpp',
414                 'src/WebSelectElement.cpp',
415                 'src/WebSerializedScriptValue.cpp',
416                 'src/WebSettingsImpl.cpp',
417                 'src/WebSettingsImpl.h',
418                 'src/WebSharedWorkerImpl.cpp',
419                 'src/WebSharedWorkerImpl.h',
420                 'src/WebStorageAreaImpl.cpp',
421                 'src/WebStorageAreaImpl.h',
422                 'src/WebStorageEventDispatcherImpl.cpp',
423                 'src/WebStorageEventDispatcherImpl.h',
424                 'src/WebStorageNamespaceImpl.cpp',
425                 'src/WebStorageNamespaceImpl.h',
426                 'src/WebString.cpp',
427                 'src/WebURL.cpp',
428                 'src/WebURLLoadTiming.cpp',
429                 'src/WebURLRequest.cpp',
430                 'src/WebURLRequestPrivate.h',
431                 'src/WebURLResponse.cpp',
432                 'src/WebURLResponsePrivate.h',
433                 'src/WebURLError.cpp',
434                 'src/WebViewImpl.cpp',
435                 'src/WebViewImpl.h',
436                 'src/WebWorkerBase.cpp',
437                 'src/WebWorkerBase.h',
438                 'src/WebWorkerClientImpl.cpp',
439                 'src/WebWorkerClientImpl.h',
440                 'src/WebWorkerImpl.cpp',
441                 'src/WebWorkerImpl.h',
442                 'src/WrappedResourceRequest.h',
443                 'src/WrappedResourceResponse.h',
444                 'src/win/WebInputEventFactory.cpp',
445                 'src/win/WebScreenInfoFactory.cpp',
446             ],
447             'conditions': [
448                 ['inside_chromium_build==1 and OS=="win"', {
449                     'type': '<(component)',
450
451                     'conditions': [
452                         ['component=="shared_library"', {
453                             'defines': [
454                                 'WEBKIT_DLL',
455                                 'USING_V8_SHARED',
456                             ],
457                             'dependencies': [
458                                 '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
459                                 '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
460                                 '<(chromium_src_dir)/third_party/icu/icu.gyp:*',
461                                 '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
462                                 '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
463                                 '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
464                                 '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
465                                 '<(chromium_src_dir)/third_party/modp_b64/modp_b64.gyp:modp_b64',
466                                 '<(chromium_src_dir)/third_party/nss/nss.gyp:*',
467                                 '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
468                                 '<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib',
469                                 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
470                             ],
471                         }],
472                     ],
473                 }, {
474                     'type': '<(webkit_target_type)'
475                 }],
476                 ['OS=="linux" or OS=="freebsd"', {
477                     'dependencies': [
478                         '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
479                         '<(chromium_src_dir)/build/linux/system.gyp:gtk',
480                         '<(chromium_src_dir)/build/linux/system.gyp:x11',
481                     ],
482                     'include_dirs': [
483                         'public/x11',
484                         'public/gtk',
485                         'public/linux',
486                     ],
487                 }, { # else: OS!="linux" and OS!="freebsd"
488                     'sources/': [
489                         ['exclude', '/gtk/'],
490                         ['exclude', '/x11/'],
491                         ['exclude', '/linux/'],
492                     ],
493                 }],
494                 ['OS=="mac"', {
495                     'include_dirs': [
496                         'public/mac',
497                     ],
498                     'sources/': [
499                         ['exclude', 'Skia\\.cpp$'],
500                     ],
501                     'variables': {
502                         # FIXME: Turn on warnings on other platforms and for
503                         # other targets.
504                         'chromium_code': 1,
505                     }
506                 }, { # else: OS!="mac"
507                     'sources/': [
508                         ['exclude', '/mac/'],
509                         ['exclude', 'CG\\.cpp$'],
510                     ],
511                 }],
512                 ['OS=="win"', {
513                     'include_dirs': [
514                         'public/win',
515                     ],
516                 }, { # else: OS!="win"
517                     'sources/': [['exclude', '/win/']],
518                 }],
519                 ['"ENABLE_3D_CANVAS=1" in feature_defines', {
520                     # Conditionally compile in GLEW and our GraphicsContext3D implementation.
521                     'sources+': [
522                         'src/GraphicsContext3D.cpp',
523                         '<(chromium_src_dir)/third_party/glew/src/glew.c'
524                     ],
525                     'include_dirs+': [
526                         '<(chromium_src_dir)/third_party/glew/include'
527                     ],
528                     'defines+': [
529                         'GLEW_STATIC=1',
530                         'GLEW_NO_GLU=1',
531                     ],
532                     'conditions': [
533                         ['OS=="mac"', {
534                             'link_settings': {
535                                 'libraries': [
536                                     '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
537                                 ],
538                             },
539                         }],
540                     ],
541                 }],
542             ],
543         },
544         {
545             'target_name': 'webkit_unit_tests',
546             'conditions': [
547                 # FIXME: make webkit unit tests working for multi dll build.
548                 ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
549                     'type': 'none',
550                 }, {
551                     'type': 'executable',
552                     'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
553                     'dependencies': [
554                         'webkit',
555                         '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
556                         '<(chromium_src_dir)/testing/gtest.gyp:gtest',
557                         '<(chromium_src_dir)/base/base.gyp:base',
558                         '<(chromium_src_dir)/base/base.gyp:base_i18n',
559                         '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
560                     ],
561                     'include_dirs': [
562                         'public',
563                         'src',
564                     ],
565                     'sources': [
566                         'tests/DragImageTest.cpp',
567                         'tests/KeyboardTest.cpp',
568                         'tests/KURLTest.cpp',
569                         'tests/RunAllTests.cpp',
570                     ],
571                     'conditions': [
572                         ['OS=="win"', {
573                             'sources': [
574                                 # FIXME: Port PopupMenuTest to Linux and Mac.
575                                 'tests/PopupMenuTest.cpp',
576                                 'tests/TransparencyWinTest.cpp',
577                                 'tests/UniscribeHelperTest.cpp',
578                             ],
579                         }],
580                         ['OS=="mac"', {
581                             'sources!': [
582                                 # FIXME: Port DragImageTest to Mac.
583                                 'tests/DragImageTest.cpp',
584                             ],
585                         }],
586                     ],
587                 }],
588             ],
589         },
590         {
591             'target_name': 'ImageDiff',
592             'type': 'executable',
593             'dependencies': [
594                 'webkit',
595                 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
596                 '<(chromium_src_dir)/gfx/gfx.gyp:gfx',
597             ],
598             'include_dirs': [
599                 '../../JavaScriptCore',
600                 '<(DEPTH)',
601             ],
602             'sources': [
603                 '../../WebKitTools/DumpRenderTree/chromium/ImageDiff.cpp',
604             ],
605         },
606         {
607             'target_name': 'DumpRenderTree',
608             'type': 'executable',
609             'mac_bundle': 1,
610             'dependencies': [
611                 'ImageDiff',
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                     'conditions': [
645                         ['inside_chromium_build==1 and component=="shared_library"', {
646                             'sources': [
647                                 'src/ChromiumCurrentTime.cpp',
648                                 'src/ChromiumThreading.cpp',
649                             ],
650                             'include_dirs': [
651                                 'public',
652                             ],
653                             'dependencies': [
654                                 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
655                             ],
656                         }],
657                     ],
658                     'copies': [{
659                         'destination': '<(PRODUCT_DIR)',
660                         'files': ['<(ahem_path)'],
661                     }, {
662                         # This should really be done in the 'npapi_layout_test_plugin'
663                         # target, but the current VS generator handles 'copies'
664                         # settings as AdditionalDependencies, which means that
665                         # when it's over there, it tries to do the copy *before*
666                         # the file is built, instead of after.  We work around this
667                         # by attaching the copy here, since it depends on that
668                         # target.
669                         'destination': '<(PRODUCT_DIR)/plugins',
670                         'files': ['<(PRODUCT_DIR)/npapi_layout_test_plugin.dll'],
671                     }],
672                 },{ # OS!="win"
673                     'sources/': [
674                         ['exclude', 'Win\\.cpp$'],
675                     ],
676                     'actions': [
677                         {
678                             'action_name': 'repack_locale',
679                             'variables': {
680                                 'repack_path': '<(chromium_src_dir)/tools/data_pack/repack.py',
681                                 'pak_inputs': [
682                                     '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
683                                     '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
684                                     '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
685                                     '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
686                             ]},
687                             'inputs': [
688                                 '<(repack_path)',
689                                 '<@(pak_inputs)',
690                             ],
691                             'outputs': [
692                                 '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
693                             ],
694                             'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
695                             'process_outputs_as_mac_bundle_resources': 1,
696                         },
697                     ], # actions
698                 }],
699                 ['OS=="mac"', {
700                     'dependencies': ['LayoutTestHelper'],
701
702                     'mac_bundle_resources': [
703                         '<(ahem_path)',
704                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
705                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf',
706                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf',
707                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf',
708                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf',
709                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf',
710                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf',
711                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf',
712                         '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
713                         '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
714                     ],
715                     'copies': [{
716                         'destination': '<(PRODUCT_DIR)/DumpRenderTree.app/Contents/PlugIns/',
717                         'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'],
718                     }],
719                 },{ # OS!="mac"
720                     'sources/': [
721                         # .mm is already excluded by common.gypi
722                         ['exclude', 'Mac\\.cpp$'],
723                     ]
724                 }],
725                 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
726                     'copies': [{
727                         'destination': '<(PRODUCT_DIR)',
728                         'files': [
729                             '<(ahem_path)',
730                             '../../WebKitTools/DumpRenderTree/chromium/fonts.conf',
731                             '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
732                         ]
733                     }, {
734                         'destination': '<(PRODUCT_DIR)/plugins',
735                         'files': ['<(PRODUCT_DIR)/libnpapi_layout_test_plugin.so'],
736                     }],
737                 },{ # OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="solaris"
738                     'sources/': [
739                         ['exclude', '(Gtk|Linux)\\.cpp$']
740                     ]
741                 }],
742             ],
743         },
744     ], # targets
745     'conditions': [
746         ['OS=="win"', {
747             'targets': [{
748                 'target_name': 'LayoutTestHelper',
749                 'type': 'executable',
750                 'sources': ['../../WebKitTools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp'],
751             }],
752         }],
753         ['OS=="mac"', {
754             'targets': [
755                 {
756                     'target_name': 'LayoutTestHelper',
757                     'type': 'executable',
758                     'sources': ['../../WebKitTools/DumpRenderTree/chromium/LayoutTestHelper.mm'],
759                     'link_settings': {
760                         'libraries': [
761                             '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
762                         ],
763                     },
764                 },
765             ],
766         }],
767     ], # conditions
768 }
769
770 # Local Variables:
771 # tab-width:2
772 # indent-tabs-mode:nil
773 # End:
774 # vim: set expandtab tabstop=2 shiftwidth=2: