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