4c478dcca3ec9394c6bf81e8c86ef06ab85dc9be
[WebKit-https.git] / Source / WebCore / PlatformGTK.cmake
1 list(APPEND WebCore_INCLUDE_DIRECTORIES
2     "${WEBCORE_DIR}/accessibility/atk"
3     "${WEBCORE_DIR}/editing/atk"
4     "${WEBCORE_DIR}/page/gtk"
5     "${WEBCORE_DIR}/platform/cairo"
6     "${WEBCORE_DIR}/platform/gtk"
7     "${WEBCORE_DIR}/platform/graphics/cairo"
8     "${WEBCORE_DIR}/platform/graphics/egl"
9     "${WEBCORE_DIR}/platform/graphics/glx"
10     "${WEBCORE_DIR}/platform/graphics/gtk"
11     "${WEBCORE_DIR}/platform/graphics/freetype"
12     "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
13     "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
14     "${WEBCORE_DIR}/platform/graphics/opengl"
15     "${WEBCORE_DIR}/platform/graphics/opentype"
16     "${WEBCORE_DIR}/platform/linux"
17     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
18     "${WEBCORE_DIR}/platform/network/gtk"
19     "${WEBCORE_DIR}/platform/network/soup"
20     "${WEBCORE_DIR}/platform/text/gtk"
21     "${WEBCORE_DIR}/plugins/gtk"
22 )
23
24 list(APPEND WebCore_SOURCES
25     editing/SmartReplaceICU.cpp
26
27     html/shadow/MediaControlsGtk.cpp
28
29     loader/soup/CachedRawResourceSoup.cpp
30     loader/soup/SubresourceLoaderSoup.cpp
31
32     platform/Cursor.cpp
33     platform/PlatformStrategies.cpp
34
35     platform/audio/gstreamer/AudioDestinationGStreamer.cpp
36     platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
37     platform/audio/gstreamer/FFTFrameGStreamer.cpp
38     platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
39
40     platform/graphics/GraphicsContext3DPrivate.cpp
41     platform/graphics/OpenGLShims.cpp
42     platform/graphics/WOFFFileFormat.cpp
43
44     platform/graphics/cairo/BitmapImageCairo.cpp
45     platform/graphics/cairo/CairoUtilities.cpp
46     platform/graphics/cairo/DrawingBufferCairo.cpp
47     platform/graphics/cairo/FloatRectCairo.cpp
48     platform/graphics/cairo/FontCairo.cpp
49     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
50     platform/graphics/cairo/GradientCairo.cpp
51     platform/graphics/cairo/GraphicsContext3DCairo.cpp
52     platform/graphics/cairo/ImageBufferCairo.cpp
53     platform/graphics/cairo/ImageCairo.cpp
54     platform/graphics/cairo/IntRectCairo.cpp
55     platform/graphics/cairo/OwnPtrCairo.cpp
56     platform/graphics/cairo/PathCairo.cpp
57     platform/graphics/cairo/PatternCairo.cpp
58     platform/graphics/cairo/PlatformContextCairo.cpp
59     platform/graphics/cairo/PlatformPathCairo.cpp
60     platform/graphics/cairo/RefPtrCairo.cpp
61     platform/graphics/cairo/TileCairo.cpp
62     platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp
63     platform/graphics/cairo/TransformationMatrixCairo.cpp
64
65     platform/graphics/freetype/FontCacheFreeType.cpp
66     platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
67     platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
68     platform/graphics/freetype/SimpleFontDataFreeType.cpp
69
70     platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
71     platform/graphics/gstreamer/GRefPtrGStreamer.cpp
72     platform/graphics/gstreamer/GStreamerUtilities.cpp
73     platform/graphics/gstreamer/ImageGStreamerCairo.cpp
74     platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
75     platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
76     platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
77     platform/graphics/gstreamer/MediaSourceGStreamer.cpp
78     platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp
79     platform/graphics/gstreamer/TextCombinerGStreamer.cpp
80     platform/graphics/gstreamer/TextSinkGStreamer.cpp
81     platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
82     platform/graphics/gstreamer/VideoSinkGStreamer.cpp
83     platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
84     platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp
85     platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
86
87     platform/graphics/harfbuzz/HarfBuzzFace.cpp
88     platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
89     platform/graphics/harfbuzz/HarfBuzzShaper.cpp
90
91     platform/graphics/opengl/Extensions3DOpenGL.cpp
92     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
93     platform/graphics/opengl/Extensions3DOpenGLES.cpp
94     platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
95     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
96
97     platform/graphics/opentype/OpenTypeVerticalData.cpp
98
99     platform/image-decoders/cairo/ImageDecoderCairo.cpp
100
101     platform/linux/GamepadDeviceLinux.cpp
102
103     platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
104
105     platform/network/soup/AuthenticationChallengeSoup.cpp
106     platform/network/soup/CookieJarSoup.cpp
107     platform/network/soup/CookieStorageSoup.cpp
108     platform/network/soup/CredentialStorageSoup.cpp
109     platform/network/soup/DNSSoup.cpp
110     platform/network/soup/GOwnPtrSoup.cpp
111     platform/network/soup/NetworkStorageSessionSoup.cpp
112     platform/network/soup/ProxyResolverSoup.cpp
113     platform/network/soup/ProxyServerSoup.cpp
114     platform/network/soup/ResourceErrorSoup.cpp
115     platform/network/soup/ResourceHandleSoup.cpp
116     platform/network/soup/ResourceRequestSoup.cpp
117     platform/network/soup/ResourceResponseSoup.cpp
118     platform/network/soup/SocketStreamHandleSoup.cpp
119     platform/network/soup/SoupURIUtils.cpp
120     platform/network/soup/SynchronousLoaderClientSoup.cpp
121
122     platform/soup/SharedBufferSoup.cpp
123
124     platform/text/LocaleICU.cpp
125     platform/text/TextBreakIteratorICU.cpp
126     platform/text/TextCodecICU.cpp
127     platform/text/TextEncodingDetectorICU.cpp
128
129     platform/text/enchant/TextCheckerEnchant.cpp
130 )
131
132 list(APPEND WebCorePlatformGTK_SOURCES
133     accessibility/atk/AXObjectCacheAtk.cpp
134     accessibility/atk/AccessibilityObjectAtk.cpp
135     accessibility/atk/WebKitAccessibleHyperlink.cpp
136     accessibility/atk/WebKitAccessibleInterfaceAction.cpp
137     accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
138     accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
139     accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
140     accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
141     accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
142     accessibility/atk/WebKitAccessibleInterfaceImage.cpp
143     accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
144     accessibility/atk/WebKitAccessibleInterfaceTable.cpp
145     accessibility/atk/WebKitAccessibleInterfaceText.cpp
146     accessibility/atk/WebKitAccessibleInterfaceValue.cpp
147     accessibility/atk/WebKitAccessibleUtil.cpp
148     accessibility/atk/WebKitAccessibleWrapperAtk.cpp
149
150     editing/atk/FrameSelectionAtk.cpp
151
152     page/gtk/DragControllerGtk.cpp
153     page/gtk/EventHandlerGtk.cpp
154
155     platform/audio/gtk/AudioBusGtk.cpp
156
157     platform/cairo/WidgetBackingStoreCairo.cpp
158
159     platform/graphics/GLContext.cpp
160
161     platform/graphics/cairo/GraphicsContextCairo.cpp
162
163     platform/graphics/egl/GLContextEGL.cpp
164
165     platform/graphics/freetype/FontPlatformDataFreeType.cpp
166
167     platform/graphics/glx/GLContextGLX.cpp
168
169     platform/graphics/gtk/ColorGtk.cpp
170     platform/graphics/gtk/GdkCairoUtilities.cpp
171     platform/graphics/gtk/IconGtk.cpp
172     platform/graphics/gtk/ImageBufferGtk.cpp
173     platform/graphics/gtk/ImageGtk.cpp
174     platform/graphics/gtk/IntPointGtk.cpp
175     platform/graphics/gtk/IntRectGtk.cpp
176
177     platform/gtk/ClipboardUtilitiesGtk.cpp
178     platform/gtk/ContextMenuGtk.cpp
179     platform/gtk/ContextMenuItemGtk.cpp
180     platform/gtk/CursorGtk.cpp
181     platform/gtk/DataObjectGtk.cpp
182     platform/gtk/DragDataGtk.cpp
183     platform/gtk/DragIcon.cpp
184     platform/gtk/DragImageGtk.cpp
185     platform/gtk/ErrorsGtk.cpp
186     platform/gtk/EventLoopGtk.cpp
187     platform/gtk/FileSystemGtk.cpp
188     platform/gtk/GOwnPtrGtk.cpp
189     platform/gtk/GRefPtrGtk.cpp
190     platform/gtk/GamepadsGtk.cpp
191     platform/gtk/GtkClickCounter.cpp
192     platform/gtk/GtkDragAndDropHelper.cpp
193     platform/gtk/GtkInputMethodFilter.cpp
194     platform/gtk/GtkPluginWidget.cpp
195     platform/gtk/GtkPopupMenu.cpp
196     platform/gtk/GtkUtilities.cpp
197     platform/gtk/GtkVersioning.c
198     platform/gtk/KeyBindingTranslator.cpp
199     platform/gtk/LanguageGtk.cpp
200     platform/gtk/LocalizedStringsGtk.cpp
201     platform/gtk/LoggingGtk.cpp
202     platform/gtk/MIMETypeRegistryGtk.cpp
203     platform/gtk/MainFrameScrollbarGtk.cpp
204     platform/gtk/PasteboardGtk.cpp
205     platform/gtk/PasteboardHelper.cpp
206     platform/gtk/PlatformKeyboardEventGtk.cpp
207     platform/gtk/PlatformMouseEventGtk.cpp
208     platform/gtk/PlatformScreenGtk.cpp
209     platform/gtk/PlatformWheelEventGtk.cpp
210     platform/gtk/PopupMenuGtk.cpp
211     platform/gtk/RedirectedXCompositeWindow.cpp
212     platform/gtk/RenderThemeGtk.cpp
213     platform/gtk/RenderThemeGtk2.cpp
214     platform/gtk/RenderThemeGtk3.cpp
215     platform/gtk/ScrollViewGtk.cpp
216     platform/gtk/ScrollbarThemeGtk.cpp
217     platform/gtk/ScrollbarThemeGtk2.cpp
218     platform/gtk/ScrollbarThemeGtk3.cpp
219     platform/gtk/SearchPopupMenuGtk.cpp
220     platform/gtk/SharedBufferGtk.cpp
221     platform/gtk/SharedTimerGtk.cpp
222     platform/gtk/SoundGtk.cpp
223     platform/gtk/TemporaryLinkStubs.cpp
224     platform/gtk/UserAgentGtk.cpp
225     platform/gtk/WebKitAuthenticationWidget.cpp
226     platform/gtk/WidgetBackingStoreGtkX11.cpp
227     platform/gtk/WidgetGtk.cpp
228     platform/gtk/WidgetRenderingContext.cpp
229
230     platform/network/gtk/CredentialBackingStore.cpp
231
232     platform/network/soup/AuthenticationChallengeSoup.cpp
233     platform/network/soup/CertificateInfo.cpp
234     platform/network/soup/CookieJarSoup.cpp
235     platform/network/soup/CookieStorageSoup.cpp
236     platform/network/soup/CredentialStorageSoup.cpp
237     platform/network/soup/DNSSoup.cpp
238     platform/network/soup/GOwnPtrSoup.cpp
239     platform/network/soup/NetworkStorageSessionSoup.cpp
240     platform/network/soup/ProxyResolverSoup.cpp
241     platform/network/soup/ProxyServerSoup.cpp
242     platform/network/soup/ResourceErrorSoup.cpp
243     platform/network/soup/ResourceHandleSoup.cpp
244     platform/network/soup/ResourceRequestSoup.cpp
245     platform/network/soup/ResourceResponseSoup.cpp
246     platform/network/soup/SocketStreamHandleSoup.cpp
247     platform/network/soup/SoupURIUtils.cpp
248     platform/network/soup/SynchronousLoaderClientSoup.cpp
249
250     platform/soup/SharedBufferSoup.cpp
251
252     platform/text/LocaleICU.cpp
253     platform/text/TextBreakIteratorICU.cpp
254     platform/text/TextCodecICU.cpp
255     platform/text/TextEncodingDetectorICU.cpp
256
257     platform/text/enchant/TextCheckerEnchant.cpp
258
259     platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp
260 )
261
262 if (ENABLE_NETSCAPE_PLUGIN_API)
263     list(APPEND WebCore_SOURCES
264         plugins/PluginDatabase.cpp
265         plugins/PluginDebug.cpp
266         plugins/PluginPackage.cpp
267         plugins/PluginStream.cpp
268         plugins/PluginView.cpp
269     )
270
271     list(APPEND WebCorePlatformGTK_SOURCES
272         plugins/gtk/PluginPackageGtk.cpp
273         plugins/gtk/PluginViewGtk.cpp
274         plugins/gtk/gtk2xtbin.c
275     )
276 else ()
277     list(APPEND WebCore_SOURCES
278         plugins/PluginPackageNone.cpp
279         plugins/PluginViewNone.cpp
280     )
281 endif ()
282
283 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
284     ${WEBCORE_DIR}/css/mediaControlsGtk.css
285 )
286
287 list(APPEND WebCore_LIBRARIES
288     ${ATK_LIBRARIES}
289     ${CAIRO_LIBRARIES}
290     ${ENCHANT_LIBRARIES}
291     ${FONTCONFIG_LIBRARIES}
292     ${FREETYPE_LIBRARIES}
293     ${GLIB_GIO_LIBRARIES}
294     ${GLIB_GMODULE_LIBRARIES}
295     ${GLIB_GOBJECT_LIBRARIES}
296     ${GLIB_LIBRARIES}
297     ${HARFBUZZ_LIBRARIES}
298     ${ICU_LIBRARIES}
299     ${JPEG_LIBRARIES}
300     ${LIBSOUP_LIBRARIES}
301     ${LIBXML2_LIBRARIES}
302     ${LIBXSLT_LIBRARIES}
303     ${PNG_LIBRARIES}
304     ${SQLITE_LIBRARIES}
305     ${WEBP_LIBRARIES}
306     ${X11_X11_LIB}
307     ${X11_Xcomposite_LIB}
308     ${X11_Xdamage_LIB}
309     ${X11_Xrender_LIB}
310     ${XT_LIBRARIES}
311     ${ZLIB_LIBRARIES}
312 )
313
314 list(APPEND WebCore_INCLUDE_DIRECTORIES
315     ${ATK_INCLUDE_DIRS}
316     ${ENCHANT_INCLUDE_DIRS}
317     ${CAIRO_INCLUDE_DIRS}
318     ${FREETYPE_INCLUDE_DIRS}
319     ${ICU_INCLUDE_DIRS}
320     ${LIBXML2_INCLUDE_DIR}
321     ${LIBXSLT_INCLUDE_DIR}
322     ${SQLITE_INCLUDE_DIR}
323     ${GLIB_INCLUDE_DIRS}
324     ${LIBSOUP_INCLUDE_DIRS}
325     ${ZLIB_INCLUDE_DIRS}
326     ${HARFBUZZ_INCLUDE_DIRS}
327     ${WEBP_INCLUDE_DIRS}
328     ${XT_INCLUDE_DIRS}
329 )
330
331 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
332     list(APPEND WebCore_INCLUDE_DIRECTORIES
333         ${WEBCORE_DIR}/platform/graphics/gstreamer
334         ${GSTREAMER_INCLUDE_DIRS}
335         ${GSTREAMER_BASE_INCLUDE_DIRS}
336         ${GSTREAMER_APP_INCLUDE_DIRS}
337         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
338     )
339
340     list(APPEND WebCore_LIBRARIES
341         ${GSTREAMER_APP_LIBRARIES}
342         ${GSTREAMER_BASE_LIBRARIES}
343         ${GSTREAMER_LIBRARIES}
344         ${GSTREAMER_PBUTILS_LIBRARIES}
345     )
346     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
347     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
348 endif ()
349
350 if (ENABLE_VIDEO)
351     list(APPEND WebCore_INCLUDE_DIRECTORIES
352         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
353     )
354     list(APPEND WebCore_LIBRARIES
355         ${GSTREAMER_VIDEO_LIBRARIES}
356     )
357 endif ()
358
359 if (ENABLE_WEB_AUDIO)
360     list(APPEND WebCore_INCLUDE_DIRECTORIES
361         ${WEBCORE_DIR}/platform/audio/gstreamer
362         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
363         ${GSTREAMER_FFT_INCLUDE_DIRS}
364     )
365     list(APPEND WebCore_LIBRARIES
366         ${GSTREAMER_AUDIO_LIBRARIES}
367         ${GSTREAMER_FFT_LIBRARIES}
368     )
369 endif ()
370
371 if (ENABLE_TEXTURE_MAPPER)
372     list(APPEND WebCore_INCLUDE_DIRECTORIES
373         "${WEBCORE_DIR}/platform/graphics/texmap"
374     )
375     list(APPEND WebCore_SOURCES
376         platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
377         platform/graphics/texmap/TextureMapperGL.cpp
378         platform/graphics/texmap/TextureMapperShaderProgram.cpp
379     )
380 endif ()
381
382 if (WTF_USE_EGL)
383     list(APPEND WebCore_LIBRARIES
384         ${EGL_LIBRARY}
385     )
386 endif ()
387
388 install(FILES
389             "${WEBCORE_DIR}/Resources/textAreaResizeCorner.png"
390             "${WEBCORE_DIR}/Resources/nullPlugin.png"
391             "${WEBCORE_DIR}/Resources/urlIcon.png"
392             "${WEBCORE_DIR}/Resources/missingImage.png"
393             "${WEBCORE_DIR}/Resources/panIcon.png"
394             "${WEBCORE_DIR}/Resources/deleteButton.png"
395             "${WEBCORE_DIR}/Resources/inputSpeech.png"
396         DESTINATION
397             "${DATA_INSTALL_DIR}/images")
398
399 if (ENABLE_WEB_AUDIO)
400     install(FILES
401                 "${WEBCORE_DIR}/platform/audio/resources/Composite.wav"
402             DESTINATION
403                 "${DATA_INSTALL_DIR}/resources/audio")
404 endif ()
405
406 if (ENABLE_WEBKIT2)
407     # WebKit2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
408     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
409     # for the plugin process.
410     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
411     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK2)
412     set_property(TARGET WebCorePlatformGTK2
413         APPEND
414         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
415     )
416     set_property(
417         TARGET WebCorePlatformGTK2
418         APPEND
419         PROPERTY INCLUDE_DIRECTORIES
420             ${WebCore_INCLUDE_DIRECTORIES}
421             ${GTK2_INCLUDE_DIRS}
422             ${GDK2_INCLUDE_DIRS}
423     )
424     target_link_libraries(WebCorePlatformGTK2
425          ${WebCore_LIBRARIES}
426          ${GTK2_LIBRARIES}
427          ${GDK2_LIBRARIES}
428     )
429 endif ()
430
431 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
432 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
433 set_property(
434     TARGET WebCorePlatformGTK
435     APPEND
436     PROPERTY INCLUDE_DIRECTORIES
437         ${WebCore_INCLUDE_DIRECTORIES}
438         ${GTK3_INCLUDE_DIRS}
439         ${GDK3_INCLUDE_DIRS}
440 )
441 target_link_libraries(WebCorePlatformGTK
442     ${WebCore_LIBRARIES}
443     ${GTK3_LIBRARIES}
444     ${GDK3_LIBRARIES}
445 )
446
447 if (ENABLE_WEBKIT2)
448     include_directories(
449         "${WebCore_INCLUDE_DIRECTORIES}"
450         "${DERIVED_SOURCES_DIR}"
451         "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
452     )
453
454     list(APPEND GObjectDOMBindings_SOURCES
455         bindings/gobject/ConvertToUTF8String.cpp
456         bindings/gobject/DOMObjectCache.cpp
457         bindings/gobject/GObjectEventListener.cpp
458         bindings/gobject/WebKitDOMCustom.cpp
459         bindings/gobject/WebKitDOMEventTarget.cpp
460         bindings/gobject/WebKitDOMHTMLPrivate.cpp
461         bindings/gobject/WebKitDOMObject.cpp
462         bindings/gobject/WebKitDOMPrivate.cpp
463         ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
464         ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
465     )
466
467     list(APPEND GObjectDOMBindings_IDL_FILES
468         Modules/battery/BatteryManager.idl
469         Modules/gamepad/Gamepad.idl
470         Modules/gamepad/GamepadList.idl
471         Modules/geolocation/Geolocation.idl
472         Modules/mediasource/VideoPlaybackQuality.idl
473         Modules/quota/StorageInfo.idl
474         Modules/quota/StorageQuota.idl
475         Modules/webdatabase/Database.idl
476
477         css/CSSRule.idl
478         css/CSSRuleList.idl
479         css/CSSStyleDeclaration.idl
480         css/CSSStyleSheet.idl
481         css/CSSValue.idl
482         css/DOMWindowCSS.idl
483         css/MediaList.idl
484         css/MediaQueryList.idl
485         css/StyleMedia.idl
486         css/StyleSheet.idl
487         css/StyleSheetList.idl
488
489         dom/Attr.idl
490         dom/CDATASection.idl
491         dom/CharacterData.idl
492         dom/Comment.idl
493         dom/DOMImplementation.idl
494         dom/DOMNamedFlowCollection.idl
495         dom/DOMStringList.idl
496         dom/DOMStringMap.idl
497         dom/Document.idl
498         dom/DocumentFragment.idl
499         dom/DocumentType.idl
500         dom/Element.idl
501         dom/EntityReference.idl
502         dom/Event.idl
503         dom/KeyboardEvent.idl
504         dom/MessagePort.idl
505         dom/MouseEvent.idl
506         dom/NamedNodeMap.idl
507         dom/Node.idl
508         dom/NodeFilter.idl
509         dom/NodeIterator.idl
510         dom/NodeList.idl
511         dom/ProcessingInstruction.idl
512         dom/Range.idl
513         dom/ShadowRoot.idl
514         dom/Text.idl
515         dom/TreeWalker.idl
516         dom/UIEvent.idl
517         dom/WebKitNamedFlow.idl
518         dom/WheelEvent.idl
519
520         fileapi/Blob.idl
521         fileapi/File.idl
522         fileapi/FileList.idl
523
524         html/DOMSettableTokenList.idl
525         html/DOMTokenList.idl
526         html/HTMLAnchorElement.idl
527         html/HTMLAppletElement.idl
528         html/HTMLAreaElement.idl
529         html/HTMLBRElement.idl
530         html/HTMLBaseElement.idl
531         html/HTMLBaseFontElement.idl
532         html/HTMLBodyElement.idl
533         html/HTMLButtonElement.idl
534         html/HTMLCanvasElement.idl
535         html/HTMLCollection.idl
536         html/HTMLDListElement.idl
537         html/HTMLDetailsElement.idl
538         html/HTMLDirectoryElement.idl
539         html/HTMLDivElement.idl
540         html/HTMLDocument.idl
541         html/HTMLElement.idl
542         html/HTMLEmbedElement.idl
543         html/HTMLFieldSetElement.idl
544         html/HTMLFontElement.idl
545         html/HTMLFormElement.idl
546         html/HTMLFrameElement.idl
547         html/HTMLFrameSetElement.idl
548         html/HTMLHRElement.idl
549         html/HTMLHeadElement.idl
550         html/HTMLHeadingElement.idl
551         html/HTMLHtmlElement.idl
552         html/HTMLIFrameElement.idl
553         html/HTMLImageElement.idl
554         html/HTMLInputElement.idl
555         html/HTMLKeygenElement.idl
556         html/HTMLLIElement.idl
557         html/HTMLLabelElement.idl
558         html/HTMLLegendElement.idl
559         html/HTMLLinkElement.idl
560         html/HTMLMapElement.idl
561         html/HTMLMarqueeElement.idl
562         html/HTMLMediaElement.idl
563         html/HTMLMenuElement.idl
564         html/HTMLMetaElement.idl
565         html/HTMLModElement.idl
566         html/HTMLOListElement.idl
567         html/HTMLObjectElement.idl
568         html/HTMLOptGroupElement.idl
569         html/HTMLOptionElement.idl
570         html/HTMLOptionsCollection.idl
571         html/HTMLParagraphElement.idl
572         html/HTMLParamElement.idl
573         html/HTMLPreElement.idl
574         html/HTMLQuoteElement.idl
575         html/HTMLScriptElement.idl
576         html/HTMLSelectElement.idl
577         html/HTMLStyleElement.idl
578         html/HTMLTableCaptionElement.idl
579         html/HTMLTableCellElement.idl
580         html/HTMLTableColElement.idl
581         html/HTMLTableElement.idl
582         html/HTMLTableRowElement.idl
583         html/HTMLTableSectionElement.idl
584         html/HTMLTextAreaElement.idl
585         html/HTMLTitleElement.idl
586         html/HTMLUListElement.idl
587         html/MediaController.idl
588         html/MediaError.idl
589         html/TimeRanges.idl
590         html/ValidityState.idl
591
592         loader/appcache/DOMApplicationCache.idl
593
594         page/BarProp.idl
595         page/Console.idl
596         page/DOMSecurityPolicy.idl
597         page/DOMSelection.idl
598         page/DOMWindow.idl
599         page/History.idl
600         page/Location.idl
601         page/Navigator.idl
602         page/Performance.idl
603         page/PerformanceEntry.idl
604         page/PerformanceEntryList.idl
605         page/PerformanceNavigation.idl
606         page/PerformanceTiming.idl
607         page/Screen.idl
608         page/WebKitPoint.idl
609
610         plugins/DOMMimeType.idl
611         plugins/DOMMimeTypeArray.idl
612         plugins/DOMPlugin.idl
613         plugins/DOMPluginArray.idl
614
615         storage/Storage.idl
616
617         xml/XPathExpression.idl
618         xml/XPathNSResolver.idl
619         xml/XPathResult.idl
620     )
621
622     if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
623         list(APPEND GObjectDOMBindings_IDL_FILES
624             html/HTMLAudioElement.idl
625             html/HTMLVideoElement.idl
626
627             html/track/AudioTrack.idl
628             html/track/AudioTrackList.idl
629             html/track/TextTrack.idl
630             html/track/TextTrackCue.idl
631             html/track/TextTrackCueList.idl
632             html/track/TextTrackList.idl
633             html/track/TrackEvent.idl
634             html/track/VideoTrack.idl
635             html/track/VideoTrackList.idl
636         )
637     endif ()
638
639     set(GObjectDOMBindings_CLASS_LIST Custom EventTarget Object Deprecated)
640     set(GObjectDOMBindings_INSTALLED_HEADERS
641          ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
642          ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
643          ${WEBCORE_DIR}/bindings/gobject/WebKitDOMCustom.h
644     )
645
646     foreach (file ${GObjectDOMBindings_IDL_FILES})
647         get_filename_component(classname ${file} NAME_WE)
648         list(APPEND GObjectDOMBindings_CLASS_LIST ${classname})
649         list(APPEND GObjectDOMBindings_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
650     endforeach ()
651
652     # Propagate this variable to the parent scope, so that it can be used in other parts of the build.
653     set(GObjectDOMBindings_INSTALLED_HEADERS ${GObjectDOMBindings_INSTALLED_HEADERS} PARENT_SCOPE)
654
655     set(GOBJECT_DOM_BINDINGS_FEATURES_DEFINES "LANGUAGE_GOBJECT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
656     string(REPLACE "ENABLE_INDEXED_DATABASE=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
657     string(REPLACE REGEX "ENABLE_SVG[A-Z_]+=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
658
659     file(MAKE_DIRECTORY ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR})
660
661     add_custom_command(
662         OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
663         COMMAND echo ${GObjectDOMBindings_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl defines > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
664     )
665
666     add_custom_command(
667         OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
668         COMMAND echo ${GObjectDOMBindings_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl gdom > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
669     )
670
671     add_custom_target(fake-installed-webkitdom-headers
672         COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/* ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
673     )
674
675     GENERATE_BINDINGS(GObjectDOMBindings_SOURCES
676         "${GObjectDOMBindings_IDL_FILES}"
677         "${WEBCORE_DIR}"
678         "${IDL_INCLUDES}"
679         "${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES}"
680         ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
681         WebKitDOM GObject
682         ${IDL_ATTRIBUTES_FILE}
683         ${SUPPLEMENTAL_DEPENDENCY_FILE}
684         ${WINDOW_CONSTRUCTORS_FILE}
685         ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
686         ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
687         ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
688
689     add_definitions(-DBUILDING_WEBKIT)
690
691     add_library(GObjectDOMBindings STATIC ${GObjectDOMBindings_SOURCES})
692
693     WEBKIT_SET_EXTRA_COMPILER_FLAGS(GObjectDOMBindings)
694
695     add_dependencies(GObjectDOMBindings
696         WebCore
697         fake-installed-webkitdom-headers
698     )
699 endif ()
700