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