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