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