df431fb40d638f62e885ddf98847bf4e800280e6
[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/SmartReplace.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/NetworkStorageSessionSoup.cpp
119     platform/network/soup/ProxyResolverSoup.cpp
120     platform/network/soup/ProxyServerSoup.cpp
121     platform/network/soup/ResourceErrorSoup.cpp
122     platform/network/soup/ResourceHandleSoup.cpp
123     platform/network/soup/ResourceRequestSoup.cpp
124     platform/network/soup/ResourceResponseSoup.cpp
125     platform/network/soup/SocketStreamHandleSoup.cpp
126     platform/network/soup/SoupNetworkSession.cpp
127     platform/network/soup/SynchronousLoaderClientSoup.cpp
128
129     platform/soup/SharedBufferSoup.cpp
130     platform/soup/URLSoup.cpp
131
132     platform/text/icu/UTextProvider.cpp
133     platform/text/icu/UTextProviderLatin1.cpp
134     platform/text/icu/UTextProviderUTF16.cpp
135     platform/text/LocaleICU.cpp
136     platform/text/TextCodecICU.cpp
137     platform/text/TextEncodingDetectorICU.cpp
138
139     platform/text/enchant/TextCheckerEnchant.cpp
140 )
141
142 list(APPEND WebCorePlatformGTK_SOURCES
143     accessibility/atk/AXObjectCacheAtk.cpp
144     accessibility/atk/AccessibilityObjectAtk.cpp
145     accessibility/atk/WebKitAccessibleHyperlink.cpp
146     accessibility/atk/WebKitAccessibleInterfaceAction.cpp
147     accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
148     accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
149     accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
150     accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
151     accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
152     accessibility/atk/WebKitAccessibleInterfaceImage.cpp
153     accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
154     accessibility/atk/WebKitAccessibleInterfaceTable.cpp
155     accessibility/atk/WebKitAccessibleInterfaceTableCell.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/GtkTouchContextHelper.cpp
206     platform/gtk/GtkUtilities.cpp
207     platform/gtk/GtkVersioning.c
208     platform/gtk/KeyBindingTranslator.cpp
209     platform/gtk/LanguageGtk.cpp
210     platform/gtk/LocalizedStringsGtk.cpp
211     platform/gtk/LoggingGtk.cpp
212     platform/gtk/MIMETypeRegistryGtk.cpp
213     platform/gtk/MainFrameScrollbarGtk.cpp
214     platform/gtk/PasteboardGtk.cpp
215     platform/gtk/PasteboardHelper.cpp
216     platform/gtk/PlatformKeyboardEventGtk.cpp
217     platform/gtk/PlatformMouseEventGtk.cpp
218     platform/gtk/PlatformScreenGtk.cpp
219     platform/gtk/PlatformWheelEventGtk.cpp
220     platform/gtk/PopupMenuGtk.cpp
221     platform/gtk/RedirectedXCompositeWindow.cpp
222     platform/gtk/RenderThemeGtk.cpp
223     platform/gtk/RenderThemeGtk2.cpp
224     platform/gtk/RenderThemeGtk3.cpp
225     platform/gtk/ScrollViewGtk.cpp
226     platform/gtk/ScrollbarThemeGtk.cpp
227     platform/gtk/ScrollbarThemeGtk2.cpp
228     platform/gtk/ScrollbarThemeGtk3.cpp
229     platform/gtk/SearchPopupMenuGtk.cpp
230     platform/gtk/SharedBufferGtk.cpp
231     platform/gtk/SharedTimerGtk.cpp
232     platform/gtk/SoundGtk.cpp
233     platform/gtk/TemporaryLinkStubs.cpp
234     platform/gtk/UserAgentGtk.cpp
235     platform/gtk/WebKitAuthenticationWidget.cpp
236     platform/gtk/WidgetBackingStoreGtkX11.cpp
237     platform/gtk/WidgetGtk.cpp
238     platform/gtk/WidgetRenderingContext.cpp
239
240     platform/network/gtk/CredentialBackingStore.cpp
241
242     platform/network/soup/AuthenticationChallengeSoup.cpp
243     platform/network/soup/CertificateInfo.cpp
244     platform/network/soup/CookieJarSoup.cpp
245     platform/network/soup/CookieStorageSoup.cpp
246     platform/network/soup/CredentialStorageSoup.cpp
247     platform/network/soup/DNSSoup.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/SynchronousLoaderClientSoup.cpp
257
258     platform/soup/SharedBufferSoup.cpp
259
260     platform/text/icu/UTextProvider.cpp
261     platform/text/icu/UTextProviderLatin1.cpp
262     platform/text/icu/UTextProviderUTF16.cpp
263     platform/text/LocaleICU.cpp
264     platform/text/TextCodecICU.cpp
265     platform/text/TextEncodingDetectorICU.cpp
266
267     platform/text/enchant/TextCheckerEnchant.cpp
268
269     platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp
270 )
271
272 if (ENABLE_NETSCAPE_PLUGIN_API)
273     list(APPEND WebCore_SOURCES
274         plugins/PluginDatabase.cpp
275         plugins/PluginDebug.cpp
276         plugins/PluginPackage.cpp
277         plugins/PluginStream.cpp
278         plugins/PluginView.cpp
279     )
280
281     list(APPEND WebCorePlatformGTK_SOURCES
282         plugins/gtk/PluginPackageGtk.cpp
283         plugins/gtk/PluginViewGtk.cpp
284         plugins/gtk/gtk2xtbin.c
285
286         plugins/x11/PluginViewX11.cpp
287     )
288 else ()
289     list(APPEND WebCore_SOURCES
290         plugins/PluginPackageNone.cpp
291         plugins/PluginViewNone.cpp
292     )
293 endif ()
294
295 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
296     ${WEBCORE_DIR}/css/mediaControlsGtk.css
297 )
298
299 set(WebCore_USER_AGENT_SCRIPTS
300     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js
301     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
302 )
303
304 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
305
306 list(APPEND WebCore_LIBRARIES
307     ${ATK_LIBRARIES}
308     ${CAIRO_LIBRARIES}
309     ${ENCHANT_LIBRARIES}
310     ${FONTCONFIG_LIBRARIES}
311     ${FREETYPE_LIBRARIES}
312     ${GEOCLUE_LIBRARIES}
313     ${GLIB_GIO_LIBRARIES}
314     ${GLIB_GMODULE_LIBRARIES}
315     ${GLIB_GOBJECT_LIBRARIES}
316     ${GLIB_LIBRARIES}
317     ${GUDEV_LIBRARIES}
318     ${HARFBUZZ_LIBRARIES}
319     ${ICU_LIBRARIES}
320     ${JPEG_LIBRARIES}
321     ${LIBSOUP_LIBRARIES}
322     ${LIBXML2_LIBRARIES}
323     ${LIBXSLT_LIBRARIES}
324     ${PNG_LIBRARIES}
325     ${SQLITE_LIBRARIES}
326     ${WEBP_LIBRARIES}
327     ${X11_X11_LIB}
328     ${X11_Xcomposite_LIB}
329     ${X11_Xdamage_LIB}
330     ${X11_Xrender_LIB}
331     ${XT_LIBRARIES}
332     ${ZLIB_LIBRARIES}
333 )
334
335 list(APPEND WebCore_INCLUDE_DIRECTORIES
336     ${ATK_INCLUDE_DIRS}
337     ${CAIRO_INCLUDE_DIRS}
338     ${ENCHANT_INCLUDE_DIRS}
339     ${FREETYPE_INCLUDE_DIRS}
340     ${GEOCLUE_INCLUDE_DIRS}
341     ${GIO_UNIX_INCLUDE_DIRS}
342     ${GLIB_INCLUDE_DIRS}
343     ${GUDEV_INCLUDE_DIRS}
344     ${HARFBUZZ_INCLUDE_DIRS}
345     ${ICU_INCLUDE_DIRS}
346     ${LIBSOUP_INCLUDE_DIRS}
347     ${LIBXML2_INCLUDE_DIR}
348     ${LIBXSLT_INCLUDE_DIR}
349     ${SQLITE_INCLUDE_DIR}
350     ${WEBP_INCLUDE_DIRS}
351     ${XT_INCLUDE_DIRS}
352     ${ZLIB_INCLUDE_DIRS}
353 )
354
355 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
356     list(APPEND WebCore_INCLUDE_DIRECTORIES
357         ${WEBCORE_DIR}/platform/graphics/gstreamer
358         ${GSTREAMER_INCLUDE_DIRS}
359         ${GSTREAMER_BASE_INCLUDE_DIRS}
360         ${GSTREAMER_APP_INCLUDE_DIRS}
361         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
362     )
363
364     list(APPEND WebCore_LIBRARIES
365         ${GSTREAMER_APP_LIBRARIES}
366         ${GSTREAMER_BASE_LIBRARIES}
367         ${GSTREAMER_LIBRARIES}
368         ${GSTREAMER_PBUTILS_LIBRARIES}
369     )
370     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
371     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
372 endif ()
373
374 if (ENABLE_VIDEO)
375     list(APPEND WebCore_INCLUDE_DIRECTORIES
376         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
377     )
378     list(APPEND WebCore_LIBRARIES
379         ${GSTREAMER_VIDEO_LIBRARIES}
380     )
381 endif ()
382
383 if (ENABLE_WEB_AUDIO)
384     list(APPEND WebCore_INCLUDE_DIRECTORIES
385         ${WEBCORE_DIR}/platform/audio/gstreamer
386         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
387         ${GSTREAMER_FFT_INCLUDE_DIRS}
388     )
389     list(APPEND WebCore_LIBRARIES
390         ${GSTREAMER_AUDIO_LIBRARIES}
391         ${GSTREAMER_FFT_LIBRARIES}
392     )
393 endif ()
394
395 if (ENABLE_TEXTURE_MAPPER)
396     list(APPEND WebCore_INCLUDE_DIRECTORIES
397         "${WEBCORE_DIR}/platform/graphics/texmap"
398     )
399     list(APPEND WebCore_SOURCES
400         platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
401         platform/graphics/texmap/TextureMapperGL.cpp
402         platform/graphics/texmap/TextureMapperShaderProgram.cpp
403     )
404 endif ()
405
406 if (WTF_USE_EGL)
407     list(APPEND WebCore_LIBRARIES
408         ${EGL_LIBRARY}
409     )
410 endif ()
411
412 install(FILES "${WEBCORE_DIR}/Resources/textAreaResizeCorner.png"
413               "${WEBCORE_DIR}/Resources/nullPlugin.png"
414               "${WEBCORE_DIR}/Resources/urlIcon.png"
415               "${WEBCORE_DIR}/Resources/missingImage.png"
416               "${WEBCORE_DIR}/Resources/panIcon.png"
417               "${WEBCORE_DIR}/Resources/deleteButton.png"
418               "${WEBCORE_DIR}/Resources/inputSpeech.png"
419         DESTINATION "${DATA_INSTALL_DIR}/images"
420 )
421
422 if (ENABLE_WEB_AUDIO)
423     install(FILES "${WEBCORE_DIR}/platform/audio/resources/Composite.wav"
424             DESTINATION "${DATA_INSTALL_DIR}/resources/audio"
425     )
426 endif ()
427
428 if (ENABLE_WEBKIT2)
429     # WebKit2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
430     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
431     # for the plugin process.
432     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
433     add_dependencies(WebCorePlatformGTK2 WebCore)
434     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK2)
435     set_property(TARGET WebCorePlatformGTK2
436         APPEND
437         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
438     )
439     set_property(
440         TARGET WebCorePlatformGTK2
441         APPEND
442         PROPERTY INCLUDE_DIRECTORIES
443             ${WebCore_INCLUDE_DIRECTORIES}
444             ${GTK2_INCLUDE_DIRS}
445             ${GDK2_INCLUDE_DIRS}
446     )
447     target_link_libraries(WebCorePlatformGTK2
448          ${WebCore_LIBRARIES}
449          ${GTK2_LIBRARIES}
450          ${GDK2_LIBRARIES}
451     )
452 endif ()
453
454 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
455 add_dependencies(WebCorePlatformGTK WebCore)
456 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
457 set_property(
458     TARGET WebCorePlatformGTK
459     APPEND
460     PROPERTY INCLUDE_DIRECTORIES
461         ${WebCore_INCLUDE_DIRECTORIES}
462         ${GTK_INCLUDE_DIRS}
463         ${GDK_INCLUDE_DIRS}
464 )
465 target_link_libraries(WebCorePlatformGTK
466     WebCore
467     ${WebCore_LIBRARIES}
468     ${GTK_LIBRARIES}
469     ${GDK_LIBRARIES}
470 )
471
472 include_directories(
473     "${WebCore_INCLUDE_DIRECTORIES}"
474     "${DERIVED_SOURCES_DIR}"
475     "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
476 )
477
478 list(APPEND GObjectDOMBindings_SOURCES
479     bindings/gobject/ConvertToUTF8String.cpp
480     bindings/gobject/DOMObjectCache.cpp
481     bindings/gobject/GObjectEventListener.cpp
482     bindings/gobject/WebKitDOMCustom.cpp
483     bindings/gobject/WebKitDOMDeprecated.cpp
484     bindings/gobject/WebKitDOMEventTarget.cpp
485     bindings/gobject/WebKitDOMHTMLPrivate.cpp
486     bindings/gobject/WebKitDOMObject.cpp
487     bindings/gobject/WebKitDOMPrivate.cpp
488     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
489     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
490 )
491
492 list(APPEND GObjectDOMBindings_IDL_FILES
493     Modules/battery/BatteryManager.idl
494     Modules/gamepad/Gamepad.idl
495     Modules/gamepad/GamepadList.idl
496     Modules/geolocation/Geolocation.idl
497     Modules/mediasource/VideoPlaybackQuality.idl
498     Modules/quota/StorageInfo.idl
499     Modules/quota/StorageQuota.idl
500     Modules/webdatabase/Database.idl
501
502     css/CSSRule.idl
503     css/CSSRuleList.idl
504     css/CSSStyleDeclaration.idl
505     css/CSSStyleSheet.idl
506     css/CSSValue.idl
507     css/DOMWindowCSS.idl
508     css/MediaList.idl
509     css/MediaQueryList.idl
510     css/StyleMedia.idl
511     css/StyleSheet.idl
512     css/StyleSheetList.idl
513
514     dom/Attr.idl
515     dom/CDATASection.idl
516     dom/CharacterData.idl
517     dom/Comment.idl
518     dom/DOMImplementation.idl
519     dom/DOMNamedFlowCollection.idl
520     dom/DOMStringList.idl
521     dom/DOMStringMap.idl
522     dom/Document.idl
523     dom/DocumentFragment.idl
524     dom/DocumentType.idl
525     dom/Element.idl
526     dom/EntityReference.idl
527     dom/Event.idl
528     dom/KeyboardEvent.idl
529     dom/MessagePort.idl
530     dom/MouseEvent.idl
531     dom/NamedNodeMap.idl
532     dom/Node.idl
533     dom/NodeFilter.idl
534     dom/NodeIterator.idl
535     dom/NodeList.idl
536     dom/ProcessingInstruction.idl
537     dom/Range.idl
538     dom/Text.idl
539     dom/Touch.idl
540     dom/TreeWalker.idl
541     dom/UIEvent.idl
542     dom/WebKitNamedFlow.idl
543     dom/WheelEvent.idl
544
545     fileapi/Blob.idl
546     fileapi/File.idl
547     fileapi/FileList.idl
548
549     html/DOMSettableTokenList.idl
550     html/DOMTokenList.idl
551     html/HTMLAnchorElement.idl
552     html/HTMLAppletElement.idl
553     html/HTMLAreaElement.idl
554     html/HTMLBRElement.idl
555     html/HTMLBaseElement.idl
556     html/HTMLBaseFontElement.idl
557     html/HTMLBodyElement.idl
558     html/HTMLButtonElement.idl
559     html/HTMLCanvasElement.idl
560     html/HTMLCollection.idl
561     html/HTMLDListElement.idl
562     html/HTMLDetailsElement.idl
563     html/HTMLDirectoryElement.idl
564     html/HTMLDivElement.idl
565     html/HTMLDocument.idl
566     html/HTMLElement.idl
567     html/HTMLEmbedElement.idl
568     html/HTMLFieldSetElement.idl
569     html/HTMLFontElement.idl
570     html/HTMLFormElement.idl
571     html/HTMLFrameElement.idl
572     html/HTMLFrameSetElement.idl
573     html/HTMLHRElement.idl
574     html/HTMLHeadElement.idl
575     html/HTMLHeadingElement.idl
576     html/HTMLHtmlElement.idl
577     html/HTMLIFrameElement.idl
578     html/HTMLImageElement.idl
579     html/HTMLInputElement.idl
580     html/HTMLKeygenElement.idl
581     html/HTMLLIElement.idl
582     html/HTMLLabelElement.idl
583     html/HTMLLegendElement.idl
584     html/HTMLLinkElement.idl
585     html/HTMLMapElement.idl
586     html/HTMLMarqueeElement.idl
587     html/HTMLMediaElement.idl
588     html/HTMLMenuElement.idl
589     html/HTMLMetaElement.idl
590     html/HTMLModElement.idl
591     html/HTMLOListElement.idl
592     html/HTMLObjectElement.idl
593     html/HTMLOptGroupElement.idl
594     html/HTMLOptionElement.idl
595     html/HTMLOptionsCollection.idl
596     html/HTMLParagraphElement.idl
597     html/HTMLParamElement.idl
598     html/HTMLPreElement.idl
599     html/HTMLQuoteElement.idl
600     html/HTMLScriptElement.idl
601     html/HTMLSelectElement.idl
602     html/HTMLStyleElement.idl
603     html/HTMLTableCaptionElement.idl
604     html/HTMLTableCellElement.idl
605     html/HTMLTableColElement.idl
606     html/HTMLTableElement.idl
607     html/HTMLTableRowElement.idl
608     html/HTMLTableSectionElement.idl
609     html/HTMLTextAreaElement.idl
610     html/HTMLTitleElement.idl
611     html/HTMLUListElement.idl
612     html/MediaController.idl
613     html/MediaError.idl
614     html/TimeRanges.idl
615     html/ValidityState.idl
616
617     loader/appcache/DOMApplicationCache.idl
618
619     page/BarProp.idl
620     page/DOMSecurityPolicy.idl
621     page/DOMSelection.idl
622     page/DOMWindow.idl
623     page/History.idl
624     page/Location.idl
625     page/Navigator.idl
626     page/Performance.idl
627     page/PerformanceEntry.idl
628     page/PerformanceEntryList.idl
629     page/PerformanceNavigation.idl
630     page/PerformanceTiming.idl
631     page/Screen.idl
632     page/WebKitPoint.idl
633
634     plugins/DOMMimeType.idl
635     plugins/DOMMimeTypeArray.idl
636     plugins/DOMPlugin.idl
637     plugins/DOMPluginArray.idl
638
639     storage/Storage.idl
640
641     xml/XPathExpression.idl
642     xml/XPathNSResolver.idl
643     xml/XPathResult.idl
644 )
645
646 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
647     list(APPEND GObjectDOMBindings_IDL_FILES
648         html/HTMLAudioElement.idl
649         html/HTMLVideoElement.idl
650
651         html/track/AudioTrack.idl
652         html/track/AudioTrackList.idl
653         html/track/TextTrack.idl
654         html/track/TextTrackCue.idl
655         html/track/TextTrackCueList.idl
656         html/track/TextTrackList.idl
657         html/track/TrackEvent.idl
658         html/track/VideoTrack.idl
659         html/track/VideoTrackList.idl
660     )
661 endif ()
662
663 set(GObjectDOMBindings_CLASS_LIST Custom EventTarget Object Deprecated)
664 set(GObjectDOMBindings_INSTALLED_HEADERS
665      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
666      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
667      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMCustom.h
668      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMDeprecated.h
669      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMEventTarget.h
670      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMObject.h
671 )
672 file(GLOB GObjectDOMBindingsSymbolsFiles
673     "${WEBCORE_DIR}/bindings/gobject/WebKitDOM*.symbols"
674 )
675
676 foreach (file ${GObjectDOMBindings_IDL_FILES})
677     get_filename_component(classname ${file} NAME_WE)
678     list(APPEND GObjectDOMBindings_CLASS_LIST ${classname})
679     list(APPEND GObjectDOMBindings_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
680     list(APPEND GObjectDOMBindingsSymbolsFiles ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.symbols)
681 endforeach ()
682
683 set(GOBJECT_DOM_BINDINGS_FEATURES_DEFINES "LANGUAGE_GOBJECT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
684 string(REPLACE "ENABLE_INDEXED_DATABASE=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
685 string(REPLACE REGEX "ENABLE_SVG[A-Z_]+=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
686
687 file(MAKE_DIRECTORY ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR})
688
689 add_custom_command(
690     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
691     COMMAND echo ${GObjectDOMBindings_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl defines > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
692 )
693
694 add_custom_command(
695     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
696     COMMAND echo ${GObjectDOMBindings_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl gdom > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
697 )
698
699 add_custom_target(fake-installed-webkitdom-headers
700     COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/*.h ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
701 )
702
703 GENERATE_BINDINGS(GObjectDOMBindings_SOURCES
704     "${GObjectDOMBindings_IDL_FILES}"
705     "${WEBCORE_DIR}"
706     "${IDL_INCLUDES}"
707     "${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES}"
708     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
709     WebKitDOM GObject
710     ${IDL_ATTRIBUTES_FILE}
711     ${SUPPLEMENTAL_DEPENDENCY_FILE}
712     ${WINDOW_CONSTRUCTORS_FILE}
713     ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
714     ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
715     ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
716
717 add_definitions(-DBUILDING_WEBKIT)
718
719 add_library(GObjectDOMBindings STATIC ${GObjectDOMBindings_SOURCES})
720
721 WEBKIT_SET_EXTRA_COMPILER_FLAGS(GObjectDOMBindings)
722
723 add_dependencies(GObjectDOMBindings
724     WebCore
725     fake-installed-webkitdom-headers
726 )
727
728 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkitdom.cfg
729     "[webkitdomgtk]\n"
730     "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
731     "namespace=webkit_dom\n"
732     "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
733     "       -I${WEBCORE_DIR}/bindings\n"
734     "       -I${WEBCORE_DIR}/bindings/gobject\n"
735     "       -I${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}\n"
736     "doc_dir=${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/docs\n"
737     "source_dirs=${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}\n"
738     "            ${WEBCORE_DIR}/bindings/gobject\n"
739     "headers=${GObjectDOMBindings_INSTALLED_HEADERS}\n"
740 )
741
742 install(FILES ${GObjectDOMBindings_INSTALLED_HEADERS}
743         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
744 )
745
746 # Some installed headers are not on the list of headers used for gir generation.
747 set(GObjectDOMBindings_GIR_HEADERS ${GObjectDOMBindings_INSTALLED_HEADERS})
748 list(REMOVE_ITEM GObjectDOMBindings_GIR_HEADERS
749      bindings/gobject/WebKitDOMDeprecated.h
750      bindings/gobject/WebKitDOMEventTarget.h
751      bindings/gobject/WebKitDOMObject.h
752 )
753
754 # Propagate this variable to the parent scope, so that it can be used in other parts of the build.
755 set(GObjectDOMBindings_GIR_HEADERS ${GObjectDOMBindings_GIR_HEADERS} PARENT_SCOPE)