[GTK] Add support for building WebCore to the cmake build
[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/gtk"
7     "${WEBCORE_DIR}/platform/graphics/cairo"
8     "${WEBCORE_DIR}/platform/graphics/gtk"
9     "${WEBCORE_DIR}/platform/graphics/freetype"
10     "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
11     "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
12     "${WEBCORE_DIR}/platform/graphics/opengl"
13     "${WEBCORE_DIR}/platform/linux"
14     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
15     "${WEBCORE_DIR}/platform/network/gtk"
16     "${WEBCORE_DIR}/platform/network/soup"
17     "${WEBCORE_DIR}/platform/text/gtk"
18     "${WEBCORE_DIR}/plugins/gtk"
19 )
20
21 list(APPEND WebCore_SOURCES
22     accessibility/atk/AccessibilityObjectAtk.cpp
23     accessibility/atk/AXObjectCacheAtk.cpp
24     accessibility/atk/WebKitAccessibleHyperlink.cpp
25     accessibility/atk/WebKitAccessibleInterfaceAction.cpp
26     accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
27     accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
28     accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
29     accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
30     accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
31     accessibility/atk/WebKitAccessibleInterfaceImage.cpp
32     accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
33     accessibility/atk/WebKitAccessibleInterfaceTable.cpp
34     accessibility/atk/WebKitAccessibleInterfaceText.cpp
35     accessibility/atk/WebKitAccessibleInterfaceValue.cpp
36     accessibility/atk/WebKitAccessibleUtil.cpp
37     accessibility/atk/WebKitAccessibleWrapperAtk.cpp
38
39     editing/SmartReplaceICU.cpp
40
41     editing/atk/FrameSelectionAtk.cpp
42
43     page/gtk/DragControllerGtk.cpp
44     page/gtk/EventHandlerGtk.cpp
45
46     platform/cairo/WidgetBackingStoreCairo.cpp
47
48     platform/Cursor.cpp
49
50     platform/audio/gtk/AudioBusGtk.cpp
51     platform/audio/gstreamer/AudioDestinationGStreamer.cpp
52     platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
53     platform/audio/gstreamer/FFTFrameGStreamer.cpp
54     platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
55
56     platform/gtk/AsyncFileSystemGtk.cpp
57     platform/gtk/ClipboardGtk.cpp
58     platform/gtk/ClipboardUtilitiesGtk.cpp
59     platform/gtk/ContextMenuGtk.cpp
60     platform/gtk/ContextMenuItemGtk.cpp
61     platform/gtk/CursorGtk.cpp
62     platform/gtk/DataObjectGtk.cpp
63     platform/gtk/DragDataGtk.cpp
64     platform/gtk/DragIcon.cpp
65     platform/gtk/DragImageGtk.cpp
66     platform/gtk/ErrorsGtk.cpp
67     platform/gtk/EventLoopGtk.cpp
68     platform/gtk/FileSystemGtk.cpp
69     platform/gtk/GamepadsGtk.cpp
70     platform/gtk/GOwnPtrGtk.cpp
71     platform/gtk/GRefPtrGtk.cpp
72     platform/gtk/GtkClickCounter.cpp
73     platform/gtk/GtkDragAndDropHelper.cpp
74     platform/gtk/GtkInputMethodFilter.cpp
75     platform/gtk/GtkPluginWidget.cpp
76     platform/gtk/GtkPopupMenu.cpp
77     platform/gtk/GtkUtilities.cpp
78     platform/gtk/GtkVersioning.c
79     platform/gtk/GtkWidgetBackingStoreX11.cpp
80     platform/gtk/KeyBindingTranslator.cpp
81     platform/gtk/LanguageGtk.cpp
82     platform/gtk/LocalizedStringsGtk.cpp
83     platform/gtk/LoggingGtk.cpp
84     platform/gtk/MainFrameScrollbarGtk.cpp
85     platform/gtk/MIMETypeRegistryGtk.cpp
86     platform/gtk/PasteboardGtk.cpp
87     platform/gtk/PasteboardHelper.cpp
88     platform/gtk/PlatformKeyboardEventGtk.cpp
89     platform/gtk/PlatformMouseEventGtk.cpp
90     platform/gtk/PlatformScreenGtk.cpp
91     platform/gtk/PlatformWheelEventGtk.cpp
92     platform/gtk/PopupMenuGtk.cpp
93     platform/gtk/RedirectedXCompositeWindow.cpp
94     platform/gtk/RenderThemeGtk2.cpp
95     platform/gtk/RenderThemeGtk3.cpp
96     platform/gtk/RenderThemeGtk.cpp
97     platform/gtk/RunLoopGtk.cpp
98     platform/gtk/ScrollbarThemeGtk2.cpp
99     platform/gtk/ScrollbarThemeGtk3.cpp
100     platform/gtk/ScrollbarThemeGtk.cpp
101     platform/gtk/ScrollViewGtk.cpp
102     platform/gtk/SearchPopupMenuGtk.cpp
103     platform/gtk/SharedBufferGtk.cpp
104     platform/gtk/SharedTimerGtk.cpp
105     platform/gtk/SoundGtk.cpp
106     platform/gtk/TemporaryLinkStubs.cpp
107     platform/gtk/UserAgentGtk.cpp
108     platform/gtk/WebKitAuthenticationWidget.cpp
109     platform/gtk/WidgetGtk.cpp
110     platform/gtk/WidgetRenderingContext.cpp
111
112     platform/graphics/cairo/BitmapImageCairo.cpp
113     platform/graphics/cairo/CairoUtilities.cpp
114     platform/graphics/cairo/DrawingBufferCairo.cpp
115     platform/graphics/cairo/FontCairo.cpp
116     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
117     platform/graphics/cairo/GradientCairo.cpp
118     platform/graphics/cairo/GraphicsContext3DCairo.cpp
119     platform/graphics/cairo/GraphicsContext3DPrivate.cpp
120     platform/graphics/cairo/GraphicsContextCairo.cpp
121     platform/graphics/cairo/ImageBufferCairo.cpp
122     platform/graphics/cairo/ImageCairo.cpp
123     platform/graphics/cairo/IntRectCairo.cpp
124     platform/graphics/cairo/OwnPtrCairo.cpp
125     platform/graphics/cairo/PathCairo.cpp
126     platform/graphics/cairo/PatternCairo.cpp
127     platform/graphics/cairo/PlatformContextCairo.cpp
128     platform/graphics/cairo/PlatformPathCairo.cpp
129     platform/graphics/cairo/RefPtrCairo.cpp
130     platform/graphics/cairo/TileCairo.cpp
131     platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp
132     platform/graphics/cairo/TransformationMatrixCairo.cpp
133
134     platform/graphics/gtk/ColorGtk.cpp
135     platform/graphics/gtk/FullscreenVideoControllerGtk.cpp
136     platform/graphics/gtk/GdkCairoUtilities.cpp
137     platform/graphics/gtk/IconGtk.cpp
138     platform/graphics/gtk/ImageBufferGtk.cpp
139     platform/graphics/gtk/ImageGtk.cpp
140     platform/graphics/gtk/IntPointGtk.cpp
141     platform/graphics/gtk/IntRectGtk.cpp
142
143     platform/graphics/freetype/FontCacheFreeType.cpp
144     platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
145     platform/graphics/freetype/FontPlatformDataFreeType.cpp
146     platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
147     platform/graphics/freetype/SimpleFontDataFreeType.cpp
148
149     platform/graphics/gstreamer/GRefPtrGStreamer.cpp
150     platform/graphics/gstreamer/GStreamerGWorld.cpp
151     platform/graphics/gstreamer/GStreamerUtilities.cpp
152     platform/graphics/gstreamer/GStreamerVersioning.cpp
153     platform/graphics/gstreamer/ImageGStreamerCairo.cpp
154     platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
155     platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
156     platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp
157     platform/graphics/gstreamer/VideoSinkGStreamer.cpp
158     platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
159
160     platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
161     platform/graphics/harfbuzz/HarfBuzzFace.cpp
162     platform/graphics/harfbuzz/HarfBuzzShaper.cpp
163
164     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
165     platform/graphics/opengl/Extensions3DOpenGL.cpp
166     platform/graphics/opengl/Extensions3DOpenGLES.cpp
167     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
168     platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
169
170     platform/graphics/OpenGLShims.cpp
171     platform/graphics/WOFFFileFormat.cpp
172
173     platform/image-decoders/cairo/ImageDecoderCairo.cpp
174
175     platform/linux/GamepadDeviceLinux.cpp
176
177     platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
178
179     platform/network/gtk/CredentialBackingStore.cpp
180
181     platform/network/soup/AuthenticationChallengeSoup.cpp
182     platform/network/soup/CookieJarSoup.cpp
183     platform/network/soup/CookieStorageSoup.cpp
184     platform/network/soup/CredentialStorageSoup.cpp
185     platform/network/soup/DNSSoup.cpp
186     platform/network/soup/GOwnPtrSoup.cpp
187     platform/network/soup/NetworkStorageSessionSoup.cpp
188     platform/network/soup/ProxyResolverSoup.cpp
189     platform/network/soup/ProxyServerSoup.cpp
190     platform/network/soup/ResourceErrorSoup.cpp
191     platform/network/soup/ResourceHandleSoup.cpp
192     platform/network/soup/ResourceRequestSoup.cpp
193     platform/network/soup/ResourceResponseSoup.cpp
194     platform/network/soup/SocketStreamHandleSoup.cpp
195     platform/network/soup/SoupURIUtils.cpp
196
197     platform/PlatformStrategies.cpp
198
199     platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp
200     platform/text/enchant/TextCheckerEnchant.cpp
201     platform/text/LocaleICU.cpp
202     platform/text/TextBreakIteratorICU.cpp
203     platform/text/TextCodecICU.cpp
204     platform/text/TextEncodingDetectorICU.cpp
205 )
206
207 if (ENABLE_NETSCAPE_PLUGIN_API)
208     list(APPEND WebCore_SOURCES
209         plugins/PluginDatabase.cpp
210         plugins/PluginDebug.cpp
211         plugins/PluginPackage.cpp plugins/PluginStream.cpp
212         plugins/PluginView.cpp
213
214         plugins/gtk/PluginPackageGtk.cpp
215         plugins/gtk/PluginViewGtk.cpp
216         plugins/gtk/gtk2xtbin.c
217     )
218 else ()
219     list(APPEND WebCore_SOURCES
220         plugins/PluginPackageNone.cpp
221         plugins/PluginViewNone.cpp
222     )
223 endif ()
224
225 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
226     ${WEBCORE_DIR}/css/mediaControlsGtk.css
227 )
228
229 list(APPEND WebCore_LIBRARIES
230     ${ATK_LIBRARIES}
231     ${ENCHANT_LIBRARIES}
232     ${CAIRO_LIBRARIES}
233     ${FONTCONFIG_LIBRARIES}
234     ${FREETYPE_LIBRARIES}
235     ${ICU_LIBRARIES}
236     ${JPEG_LIBRARIES}
237     ${LIBXML2_LIBRARIES}
238     ${LIBXSLT_LIBRARIES}
239     ${PNG_LIBRARIES}
240     ${SQLITE_LIBRARIES}
241     ${GLIB_LIBRARIES}
242     ${GLIB_GIO_LIBRARIES}
243     ${GLIB_GOBJECT_LIBRARIES}
244     ${GLIB_GMODULE_LIBRARIES}
245     ${GAIL3_LIBRARIES}
246     ${GTK3_LIBRARIES}
247     ${LIBSOUP_LIBRARIES}
248     ${ZLIB_LIBRARIES}
249     ${HARFBUZZ_LIBRARIES}
250     ${XT_LIBRARIES}
251     ${X11_X11_LIB}
252     ${X11_Xcomposite_LIB}
253     ${X11_Xrender_LIB}
254     ${X11_Xdamage_LIB}
255 )
256
257 list(APPEND WebCore_INCLUDE_DIRECTORIES
258     ${ATK_INCLUDE_DIRS}
259     ${ENCHANT_INCLUDE_DIRS}
260     ${CAIRO_INCLUDE_DIRS}
261     ${FREETYPE_INCLUDE_DIRS}
262     ${ICU_INCLUDE_DIRS}
263     ${LIBXML2_INCLUDE_DIR}
264     ${LIBXSLT_INCLUDE_DIR}
265     ${SQLITE_INCLUDE_DIR}
266     ${GAIL3_INCLUDE_DIRS}
267     ${GLIB_INCLUDE_DIRS}
268     ${GTK3_INCLUDE_DIRS}
269     ${LIBSOUP_INCLUDE_DIRS}
270     ${ZLIB_INCLUDE_DIRS}
271     ${HARFBUZZ_INCLUDE_DIRS}
272     ${XT_INCLUDE_DIRS}
273 )
274
275 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
276     list(APPEND WebCore_INCLUDE_DIRECTORIES
277         ${WEBCORE_DIR}/platform/graphics/gstreamer
278         ${GSTREAMER_INCLUDE_DIRS}
279         ${GSTREAMER_BASE_INCLUDE_DIRS}
280         ${GSTREAMER_APP_INCLUDE_DIRS}
281         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
282     )
283
284     list(APPEND WebCore_LIBRARIES
285         ${GSTREAMER_LIBRARIES}
286         ${GSTREAMER_BASE_LIBRARIES}
287         ${GSTREAMER_APP_LIBRARIES}
288         ${GSTREAMER_PBUTILS_LIBRARIES}
289     )
290     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
291     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
292 endif ()
293
294 if (ENABLE_VIDEO)
295     list(APPEND WebCore_INCLUDE_DIRECTORIES
296         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
297     )
298     list(APPEND WebCore_LIBRARIES
299         ${GSTREAMER_VIDEO_LIBRARIES}
300     )
301 endif ()
302
303 if (ENABLE_WEB_AUDIO)
304     list(APPEND WebCore_INCLUDE_DIRECTORIES
305         ${WEBCORE_DIR}/platform/audio/gstreamer
306         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
307         ${GSTREAMER_FFT_INCLUDE_DIRS}
308     )
309     list(APPEND WebCore_LIBRARIES
310         ${GSTREAMER_AUDIO_LIBRARIES}
311         ${GSTREAMER_FFT_LIBRARIES}
312     )
313 endif ()
314
315 if (ENABLE_TEXTURE_MAPPER)
316     list(APPEND WebCore_INCLUDE_DIRECTORIES
317         "${WEBCORE_DIR}/platform/graphics/texmap"
318     )
319     list(APPEND WebCore_SOURCES
320         platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
321         platform/graphics/texmap/TextureMapperGL.cpp
322         platform/graphics/texmap/TextureMapperShaderProgram.cpp
323     )
324 endif ()
325
326 if (WTF_USE_EGL)
327     list(APPEND WebCore_LIBRARIES
328         ${EGL_LIBRARY}
329     )
330 endif ()
331
332 install(FILES
333             "${WEBCORE_DIR}/Resources/textAreaResizeCorner.png"
334             "${WEBCORE_DIR}/Resources/nullPlugin.png"
335             "${WEBCORE_DIR}/Resources/urlIcon.png"
336             "${WEBCORE_DIR}/Resources/missingImage.png"
337             "${WEBCORE_DIR}/Resources/panIcon.png"
338             "${WEBCORE_DIR}/Resources/deleteButton.png"
339             "${WEBCORE_DIR}/Resources/inputSpeech.png"
340         DESTINATION
341             "${DATA_INSTALL_DIR}/images")
342
343 if (ENABLE_WEB_AUDIO)
344     install(FILES
345                 "${WEBCORE_DIR}/platform/audio/resources/Composite.wav"
346             DESTINATION
347                 "${DATA_INSTALL_DIR}/resources/audio")
348 endif ()