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