7099cdc213402c08d1d0c46f1fa92283062b38d8
[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 )
25
26 list(APPEND WebCore_SOURCES
27     editing/SmartReplace.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/geoclue/GeolocationProviderGeoclue1.cpp
41     platform/geoclue/GeolocationProviderGeoclue2.cpp
42
43     platform/graphics/GraphicsContext3DPrivate.cpp
44     platform/graphics/ImageSource.cpp
45     platform/graphics/OpenGLShims.cpp
46     platform/graphics/WOFFFileFormat.cpp
47
48     platform/graphics/cairo/BitmapImageCairo.cpp
49     platform/graphics/cairo/CairoUtilities.cpp
50     platform/graphics/cairo/DrawingBufferCairo.cpp
51     platform/graphics/cairo/FloatRectCairo.cpp
52     platform/graphics/cairo/FontCairo.cpp
53     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
54     platform/graphics/cairo/GradientCairo.cpp
55     platform/graphics/cairo/GraphicsContext3DCairo.cpp
56     platform/graphics/cairo/ImageBufferCairo.cpp
57     platform/graphics/cairo/ImageCairo.cpp
58     platform/graphics/cairo/IntRectCairo.cpp
59     platform/graphics/cairo/OwnPtrCairo.cpp
60     platform/graphics/cairo/PathCairo.cpp
61     platform/graphics/cairo/PatternCairo.cpp
62     platform/graphics/cairo/PlatformContextCairo.cpp
63     platform/graphics/cairo/PlatformPathCairo.cpp
64     platform/graphics/cairo/RefPtrCairo.cpp
65     platform/graphics/cairo/TransformationMatrixCairo.cpp
66
67     platform/graphics/freetype/FontCacheFreeType.cpp
68     platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
69     platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
70     platform/graphics/freetype/SimpleFontDataFreeType.cpp
71
72     platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
73     platform/graphics/gstreamer/GRefPtrGStreamer.cpp
74     platform/graphics/gstreamer/GStreamerUtilities.cpp
75     platform/graphics/gstreamer/ImageGStreamerCairo.cpp
76     platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
77     platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
78     platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
79     platform/graphics/gstreamer/MediaSourceGStreamer.cpp
80     platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp
81     platform/graphics/gstreamer/TextCombinerGStreamer.cpp
82     platform/graphics/gstreamer/TextSinkGStreamer.cpp
83     platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
84     platform/graphics/gstreamer/VideoSinkGStreamer.cpp
85     platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
86     platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp
87     platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
88
89     platform/graphics/harfbuzz/HarfBuzzFace.cpp
90     platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
91     platform/graphics/harfbuzz/HarfBuzzShaper.cpp
92
93     platform/graphics/opengl/Extensions3DOpenGL.cpp
94     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
95     platform/graphics/opengl/Extensions3DOpenGLES.cpp
96     platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
97     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
98     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
99
100     platform/graphics/opentype/OpenTypeVerticalData.cpp
101
102     platform/gtk/GamepadsGtk.cpp
103
104     platform/image-decoders/ImageDecoder.cpp
105
106     platform/image-decoders/cairo/ImageDecoderCairo.cpp
107
108     platform/image-decoders/gif/GIFImageDecoder.cpp
109     platform/image-decoders/gif/GIFImageReader.cpp
110
111     platform/image-decoders/ico/ICOImageDecoder.cpp
112
113     platform/image-decoders/jpeg/JPEGImageDecoder.cpp
114
115     platform/image-decoders/bmp/BMPImageDecoder.cpp
116     platform/image-decoders/bmp/BMPImageReader.cpp
117
118     platform/image-decoders/png/PNGImageDecoder.cpp
119
120     platform/image-decoders/webp/WEBPImageDecoder.cpp
121
122     platform/linux/GamepadDeviceLinux.cpp
123
124     platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
125
126     platform/network/soup/AuthenticationChallengeSoup.cpp
127     platform/network/soup/CertificateInfo.cpp
128     platform/network/soup/CookieJarSoup.cpp
129     platform/network/soup/CookieStorageSoup.cpp
130     platform/network/soup/CredentialStorageSoup.cpp
131     platform/network/soup/DNSSoup.cpp
132     platform/network/soup/NetworkStorageSessionSoup.cpp
133     platform/network/soup/ProxyServerSoup.cpp
134     platform/network/soup/ResourceErrorSoup.cpp
135     platform/network/soup/ResourceHandleSoup.cpp
136     platform/network/soup/ResourceRequestSoup.cpp
137     platform/network/soup/ResourceResponseSoup.cpp
138     platform/network/soup/SocketStreamHandleSoup.cpp
139     platform/network/soup/SoupNetworkSession.cpp
140     platform/network/soup/SynchronousLoaderClientSoup.cpp
141
142     platform/soup/SharedBufferSoup.cpp
143     platform/soup/URLSoup.cpp
144
145     platform/text/icu/UTextProvider.cpp
146     platform/text/icu/UTextProviderLatin1.cpp
147     platform/text/icu/UTextProviderUTF16.cpp
148     platform/text/LocaleICU.cpp
149     platform/text/TextCodecICU.cpp
150     platform/text/TextEncodingDetectorICU.cpp
151
152     platform/text/enchant/TextCheckerEnchant.cpp
153
154     platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp
155
156     platform/network/gtk/CredentialBackingStore.cpp
157
158     plugins/PluginPackageNone.cpp
159     plugins/PluginViewNone.cpp
160 )
161
162 list(APPEND WebCorePlatformGTK_SOURCES
163     accessibility/atk/AXObjectCacheAtk.cpp
164     accessibility/atk/AccessibilityObjectAtk.cpp
165     accessibility/atk/WebKitAccessibleHyperlink.cpp
166     accessibility/atk/WebKitAccessibleInterfaceAction.cpp
167     accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
168     accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
169     accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
170     accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
171     accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
172     accessibility/atk/WebKitAccessibleInterfaceImage.cpp
173     accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
174     accessibility/atk/WebKitAccessibleInterfaceTable.cpp
175     accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp
176     accessibility/atk/WebKitAccessibleInterfaceText.cpp
177     accessibility/atk/WebKitAccessibleInterfaceValue.cpp
178     accessibility/atk/WebKitAccessibleUtil.cpp
179     accessibility/atk/WebKitAccessibleWrapperAtk.cpp
180
181     editing/atk/FrameSelectionAtk.cpp
182
183     page/gtk/DragControllerGtk.cpp
184     page/gtk/EventHandlerGtk.cpp
185
186     platform/audio/gtk/AudioBusGtk.cpp
187
188     platform/cairo/WidgetBackingStoreCairo.cpp
189
190     platform/graphics/GLContext.cpp
191
192     platform/graphics/cairo/GraphicsContextCairo.cpp
193
194     platform/graphics/egl/GLContextEGL.cpp
195
196     platform/graphics/freetype/FontPlatformDataFreeType.cpp
197
198     platform/graphics/glx/GLContextGLX.cpp
199
200     platform/graphics/gtk/ColorGtk.cpp
201     platform/graphics/gtk/GdkCairoUtilities.cpp
202     platform/graphics/gtk/IconGtk.cpp
203     platform/graphics/gtk/ImageBufferGtk.cpp
204     platform/graphics/gtk/ImageGtk.cpp
205     platform/graphics/gtk/IntPointGtk.cpp
206     platform/graphics/gtk/IntRectGtk.cpp
207
208     platform/gtk/ClipboardUtilitiesGtk.cpp
209     platform/gtk/ContextMenuGtk.cpp
210     platform/gtk/ContextMenuItemGtk.cpp
211     platform/gtk/CursorGtk.cpp
212     platform/gtk/DataObjectGtk.cpp
213     platform/gtk/DragDataGtk.cpp
214     platform/gtk/DragIcon.cpp
215     platform/gtk/DragImageGtk.cpp
216     platform/gtk/ErrorsGtk.cpp
217     platform/gtk/EventLoopGtk.cpp
218     platform/gtk/FileSystemGtk.cpp
219     platform/gtk/GRefPtrGtk.cpp
220     platform/gtk/GtkClickCounter.cpp
221     platform/gtk/GtkDragAndDropHelper.cpp
222     platform/gtk/GtkInputMethodFilter.cpp
223     platform/gtk/GtkPluginWidget.cpp
224     platform/gtk/GtkPopupMenu.cpp
225     platform/gtk/GtkTouchContextHelper.cpp
226     platform/gtk/GtkUtilities.cpp
227     platform/gtk/GtkVersioning.c
228     platform/gtk/KeyBindingTranslator.cpp
229     platform/gtk/LanguageGtk.cpp
230     platform/gtk/LocalizedStringsGtk.cpp
231     platform/gtk/LoggingGtk.cpp
232     platform/gtk/MIMETypeRegistryGtk.cpp
233     platform/gtk/MainFrameScrollbarGtk.cpp
234     platform/gtk/PasteboardGtk.cpp
235     platform/gtk/PasteboardHelper.cpp
236     platform/gtk/PlatformKeyboardEventGtk.cpp
237     platform/gtk/PlatformMouseEventGtk.cpp
238     platform/gtk/PlatformScreenGtk.cpp
239     platform/gtk/PlatformWheelEventGtk.cpp
240     platform/gtk/RedirectedXCompositeWindow.cpp
241     platform/gtk/RenderThemeGtk.cpp
242     platform/gtk/ScrollbarThemeGtk.cpp
243     platform/gtk/SharedBufferGtk.cpp
244     platform/gtk/SharedTimerGtk.cpp
245     platform/gtk/SoundGtk.cpp
246     platform/gtk/TemporaryLinkStubs.cpp
247     platform/gtk/UserAgentGtk.cpp
248     platform/gtk/WebKitAuthenticationWidget.cpp
249     platform/gtk/WidgetBackingStoreGtkX11.cpp
250     platform/gtk/WidgetGtk.cpp
251 )
252
253 if (WTF_USE_GEOCLUE2)
254     list(APPEND WebCore_SOURCES
255         ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c
256     )
257     execute_process(COMMAND pkg-config --variable dbus_interface geoclue-2.0 OUTPUT_VARIABLE GEOCLUE_DBUS_INTERFACE)
258     add_custom_command(
259          OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.h
260          COMMAND gdbus-codegen --interface-prefix org.freedesktop.GeoClue2. --c-namespace Geoclue --generate-c-code ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface ${GEOCLUE_DBUS_INTERFACE}
261     )
262 endif ()
263
264 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
265     ${WEBCORE_DIR}/css/mediaControlsGtk.css
266 )
267
268 set(WebCore_USER_AGENT_SCRIPTS
269     ${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js
270     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js
271     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
272 )
273
274 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
275
276 list(APPEND WebCore_LIBRARIES
277     ${ATK_LIBRARIES}
278     ${CAIRO_LIBRARIES}
279     ${ENCHANT_LIBRARIES}
280     ${FONTCONFIG_LIBRARIES}
281     ${FREETYPE2_LIBRARIES}
282     ${GEOCLUE_LIBRARIES}
283     ${GLIB_GIO_LIBRARIES}
284     ${GLIB_GMODULE_LIBRARIES}
285     ${GLIB_GOBJECT_LIBRARIES}
286     ${GLIB_LIBRARIES}
287     ${GUDEV_LIBRARIES}
288     ${HARFBUZZ_LIBRARIES}
289     ${ICU_LIBRARIES}
290     ${JPEG_LIBRARIES}
291     ${LIBSECRET_LIBRARIES}
292     ${LIBSOUP_LIBRARIES}
293     ${LIBXML2_LIBRARIES}
294     ${LIBXSLT_LIBRARIES}
295     ${PNG_LIBRARIES}
296     ${SQLITE_LIBRARIES}
297     ${WEBP_LIBRARIES}
298     ${X11_X11_LIB}
299     ${X11_Xcomposite_LIB}
300     ${X11_Xdamage_LIB}
301     ${X11_Xrender_LIB}
302     ${X11_Xt_LIB}
303     ${ZLIB_LIBRARIES}
304 )
305
306 list(APPEND WebCore_INCLUDE_DIRECTORIES
307     ${ATK_INCLUDE_DIRS}
308     ${CAIRO_INCLUDE_DIRS}
309     ${ENCHANT_INCLUDE_DIRS}
310     ${FREETYPE2_INCLUDE_DIRS}
311     ${GEOCLUE_INCLUDE_DIRS}
312     ${GIO_UNIX_INCLUDE_DIRS}
313     ${GLIB_INCLUDE_DIRS}
314     ${GUDEV_INCLUDE_DIRS}
315     ${HARFBUZZ_INCLUDE_DIRS}
316     ${ICU_INCLUDE_DIRS}
317     ${LIBSECRET_INCLUDE_DIRS}
318     ${LIBSOUP_INCLUDE_DIRS}
319     ${LIBXML2_INCLUDE_DIR}
320     ${LIBXSLT_INCLUDE_DIR}
321     ${SQLITE_INCLUDE_DIR}
322     ${WEBP_INCLUDE_DIRS}
323     ${ZLIB_INCLUDE_DIRS}
324 )
325
326 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
327     list(APPEND WebCore_INCLUDE_DIRECTORIES
328         ${WEBCORE_DIR}/platform/graphics/gstreamer
329         ${GSTREAMER_INCLUDE_DIRS}
330         ${GSTREAMER_BASE_INCLUDE_DIRS}
331         ${GSTREAMER_APP_INCLUDE_DIRS}
332         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
333     )
334
335     list(APPEND WebCore_LIBRARIES
336         ${GSTREAMER_APP_LIBRARIES}
337         ${GSTREAMER_BASE_LIBRARIES}
338         ${GSTREAMER_LIBRARIES}
339         ${GSTREAMER_PBUTILS_LIBRARIES}
340     )
341     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
342     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
343 endif ()
344
345 if (ENABLE_VIDEO)
346     list(APPEND WebCore_INCLUDE_DIRECTORIES
347         ${GSTREAMER_TAG_INCLUDE_DIRS}
348         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
349     )
350     list(APPEND WebCore_LIBRARIES
351         ${GSTREAMER_TAG_LIBRARIES}
352         ${GSTREAMER_VIDEO_LIBRARIES}
353     )
354
355     if (USE_GSTREAMER_MPEGTS)
356         list(APPEND WebCore_INCLUDE_DIRECTORIES
357             ${GSTREAMER_MPEGTS_INCLUDE_DIRS}
358         )
359
360         list(APPEND WebCore_LIBRARIES
361             ${GSTREAMER_MPEGTS_LIBRARIES}
362         )
363     endif ()
364 endif ()
365
366 if (ENABLE_WEB_AUDIO)
367     list(APPEND WebCore_INCLUDE_DIRECTORIES
368         ${WEBCORE_DIR}/platform/audio/gstreamer
369         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
370         ${GSTREAMER_FFT_INCLUDE_DIRS}
371     )
372     list(APPEND WebCore_LIBRARIES
373         ${GSTREAMER_AUDIO_LIBRARIES}
374         ${GSTREAMER_FFT_LIBRARIES}
375     )
376 endif ()
377
378 if (ENABLE_TEXTURE_MAPPER)
379     list(APPEND WebCore_INCLUDE_DIRECTORIES
380         "${WEBCORE_DIR}/platform/graphics/texmap"
381     )
382     list(APPEND WebCore_SOURCES
383         platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
384         platform/graphics/texmap/TextureMapperGL.cpp
385         platform/graphics/texmap/TextureMapperShaderProgram.cpp
386     )
387 endif ()
388
389 if (WTF_USE_EGL)
390     list(APPEND WebCore_LIBRARIES
391         ${EGL_LIBRARY}
392     )
393 endif ()
394
395 if (ENABLE_PLUGIN_PROCESS_GTK2)
396     # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
397     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
398     # for the plugin process.
399     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
400     add_dependencies(WebCorePlatformGTK2 WebCore)
401     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK2)
402     set_property(TARGET WebCorePlatformGTK2
403         APPEND
404         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
405     )
406     set_property(
407         TARGET WebCorePlatformGTK2
408         APPEND
409         PROPERTY INCLUDE_DIRECTORIES
410             ${WebCore_INCLUDE_DIRECTORIES}
411             ${GTK2_INCLUDE_DIRS}
412             ${GDK2_INCLUDE_DIRS}
413     )
414     target_link_libraries(WebCorePlatformGTK2
415          ${WebCore_LIBRARIES}
416          ${GTK2_LIBRARIES}
417          ${GDK2_LIBRARIES}
418     )
419 endif ()
420
421 # Wayland protocol extension.
422 add_custom_command(
423     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
424     DEPENDS ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml
425     COMMAND wayland-scanner server-header < ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml > ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandServerProtocol.h
426     COMMAND wayland-scanner client-header < ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml > ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.h
427     COMMAND wayland-scanner code < ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml > ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
428 )
429
430 if (ENABLE_WAYLAND_TARGET)
431     list(APPEND WebCorePlatformGTK_SOURCES
432         platform/graphics/wayland/WaylandEventSource.cpp
433         platform/graphics/wayland/WaylandSurface.cpp
434
435         ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
436     )
437 endif ()
438
439 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
440 add_dependencies(WebCorePlatformGTK WebCore)
441 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
442 set_property(
443     TARGET WebCorePlatformGTK
444     APPEND
445     PROPERTY INCLUDE_DIRECTORIES
446         ${WebCore_INCLUDE_DIRECTORIES}
447         ${GTK_INCLUDE_DIRS}
448         ${GDK_INCLUDE_DIRS}
449 )
450 target_link_libraries(WebCorePlatformGTK
451     ${WebCore_LIBRARIES}
452     ${GTK_LIBRARIES}
453     ${GDK_LIBRARIES}
454 )
455
456 include_directories(
457     ${WebCore_INCLUDE_DIRECTORIES}
458     "${DERIVED_SOURCES_DIR}"
459     "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
460 )
461
462 list(APPEND GObjectDOMBindings_SOURCES
463     bindings/gobject/ConvertToUTF8String.cpp
464     bindings/gobject/DOMObjectCache.cpp
465     bindings/gobject/GObjectEventListener.cpp
466     bindings/gobject/GObjectNodeFilterCondition.cpp
467     bindings/gobject/GObjectXPathNSResolver.cpp
468     bindings/gobject/WebKitDOMCustom.cpp
469     bindings/gobject/WebKitDOMEventTarget.cpp
470     bindings/gobject/WebKitDOMHTMLPrivate.cpp
471     bindings/gobject/WebKitDOMNodeFilter.cpp
472     bindings/gobject/WebKitDOMObject.cpp
473     bindings/gobject/WebKitDOMPrivate.cpp
474     bindings/gobject/WebKitDOMXPathNSResolver.cpp
475     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
476     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
477     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
478 )
479
480 list(APPEND GObjectDOMBindingsStable_IDL_FILES
481     css/CSSRule.idl
482     css/CSSRuleList.idl
483     css/CSSStyleDeclaration.idl
484     css/CSSStyleSheet.idl
485     css/CSSValue.idl
486     css/MediaList.idl
487     css/StyleSheet.idl
488     css/StyleSheetList.idl
489
490     dom/Attr.idl
491     dom/CDATASection.idl
492     dom/CharacterData.idl
493     dom/Comment.idl
494     dom/DOMImplementation.idl
495     dom/Document.idl
496     dom/DocumentFragment.idl
497     dom/DocumentType.idl
498     dom/Element.idl
499     dom/EntityReference.idl
500     dom/Event.idl
501     dom/KeyboardEvent.idl
502     dom/MouseEvent.idl
503     dom/NamedNodeMap.idl
504     dom/Node.idl
505     dom/NodeIterator.idl
506     dom/NodeList.idl
507     dom/ProcessingInstruction.idl
508     dom/Range.idl
509     dom/Text.idl
510     dom/TreeWalker.idl
511     dom/UIEvent.idl
512     dom/WheelEvent.idl
513
514     fileapi/Blob.idl
515     fileapi/File.idl
516     fileapi/FileList.idl
517
518     html/HTMLAnchorElement.idl
519     html/HTMLAppletElement.idl
520     html/HTMLAreaElement.idl
521     html/HTMLBRElement.idl
522     html/HTMLBaseElement.idl
523     html/HTMLBaseFontElement.idl
524     html/HTMLBodyElement.idl
525     html/HTMLButtonElement.idl
526     html/HTMLCanvasElement.idl
527     html/HTMLCollection.idl
528     html/HTMLDListElement.idl
529     html/HTMLDirectoryElement.idl
530     html/HTMLDivElement.idl
531     html/HTMLDocument.idl
532     html/HTMLElement.idl
533     html/HTMLEmbedElement.idl
534     html/HTMLFieldSetElement.idl
535     html/HTMLFontElement.idl
536     html/HTMLFormElement.idl
537     html/HTMLFrameElement.idl
538     html/HTMLFrameSetElement.idl
539     html/HTMLHRElement.idl
540     html/HTMLHeadElement.idl
541     html/HTMLHeadingElement.idl
542     html/HTMLHtmlElement.idl
543     html/HTMLIFrameElement.idl
544     html/HTMLImageElement.idl
545     html/HTMLInputElement.idl
546     html/HTMLLIElement.idl
547     html/HTMLLabelElement.idl
548     html/HTMLLegendElement.idl
549     html/HTMLLinkElement.idl
550     html/HTMLMapElement.idl
551     html/HTMLMarqueeElement.idl
552     html/HTMLMenuElement.idl
553     html/HTMLMetaElement.idl
554     html/HTMLModElement.idl
555     html/HTMLOListElement.idl
556     html/HTMLObjectElement.idl
557     html/HTMLOptGroupElement.idl
558     html/HTMLOptionElement.idl
559     html/HTMLOptionsCollection.idl
560     html/HTMLParagraphElement.idl
561     html/HTMLParamElement.idl
562     html/HTMLPreElement.idl
563     html/HTMLQuoteElement.idl
564     html/HTMLScriptElement.idl
565     html/HTMLSelectElement.idl
566     html/HTMLStyleElement.idl
567     html/HTMLTableCaptionElement.idl
568     html/HTMLTableCellElement.idl
569     html/HTMLTableColElement.idl
570     html/HTMLTableElement.idl
571     html/HTMLTableRowElement.idl
572     html/HTMLTableSectionElement.idl
573     html/HTMLTextAreaElement.idl
574     html/HTMLTitleElement.idl
575     html/HTMLUListElement.idl
576
577     page/DOMWindow.idl
578
579     xml/XPathExpression.idl
580     xml/XPathResult.idl
581 )
582
583 list(APPEND GObjectDOMBindingsUnstable_IDL_FILES
584     Modules/battery/BatteryManager.idl
585
586     Modules/gamepad/deprecated/Gamepad.idl
587     Modules/gamepad/deprecated/GamepadList.idl
588
589     Modules/geolocation/Geolocation.idl
590
591     Modules/mediasource/VideoPlaybackQuality.idl
592
593     Modules/quota/StorageInfo.idl
594     Modules/quota/StorageQuota.idl
595
596     Modules/speech/DOMWindowSpeechSynthesis.idl
597     Modules/speech/SpeechSynthesis.idl
598     Modules/speech/SpeechSynthesisEvent.idl
599     Modules/speech/SpeechSynthesisUtterance.idl
600     Modules/speech/SpeechSynthesisVoice.idl
601
602     Modules/webdatabase/Database.idl
603
604     css/DOMWindowCSS.idl
605     css/MediaQueryList.idl
606     css/StyleMedia.idl
607
608     dom/DOMNamedFlowCollection.idl
609     dom/DOMStringList.idl
610     dom/DOMStringMap.idl
611     dom/MessagePort.idl
612     dom/Touch.idl
613     dom/WebKitNamedFlow.idl
614
615     html/DOMSettableTokenList.idl
616     html/DOMTokenList.idl
617     html/HTMLDetailsElement.idl
618     html/HTMLKeygenElement.idl
619     html/HTMLMediaElement.idl
620     html/MediaController.idl
621     html/MediaError.idl
622     html/TimeRanges.idl
623     html/ValidityState.idl
624
625     loader/appcache/DOMApplicationCache.idl
626
627     page/BarProp.idl
628     page/DOMSecurityPolicy.idl
629     page/DOMSelection.idl
630     page/History.idl
631     page/Location.idl
632     page/Navigator.idl
633     page/Performance.idl
634     page/PerformanceEntry.idl
635     page/PerformanceEntryList.idl
636     page/PerformanceNavigation.idl
637     page/PerformanceTiming.idl
638     page/Screen.idl
639     page/WebKitPoint.idl
640
641     plugins/DOMMimeType.idl
642     plugins/DOMMimeTypeArray.idl
643     plugins/DOMPlugin.idl
644     plugins/DOMPluginArray.idl
645
646     storage/Storage.idl
647 )
648
649 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
650     list(APPEND GObjectDOMBindingsUnstable_IDL_FILES
651         html/HTMLAudioElement.idl
652         html/HTMLVideoElement.idl
653
654         html/track/AudioTrack.idl
655         html/track/AudioTrackList.idl
656         html/track/DataCue.idl
657         html/track/TextTrack.idl
658         html/track/TextTrackCue.idl
659         html/track/TextTrackCueList.idl
660         html/track/TextTrackList.idl
661         html/track/TrackEvent.idl
662         html/track/VTTCue.idl
663         html/track/VideoTrack.idl
664         html/track/VideoTrackList.idl
665     )
666 endif ()
667
668 if (ENABLE_QUOTA)
669     list(APPEND GObjectDOMBindingsUnstable_IDL_FILES
670         Modules/quota/DOMWindowQuota.idl
671         Modules/quota/NavigatorStorageQuota.idl
672         Modules/quota/StorageErrorCallback.idl
673         Modules/quota/StorageInfo.idl
674         Modules/quota/StorageQuota.idl
675         Modules/quota/StorageQuotaCallback.idl
676         Modules/quota/StorageUsageCallback.idl
677         Modules/quota/WorkerNavigatorStorageQuota.idl
678     )
679 endif ()
680
681 set(GObjectDOMBindingsStable_CLASS_LIST Custom EventTarget NodeFilter Object XPathNSResolver)
682 set(GObjectDOMBindingsStable_INSTALLED_HEADERS
683      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
684      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
685      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMCustom.h
686      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMEventTarget.h
687      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMNodeFilter.h
688      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMObject.h
689      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMXPathNSResolver.h
690 )
691
692 set(GObjectDOMBindingsUnstable_INSTALLED_HEADERS
693      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
694 )
695
696 foreach (file ${GObjectDOMBindingsStable_IDL_FILES})
697     get_filename_component(classname ${file} NAME_WE)
698     list(APPEND GObjectDOMBindingsStable_CLASS_LIST ${classname})
699     list(APPEND GObjectDOMBindingsStable_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
700     list(APPEND GObjectDOMBindingsUnstable_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}Unstable.h)
701 endforeach ()
702
703 foreach (file ${GObjectDOMBindingsUnstable_IDL_FILES})
704     get_filename_component(classname ${file} NAME_WE)
705     list(APPEND GObjectDOMBindingsUnstable_CLASS_LIST ${classname})
706     list(APPEND GObjectDOMBindingsUnstable_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
707 endforeach ()
708
709 set(GOBJECT_DOM_BINDINGS_FEATURES_DEFINES "LANGUAGE_GOBJECT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
710 string(REPLACE "ENABLE_INDEXED_DATABASE=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
711 string(REPLACE REGEX "ENABLE_SVG[A-Z_]+=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
712
713 file(MAKE_DIRECTORY ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR})
714
715 add_custom_command(
716     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
717     DEPENDS ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl
718     COMMAND echo ${GObjectDOMBindingsStable_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl defines > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
719 )
720
721 add_custom_command(
722     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
723     DEPENDS ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl
724     COMMAND echo ${GObjectDOMBindingsUnstable_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl defines-unstable > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
725 )
726
727 add_custom_command(
728     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
729     DEPENDS ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl
730     COMMAND echo ${GObjectDOMBindingsStable_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl gdom > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
731 )
732
733 add_custom_target(fake-installed-webkitdom-headers
734     COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/*.h ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
735 )
736
737 set(GObjectDOMBindings_IDL_FILES ${GObjectDOMBindingsStable_IDL_FILES} ${GObjectDOMBindingsUnstable_IDL_FILES})
738 GENERATE_BINDINGS(GObjectDOMBindings_SOURCES
739     "${GObjectDOMBindings_IDL_FILES}"
740     "${WEBCORE_DIR}"
741     "${IDL_INCLUDES}"
742     "${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES}"
743     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
744     WebKitDOM GObject cpp
745     ${IDL_ATTRIBUTES_FILE}
746     ${SUPPLEMENTAL_DEPENDENCY_FILE}
747     ${WINDOW_CONSTRUCTORS_FILE}
748     ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
749     ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
750     ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
751
752 add_definitions(-DBUILDING_WEBKIT)
753 add_definitions(-DWEBKIT_DOM_USE_UNSTABLE_API)
754
755 add_library(GObjectDOMBindings STATIC ${GObjectDOMBindings_SOURCES})
756
757 WEBKIT_SET_EXTRA_COMPILER_FLAGS(GObjectDOMBindings)
758
759 add_dependencies(GObjectDOMBindings
760     WebCore
761     fake-installed-webkitdom-headers
762 )
763
764 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkitdom.cfg
765     "[webkitdomgtk]\n"
766     "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
767     "namespace=webkit_dom\n"
768     "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
769     "       -I${WEBCORE_DIR}/bindings\n"
770     "       -I${WEBCORE_DIR}/bindings/gobject\n"
771     "       -I${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}\n"
772     "doc_dir=${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/docs\n"
773     "source_dirs=${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}\n"
774     "            ${WEBCORE_DIR}/bindings/gobject\n"
775     "headers=${GObjectDOMBindingsStable_INSTALLED_HEADERS}\n"
776 )
777
778 install(FILES ${GObjectDOMBindingsStable_INSTALLED_HEADERS}
779         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
780 )
781
782 # Make unstable header optional if they don't exist
783 install(FILES ${GObjectDOMBindingsUnstable_INSTALLED_HEADERS}
784         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
785         OPTIONAL
786 )
787
788 # Some installed headers are not on the list of headers used for gir generation.
789 set(GObjectDOMBindings_GIR_HEADERS ${GObjectDOMBindingsStable_INSTALLED_HEADERS})
790 list(REMOVE_ITEM GObjectDOMBindings_GIR_HEADERS
791      bindings/gobject/WebKitDOMEventTarget.h
792      bindings/gobject/WebKitDOMNodeFilter.h
793      bindings/gobject/WebKitDOMObject.h
794      bindings/gobject/WebKitDOMXPathNSResolver.h
795 )
796
797 # Propagate this variable to the parent scope, so that it can be used in other parts of the build.
798 set(GObjectDOMBindings_GIR_HEADERS ${GObjectDOMBindings_GIR_HEADERS} PARENT_SCOPE)
799
800 if (ENABLE_SUBTLE_CRYPTO)
801     list(APPEND WebCore_SOURCES
802         crypto/CryptoAlgorithm.cpp
803         crypto/CryptoAlgorithmDescriptionBuilder.cpp
804         crypto/CryptoAlgorithmRegistry.cpp
805         crypto/CryptoKey.cpp
806         crypto/CryptoKeyPair.cpp
807         crypto/SubtleCrypto.cpp
808         crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
809         crypto/algorithms/CryptoAlgorithmAES_KW.cpp
810         crypto/algorithms/CryptoAlgorithmHMAC.cpp
811         crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
812         crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
813         crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
814         crypto/algorithms/CryptoAlgorithmSHA1.cpp
815         crypto/algorithms/CryptoAlgorithmSHA224.cpp
816         crypto/algorithms/CryptoAlgorithmSHA256.cpp
817         crypto/algorithms/CryptoAlgorithmSHA384.cpp
818         crypto/algorithms/CryptoAlgorithmSHA512.cpp
819         crypto/keys/CryptoKeyAES.cpp
820         crypto/keys/CryptoKeyDataOctetSequence.cpp
821         crypto/keys/CryptoKeyDataRSAComponents.cpp
822         crypto/keys/CryptoKeyHMAC.cpp
823         crypto/keys/CryptoKeySerializationRaw.cpp
824
825         crypto/gtk/CryptoAlgorithmRegistryGtk.cpp
826         crypto/gtk/CryptoAlgorithmAES_CBCGtk.cpp
827         crypto/gtk/CryptoAlgorithmAES_KWGtk.cpp
828         crypto/gtk/CryptoAlgorithmHMACGtk.cpp
829         crypto/gtk/CryptoAlgorithmRSAES_PKCS1_v1_5Gtk.cpp
830         crypto/gtk/CryptoAlgorithmRSA_OAEPGtk.cpp
831         crypto/gtk/CryptoAlgorithmRSASSA_PKCS1_v1_5Gtk.cpp
832         crypto/gtk/CryptoDigestGtk.cpp
833         crypto/gtk/CryptoKeyRSAGtk.cpp
834         crypto/gtk/SerializedCryptoKeyWrapGtk.cpp
835     )
836
837     list(APPEND WebCore_INCLUDE_DIRECTORIES
838         ${GNUTLS_INCLUDE_DIRS}
839     )
840     list(APPEND WebCore_LIBRARIES
841         ${GNUTLS_LIBRARIES}
842     )
843 endif ()