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