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