RenderThemeGtk depends on classes outside of platform
[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/ScrollbarThemeGtk.cpp
242     platform/gtk/SharedBufferGtk.cpp
243     platform/gtk/SharedTimerGtk.cpp
244     platform/gtk/SoundGtk.cpp
245     platform/gtk/TemporaryLinkStubs.cpp
246     platform/gtk/UserAgentGtk.cpp
247     platform/gtk/WebKitAuthenticationWidget.cpp
248     platform/gtk/WidgetBackingStoreGtkX11.cpp
249     platform/gtk/WidgetGtk.cpp
250
251     rendering/RenderThemeGtk.cpp
252 )
253
254 if (WTF_USE_GEOCLUE2)
255     list(APPEND WebCore_SOURCES
256         ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c
257     )
258     execute_process(COMMAND pkg-config --variable dbus_interface geoclue-2.0 OUTPUT_VARIABLE GEOCLUE_DBUS_INTERFACE)
259     add_custom_command(
260          OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.h
261          COMMAND gdbus-codegen --interface-prefix org.freedesktop.GeoClue2. --c-namespace Geoclue --generate-c-code ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface ${GEOCLUE_DBUS_INTERFACE}
262     )
263 endif ()
264
265 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
266     ${WEBCORE_DIR}/css/mediaControlsGtk.css
267 )
268
269 set(WebCore_USER_AGENT_SCRIPTS
270     ${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js
271     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js
272     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
273 )
274
275 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
276
277 list(APPEND WebCore_LIBRARIES
278     ${ATK_LIBRARIES}
279     ${CAIRO_LIBRARIES}
280     ${ENCHANT_LIBRARIES}
281     ${FONTCONFIG_LIBRARIES}
282     ${FREETYPE2_LIBRARIES}
283     ${GEOCLUE_LIBRARIES}
284     ${GLIB_GIO_LIBRARIES}
285     ${GLIB_GMODULE_LIBRARIES}
286     ${GLIB_GOBJECT_LIBRARIES}
287     ${GLIB_LIBRARIES}
288     ${GUDEV_LIBRARIES}
289     ${HARFBUZZ_LIBRARIES}
290     ${ICU_LIBRARIES}
291     ${JPEG_LIBRARIES}
292     ${LIBSECRET_LIBRARIES}
293     ${LIBSOUP_LIBRARIES}
294     ${LIBXML2_LIBRARIES}
295     ${LIBXSLT_LIBRARIES}
296     ${PNG_LIBRARIES}
297     ${SQLITE_LIBRARIES}
298     ${WEBP_LIBRARIES}
299     ${X11_X11_LIB}
300     ${X11_Xcomposite_LIB}
301     ${X11_Xdamage_LIB}
302     ${X11_Xrender_LIB}
303     ${X11_Xt_LIB}
304     ${ZLIB_LIBRARIES}
305 )
306
307 list(APPEND WebCore_INCLUDE_DIRECTORIES
308     ${ATK_INCLUDE_DIRS}
309     ${CAIRO_INCLUDE_DIRS}
310     ${ENCHANT_INCLUDE_DIRS}
311     ${FREETYPE2_INCLUDE_DIRS}
312     ${GEOCLUE_INCLUDE_DIRS}
313     ${GIO_UNIX_INCLUDE_DIRS}
314     ${GLIB_INCLUDE_DIRS}
315     ${GUDEV_INCLUDE_DIRS}
316     ${HARFBUZZ_INCLUDE_DIRS}
317     ${ICU_INCLUDE_DIRS}
318     ${LIBSECRET_INCLUDE_DIRS}
319     ${LIBSOUP_INCLUDE_DIRS}
320     ${LIBXML2_INCLUDE_DIR}
321     ${LIBXSLT_INCLUDE_DIR}
322     ${SQLITE_INCLUDE_DIR}
323     ${WEBP_INCLUDE_DIRS}
324     ${ZLIB_INCLUDE_DIRS}
325 )
326
327 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
328     list(APPEND WebCore_INCLUDE_DIRECTORIES
329         ${WEBCORE_DIR}/platform/graphics/gstreamer
330         ${GSTREAMER_INCLUDE_DIRS}
331         ${GSTREAMER_BASE_INCLUDE_DIRS}
332         ${GSTREAMER_APP_INCLUDE_DIRS}
333         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
334     )
335
336     list(APPEND WebCore_LIBRARIES
337         ${GSTREAMER_APP_LIBRARIES}
338         ${GSTREAMER_BASE_LIBRARIES}
339         ${GSTREAMER_LIBRARIES}
340         ${GSTREAMER_PBUTILS_LIBRARIES}
341     )
342     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
343     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
344 endif ()
345
346 if (ENABLE_VIDEO)
347     list(APPEND WebCore_INCLUDE_DIRECTORIES
348         ${GSTREAMER_TAG_INCLUDE_DIRS}
349         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
350     )
351     list(APPEND WebCore_LIBRARIES
352         ${GSTREAMER_TAG_LIBRARIES}
353         ${GSTREAMER_VIDEO_LIBRARIES}
354     )
355
356     if (USE_GSTREAMER_MPEGTS)
357         list(APPEND WebCore_INCLUDE_DIRECTORIES
358             ${GSTREAMER_MPEGTS_INCLUDE_DIRS}
359         )
360
361         list(APPEND WebCore_LIBRARIES
362             ${GSTREAMER_MPEGTS_LIBRARIES}
363         )
364     endif ()
365 endif ()
366
367 if (ENABLE_WEB_AUDIO)
368     list(APPEND WebCore_INCLUDE_DIRECTORIES
369         ${WEBCORE_DIR}/platform/audio/gstreamer
370         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
371         ${GSTREAMER_FFT_INCLUDE_DIRS}
372     )
373     list(APPEND WebCore_LIBRARIES
374         ${GSTREAMER_AUDIO_LIBRARIES}
375         ${GSTREAMER_FFT_LIBRARIES}
376     )
377 endif ()
378
379 if (ENABLE_TEXTURE_MAPPER)
380     list(APPEND WebCore_INCLUDE_DIRECTORIES
381         "${WEBCORE_DIR}/platform/graphics/texmap"
382     )
383     list(APPEND WebCore_SOURCES
384         platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
385         platform/graphics/texmap/TextureMapperGL.cpp
386         platform/graphics/texmap/TextureMapperShaderProgram.cpp
387     )
388 endif ()
389
390 if (WTF_USE_EGL)
391     list(APPEND WebCore_LIBRARIES
392         ${EGL_LIBRARY}
393     )
394 endif ()
395
396 if (ENABLE_PLUGIN_PROCESS_GTK2)
397     # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
398     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
399     # for the plugin process.
400     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
401     add_dependencies(WebCorePlatformGTK2 WebCore)
402     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK2)
403     set_property(TARGET WebCorePlatformGTK2
404         APPEND
405         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
406     )
407     set_property(
408         TARGET WebCorePlatformGTK2
409         APPEND
410         PROPERTY INCLUDE_DIRECTORIES
411             ${WebCore_INCLUDE_DIRECTORIES}
412             ${GTK2_INCLUDE_DIRS}
413             ${GDK2_INCLUDE_DIRS}
414     )
415     target_link_libraries(WebCorePlatformGTK2
416          ${WebCore_LIBRARIES}
417          ${GTK2_LIBRARIES}
418          ${GDK2_LIBRARIES}
419     )
420 endif ()
421
422 # Wayland protocol extension.
423 add_custom_command(
424     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
425     DEPENDS ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml
426     COMMAND wayland-scanner server-header < ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml > ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandServerProtocol.h
427     COMMAND wayland-scanner client-header < ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml > ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.h
428     COMMAND wayland-scanner code < ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml > ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
429 )
430
431 if (ENABLE_WAYLAND_TARGET)
432     list(APPEND WebCorePlatformGTK_SOURCES
433         platform/graphics/wayland/WaylandEventSource.cpp
434         platform/graphics/wayland/WaylandSurface.cpp
435
436         ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
437     )
438 endif ()
439
440 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
441 add_dependencies(WebCorePlatformGTK WebCore)
442 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
443 set_property(
444     TARGET WebCorePlatformGTK
445     APPEND
446     PROPERTY INCLUDE_DIRECTORIES
447         ${WebCore_INCLUDE_DIRECTORIES}
448         ${GTK_INCLUDE_DIRS}
449         ${GDK_INCLUDE_DIRS}
450 )
451 target_link_libraries(WebCorePlatformGTK
452     ${WebCore_LIBRARIES}
453     ${GTK_LIBRARIES}
454     ${GDK_LIBRARIES}
455 )
456
457 include_directories(
458     ${WebCore_INCLUDE_DIRECTORIES}
459     "${DERIVED_SOURCES_DIR}"
460     "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
461 )
462
463 list(APPEND GObjectDOMBindings_SOURCES
464     bindings/gobject/ConvertToUTF8String.cpp
465     bindings/gobject/DOMObjectCache.cpp
466     bindings/gobject/GObjectEventListener.cpp
467     bindings/gobject/GObjectNodeFilterCondition.cpp
468     bindings/gobject/GObjectXPathNSResolver.cpp
469     bindings/gobject/WebKitDOMCustom.cpp
470     bindings/gobject/WebKitDOMEventTarget.cpp
471     bindings/gobject/WebKitDOMHTMLPrivate.cpp
472     bindings/gobject/WebKitDOMNodeFilter.cpp
473     bindings/gobject/WebKitDOMObject.cpp
474     bindings/gobject/WebKitDOMPrivate.cpp
475     bindings/gobject/WebKitDOMXPathNSResolver.cpp
476     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
477     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
478     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
479 )
480
481 list(APPEND GObjectDOMBindingsStable_IDL_FILES
482     css/CSSRule.idl
483     css/CSSRuleList.idl
484     css/CSSStyleDeclaration.idl
485     css/CSSStyleSheet.idl
486     css/CSSValue.idl
487     css/MediaList.idl
488     css/StyleSheet.idl
489     css/StyleSheetList.idl
490
491     dom/Attr.idl
492     dom/CDATASection.idl
493     dom/CharacterData.idl
494     dom/Comment.idl
495     dom/DOMImplementation.idl
496     dom/Document.idl
497     dom/DocumentFragment.idl
498     dom/DocumentType.idl
499     dom/Element.idl
500     dom/EntityReference.idl
501     dom/Event.idl
502     dom/KeyboardEvent.idl
503     dom/MouseEvent.idl
504     dom/NamedNodeMap.idl
505     dom/Node.idl
506     dom/NodeIterator.idl
507     dom/NodeList.idl
508     dom/ProcessingInstruction.idl
509     dom/Range.idl
510     dom/Text.idl
511     dom/TreeWalker.idl
512     dom/UIEvent.idl
513     dom/WheelEvent.idl
514
515     fileapi/Blob.idl
516     fileapi/File.idl
517     fileapi/FileList.idl
518
519     html/HTMLAnchorElement.idl
520     html/HTMLAppletElement.idl
521     html/HTMLAreaElement.idl
522     html/HTMLBRElement.idl
523     html/HTMLBaseElement.idl
524     html/HTMLBaseFontElement.idl
525     html/HTMLBodyElement.idl
526     html/HTMLButtonElement.idl
527     html/HTMLCanvasElement.idl
528     html/HTMLCollection.idl
529     html/HTMLDListElement.idl
530     html/HTMLDirectoryElement.idl
531     html/HTMLDivElement.idl
532     html/HTMLDocument.idl
533     html/HTMLElement.idl
534     html/HTMLEmbedElement.idl
535     html/HTMLFieldSetElement.idl
536     html/HTMLFontElement.idl
537     html/HTMLFormElement.idl
538     html/HTMLFrameElement.idl
539     html/HTMLFrameSetElement.idl
540     html/HTMLHRElement.idl
541     html/HTMLHeadElement.idl
542     html/HTMLHeadingElement.idl
543     html/HTMLHtmlElement.idl
544     html/HTMLIFrameElement.idl
545     html/HTMLImageElement.idl
546     html/HTMLInputElement.idl
547     html/HTMLLIElement.idl
548     html/HTMLLabelElement.idl
549     html/HTMLLegendElement.idl
550     html/HTMLLinkElement.idl
551     html/HTMLMapElement.idl
552     html/HTMLMarqueeElement.idl
553     html/HTMLMenuElement.idl
554     html/HTMLMetaElement.idl
555     html/HTMLModElement.idl
556     html/HTMLOListElement.idl
557     html/HTMLObjectElement.idl
558     html/HTMLOptGroupElement.idl
559     html/HTMLOptionElement.idl
560     html/HTMLOptionsCollection.idl
561     html/HTMLParagraphElement.idl
562     html/HTMLParamElement.idl
563     html/HTMLPreElement.idl
564     html/HTMLQuoteElement.idl
565     html/HTMLScriptElement.idl
566     html/HTMLSelectElement.idl
567     html/HTMLStyleElement.idl
568     html/HTMLTableCaptionElement.idl
569     html/HTMLTableCellElement.idl
570     html/HTMLTableColElement.idl
571     html/HTMLTableElement.idl
572     html/HTMLTableRowElement.idl
573     html/HTMLTableSectionElement.idl
574     html/HTMLTextAreaElement.idl
575     html/HTMLTitleElement.idl
576     html/HTMLUListElement.idl
577
578     page/DOMWindow.idl
579
580     xml/XPathExpression.idl
581     xml/XPathResult.idl
582 )
583
584 list(APPEND GObjectDOMBindingsUnstable_IDL_FILES
585     Modules/battery/BatteryManager.idl
586
587     Modules/gamepad/deprecated/Gamepad.idl
588     Modules/gamepad/deprecated/GamepadList.idl
589
590     Modules/geolocation/Geolocation.idl
591
592     Modules/mediasource/VideoPlaybackQuality.idl
593
594     Modules/quota/StorageInfo.idl
595     Modules/quota/StorageQuota.idl
596
597     Modules/speech/DOMWindowSpeechSynthesis.idl
598     Modules/speech/SpeechSynthesis.idl
599     Modules/speech/SpeechSynthesisEvent.idl
600     Modules/speech/SpeechSynthesisUtterance.idl
601     Modules/speech/SpeechSynthesisVoice.idl
602
603     Modules/webdatabase/Database.idl
604
605     css/DOMWindowCSS.idl
606     css/MediaQueryList.idl
607     css/StyleMedia.idl
608
609     dom/DOMNamedFlowCollection.idl
610     dom/DOMStringList.idl
611     dom/DOMStringMap.idl
612     dom/MessagePort.idl
613     dom/Touch.idl
614     dom/WebKitNamedFlow.idl
615
616     html/DOMSettableTokenList.idl
617     html/DOMTokenList.idl
618     html/HTMLDetailsElement.idl
619     html/HTMLKeygenElement.idl
620     html/HTMLMediaElement.idl
621     html/MediaController.idl
622     html/MediaError.idl
623     html/TimeRanges.idl
624     html/ValidityState.idl
625
626     loader/appcache/DOMApplicationCache.idl
627
628     page/BarProp.idl
629     page/DOMSecurityPolicy.idl
630     page/DOMSelection.idl
631     page/History.idl
632     page/Location.idl
633     page/Navigator.idl
634     page/Performance.idl
635     page/PerformanceEntry.idl
636     page/PerformanceEntryList.idl
637     page/PerformanceNavigation.idl
638     page/PerformanceTiming.idl
639     page/Screen.idl
640     page/WebKitPoint.idl
641
642     plugins/DOMMimeType.idl
643     plugins/DOMMimeTypeArray.idl
644     plugins/DOMPlugin.idl
645     plugins/DOMPluginArray.idl
646
647     storage/Storage.idl
648 )
649
650 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
651     list(APPEND GObjectDOMBindingsUnstable_IDL_FILES
652         html/HTMLAudioElement.idl
653         html/HTMLVideoElement.idl
654
655         html/track/AudioTrack.idl
656         html/track/AudioTrackList.idl
657         html/track/DataCue.idl
658         html/track/TextTrack.idl
659         html/track/TextTrackCue.idl
660         html/track/TextTrackCueList.idl
661         html/track/TextTrackList.idl
662         html/track/TrackEvent.idl
663         html/track/VTTCue.idl
664         html/track/VideoTrack.idl
665         html/track/VideoTrackList.idl
666     )
667 endif ()
668
669 if (ENABLE_QUOTA)
670     list(APPEND GObjectDOMBindingsUnstable_IDL_FILES
671         Modules/quota/DOMWindowQuota.idl
672         Modules/quota/NavigatorStorageQuota.idl
673         Modules/quota/StorageErrorCallback.idl
674         Modules/quota/StorageInfo.idl
675         Modules/quota/StorageQuota.idl
676         Modules/quota/StorageQuotaCallback.idl
677         Modules/quota/StorageUsageCallback.idl
678         Modules/quota/WorkerNavigatorStorageQuota.idl
679     )
680 endif ()
681
682 set(GObjectDOMBindingsStable_CLASS_LIST Custom EventTarget NodeFilter Object XPathNSResolver)
683 set(GObjectDOMBindingsStable_INSTALLED_HEADERS
684      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
685      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
686      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMCustom.h
687      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMEventTarget.h
688      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMNodeFilter.h
689      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMObject.h
690      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMXPathNSResolver.h
691 )
692
693 set(GObjectDOMBindingsUnstable_INSTALLED_HEADERS
694      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
695 )
696
697 foreach (file ${GObjectDOMBindingsStable_IDL_FILES})
698     get_filename_component(classname ${file} NAME_WE)
699     list(APPEND GObjectDOMBindingsStable_CLASS_LIST ${classname})
700     list(APPEND GObjectDOMBindingsStable_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
701     list(APPEND GObjectDOMBindingsUnstable_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}Unstable.h)
702 endforeach ()
703
704 foreach (file ${GObjectDOMBindingsUnstable_IDL_FILES})
705     get_filename_component(classname ${file} NAME_WE)
706     list(APPEND GObjectDOMBindingsUnstable_CLASS_LIST ${classname})
707     list(APPEND GObjectDOMBindingsUnstable_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
708 endforeach ()
709
710 set(GOBJECT_DOM_BINDINGS_FEATURES_DEFINES "LANGUAGE_GOBJECT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
711 string(REPLACE "ENABLE_INDEXED_DATABASE=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
712 string(REPLACE REGEX "ENABLE_SVG[A-Z_]+=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
713
714 file(MAKE_DIRECTORY ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR})
715
716 add_custom_command(
717     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
718     DEPENDS ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl
719     COMMAND echo ${GObjectDOMBindingsStable_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl defines > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
720 )
721
722 add_custom_command(
723     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
724     DEPENDS ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl
725     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
726 )
727
728 add_custom_command(
729     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
730     DEPENDS ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl
731     COMMAND echo ${GObjectDOMBindingsStable_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl gdom > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
732 )
733
734 add_custom_target(fake-installed-webkitdom-headers
735     COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/*.h ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
736 )
737
738 set(GObjectDOMBindings_IDL_FILES ${GObjectDOMBindingsStable_IDL_FILES} ${GObjectDOMBindingsUnstable_IDL_FILES})
739 GENERATE_BINDINGS(GObjectDOMBindings_SOURCES
740     "${GObjectDOMBindings_IDL_FILES}"
741     "${WEBCORE_DIR}"
742     "${IDL_INCLUDES}"
743     "${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES}"
744     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
745     WebKitDOM GObject cpp
746     ${IDL_ATTRIBUTES_FILE}
747     ${SUPPLEMENTAL_DEPENDENCY_FILE}
748     ${WINDOW_CONSTRUCTORS_FILE}
749     ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
750     ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
751     ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
752
753 add_definitions(-DBUILDING_WEBKIT)
754 add_definitions(-DWEBKIT_DOM_USE_UNSTABLE_API)
755
756 add_library(GObjectDOMBindings STATIC ${GObjectDOMBindings_SOURCES})
757
758 WEBKIT_SET_EXTRA_COMPILER_FLAGS(GObjectDOMBindings)
759
760 add_dependencies(GObjectDOMBindings
761     WebCore
762     fake-installed-webkitdom-headers
763 )
764
765 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkitdom.cfg
766     "[webkitdomgtk]\n"
767     "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
768     "namespace=webkit_dom\n"
769     "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
770     "       -I${WEBCORE_DIR}/bindings\n"
771     "       -I${WEBCORE_DIR}/bindings/gobject\n"
772     "       -I${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}\n"
773     "doc_dir=${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/docs\n"
774     "source_dirs=${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}\n"
775     "            ${WEBCORE_DIR}/bindings/gobject\n"
776     "headers=${GObjectDOMBindingsStable_INSTALLED_HEADERS}\n"
777 )
778
779 install(FILES ${GObjectDOMBindingsStable_INSTALLED_HEADERS}
780         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
781 )
782
783 # Make unstable header optional if they don't exist
784 install(FILES ${GObjectDOMBindingsUnstable_INSTALLED_HEADERS}
785         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
786         OPTIONAL
787 )
788
789 # Some installed headers are not on the list of headers used for gir generation.
790 set(GObjectDOMBindings_GIR_HEADERS ${GObjectDOMBindingsStable_INSTALLED_HEADERS})
791 list(REMOVE_ITEM GObjectDOMBindings_GIR_HEADERS
792      bindings/gobject/WebKitDOMEventTarget.h
793      bindings/gobject/WebKitDOMNodeFilter.h
794      bindings/gobject/WebKitDOMObject.h
795      bindings/gobject/WebKitDOMXPathNSResolver.h
796 )
797
798 # Propagate this variable to the parent scope, so that it can be used in other parts of the build.
799 set(GObjectDOMBindings_GIR_HEADERS ${GObjectDOMBindings_GIR_HEADERS} PARENT_SCOPE)
800
801 if (ENABLE_SUBTLE_CRYPTO)
802     list(APPEND WebCore_SOURCES
803         crypto/CryptoAlgorithm.cpp
804         crypto/CryptoAlgorithmDescriptionBuilder.cpp
805         crypto/CryptoAlgorithmRegistry.cpp
806         crypto/CryptoKey.cpp
807         crypto/CryptoKeyPair.cpp
808         crypto/SubtleCrypto.cpp
809         crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
810         crypto/algorithms/CryptoAlgorithmAES_KW.cpp
811         crypto/algorithms/CryptoAlgorithmHMAC.cpp
812         crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
813         crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
814         crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
815         crypto/algorithms/CryptoAlgorithmSHA1.cpp
816         crypto/algorithms/CryptoAlgorithmSHA224.cpp
817         crypto/algorithms/CryptoAlgorithmSHA256.cpp
818         crypto/algorithms/CryptoAlgorithmSHA384.cpp
819         crypto/algorithms/CryptoAlgorithmSHA512.cpp
820         crypto/keys/CryptoKeyAES.cpp
821         crypto/keys/CryptoKeyDataOctetSequence.cpp
822         crypto/keys/CryptoKeyDataRSAComponents.cpp
823         crypto/keys/CryptoKeyHMAC.cpp
824         crypto/keys/CryptoKeySerializationRaw.cpp
825
826         crypto/gtk/CryptoAlgorithmRegistryGtk.cpp
827         crypto/gtk/CryptoAlgorithmAES_CBCGtk.cpp
828         crypto/gtk/CryptoAlgorithmAES_KWGtk.cpp
829         crypto/gtk/CryptoAlgorithmHMACGtk.cpp
830         crypto/gtk/CryptoAlgorithmRSAES_PKCS1_v1_5Gtk.cpp
831         crypto/gtk/CryptoAlgorithmRSA_OAEPGtk.cpp
832         crypto/gtk/CryptoAlgorithmRSASSA_PKCS1_v1_5Gtk.cpp
833         crypto/gtk/CryptoDigestGtk.cpp
834         crypto/gtk/CryptoKeyRSAGtk.cpp
835         crypto/gtk/SerializedCryptoKeyWrapGtk.cpp
836     )
837
838     list(APPEND WebCore_INCLUDE_DIRECTORIES
839         ${GNUTLS_INCLUDE_DIRS}
840     )
841     list(APPEND WebCore_LIBRARIES
842         ${GNUTLS_LIBRARIES}
843     )
844 endif ()