Update ANGLE
[WebKit-https.git] / Source / WebCore / PlatformGTK.cmake
1 include(platform/GStreamer.cmake)
2 include(platform/ImageDecoders.cmake)
3 include(platform/Linux.cmake)
4
5 if (USE_TEXTURE_MAPPER)
6     include(platform/TextureMapper.cmake)
7 endif ()
8
9 set(WebCore_OUTPUT_NAME WebCoreGTK)
10
11 list(APPEND WebCore_INCLUDE_DIRECTORIES
12     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
13     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector"
14     "${JAVASCRIPTCORE_DIR}"
15     "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
16     "${JAVASCRIPTCORE_DIR}/API"
17     "${JAVASCRIPTCORE_DIR}/assembler"
18     "${JAVASCRIPTCORE_DIR}/bytecode"
19     "${JAVASCRIPTCORE_DIR}/bytecompiler"
20     "${JAVASCRIPTCORE_DIR}/dfg"
21     "${JAVASCRIPTCORE_DIR}/disassembler"
22     "${JAVASCRIPTCORE_DIR}/domjit"
23     "${JAVASCRIPTCORE_DIR}/heap"
24     "${JAVASCRIPTCORE_DIR}/debugger"
25     "${JAVASCRIPTCORE_DIR}/interpreter"
26     "${JAVASCRIPTCORE_DIR}/jit"
27     "${JAVASCRIPTCORE_DIR}/llint"
28     "${JAVASCRIPTCORE_DIR}/parser"
29     "${JAVASCRIPTCORE_DIR}/profiler"
30     "${JAVASCRIPTCORE_DIR}/runtime"
31     "${JAVASCRIPTCORE_DIR}/yarr"
32     "${THIRDPARTY_DIR}/ANGLE/"
33     "${THIRDPARTY_DIR}/ANGLE/include/KHR"
34     "${WEBCORE_DIR}/accessibility/atk"
35     "${WEBCORE_DIR}/editing/atk"
36     "${WEBCORE_DIR}/page/gtk"
37     "${WEBCORE_DIR}/platform/cairo"
38     "${WEBCORE_DIR}/platform/gamepad"
39     "${WEBCORE_DIR}/platform/gamepad/deprecated"
40     "${WEBCORE_DIR}/platform/gamepad/glib"
41     "${WEBCORE_DIR}/platform/geoclue"
42     "${WEBCORE_DIR}/platform/gtk"
43     "${WEBCORE_DIR}/platform/graphics/cairo"
44     "${WEBCORE_DIR}/platform/graphics/egl"
45     "${WEBCORE_DIR}/platform/graphics/glx"
46     "${WEBCORE_DIR}/platform/graphics/gtk"
47     "${WEBCORE_DIR}/platform/graphics/freetype"
48     "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
49     "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
50     "${WEBCORE_DIR}/platform/graphics/opengl"
51     "${WEBCORE_DIR}/platform/graphics/opentype"
52     "${WEBCORE_DIR}/platform/graphics/wayland"
53     "${WEBCORE_DIR}/platform/graphics/x11"
54     "${WEBCORE_DIR}/platform/mediastream/gtk"
55     "${WEBCORE_DIR}/platform/mock/mediasource"
56     "${WEBCORE_DIR}/platform/network/gtk"
57     "${WEBCORE_DIR}/platform/network/soup"
58     "${WEBCORE_DIR}/platform/text/gtk"
59     "${WTF_DIR}"
60 )
61
62 list(APPEND WebCore_SOURCES
63     accessibility/atk/AXObjectCacheAtk.cpp
64     accessibility/atk/AccessibilityObjectAtk.cpp
65     accessibility/atk/WebKitAccessibleHyperlink.cpp
66     accessibility/atk/WebKitAccessibleInterfaceAction.cpp
67     accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
68     accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
69     accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
70     accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
71     accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
72     accessibility/atk/WebKitAccessibleInterfaceImage.cpp
73     accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
74     accessibility/atk/WebKitAccessibleInterfaceTable.cpp
75     accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp
76     accessibility/atk/WebKitAccessibleInterfaceText.cpp
77     accessibility/atk/WebKitAccessibleInterfaceValue.cpp
78     accessibility/atk/WebKitAccessibleUtil.cpp
79     accessibility/atk/WebKitAccessibleWrapperAtk.cpp
80
81     editing/atk/FrameSelectionAtk.cpp
82
83     loader/soup/CachedRawResourceSoup.cpp
84     loader/soup/SubresourceLoaderSoup.cpp
85
86     platform/KillRingNone.cpp
87     platform/StaticPasteboard.cpp
88     platform/UserAgentQuirks.cpp
89
90     platform/audio/glib/AudioBusGLib.cpp
91
92     platform/crypto/gnutls/CryptoDigestGnuTLS.cpp
93
94     platform/gamepad/glib/GamepadsGlib.cpp
95
96     platform/geoclue/GeolocationProviderGeoclue1.cpp
97     platform/geoclue/GeolocationProviderGeoclue2.cpp
98
99     platform/glib/EventLoopGlib.cpp
100     platform/glib/FileSystemGlib.cpp
101     platform/glib/KeyedDecoderGlib.cpp
102     platform/glib/KeyedEncoderGlib.cpp
103     platform/glib/MainThreadSharedTimerGLib.cpp
104     platform/glib/SharedBufferGlib.cpp
105
106     platform/graphics/GLContext.cpp
107     platform/graphics/GraphicsContext3DPrivate.cpp
108
109     platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp
110     platform/graphics/cairo/BackingStoreBackendCairoX11.cpp
111     platform/graphics/cairo/CairoUtilities.cpp
112     platform/graphics/cairo/FloatRectCairo.cpp
113     platform/graphics/cairo/FontCairo.cpp
114     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
115     platform/graphics/cairo/GradientCairo.cpp
116     platform/graphics/cairo/GraphicsContext3DCairo.cpp
117     platform/graphics/cairo/GraphicsContextCairo.cpp
118     platform/graphics/cairo/ImageBufferCairo.cpp
119     platform/graphics/cairo/ImageCairo.cpp
120     platform/graphics/cairo/IntRectCairo.cpp
121     platform/graphics/cairo/NativeImageCairo.cpp
122     platform/graphics/cairo/PathCairo.cpp
123     platform/graphics/cairo/PatternCairo.cpp
124     platform/graphics/cairo/PlatformContextCairo.cpp
125     platform/graphics/cairo/PlatformPathCairo.cpp
126     platform/graphics/cairo/RefPtrCairo.cpp
127     platform/graphics/cairo/TransformationMatrixCairo.cpp
128
129     platform/graphics/egl/GLContextEGL.cpp
130     platform/graphics/egl/GLContextEGLWayland.cpp
131     platform/graphics/egl/GLContextEGLX11.cpp
132
133     platform/graphics/freetype/FontCacheFreeType.cpp
134     platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
135     platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
136     platform/graphics/freetype/SimpleFontDataFreeType.cpp
137
138     platform/graphics/glx/GLContextGLX.cpp
139
140     platform/graphics/gstreamer/ImageGStreamerCairo.cpp
141
142     platform/graphics/harfbuzz/HarfBuzzFace.cpp
143     platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
144     platform/graphics/harfbuzz/HarfBuzzShaper.cpp
145
146     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
147     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
148     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
149
150     platform/graphics/opentype/OpenTypeVerticalData.cpp
151
152     platform/graphics/wayland/PlatformDisplayWayland.cpp
153
154     platform/graphics/x11/PlatformDisplayX11.cpp
155     platform/graphics/x11/XErrorTrapper.cpp
156     platform/graphics/x11/XUniqueResource.cpp
157
158     platform/gtk/DragDataGtk.cpp
159     platform/gtk/ErrorsGtk.cpp
160     platform/gtk/MIMETypeRegistryGtk.cpp
161     platform/gtk/PasteboardGtk.cpp
162     platform/gtk/ScrollAnimatorGtk.cpp
163     platform/gtk/SelectionData.cpp
164     platform/gtk/TemporaryLinkStubs.cpp
165     platform/gtk/UserAgentGtk.cpp
166
167     platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
168
169     platform/mediastream/SDPProcessorScriptResource.cpp
170
171     platform/network/soup/AuthenticationChallengeSoup.cpp
172     platform/network/soup/CertificateInfo.cpp
173     platform/network/soup/CookieJarSoup.cpp
174     platform/network/soup/CookieStorageSoup.cpp
175     platform/network/soup/CredentialStorageSoup.cpp
176     platform/network/soup/DNSSoup.cpp
177     platform/network/soup/GRefPtrSoup.cpp
178     platform/network/soup/NetworkStorageSessionSoup.cpp
179     platform/network/soup/ProxyServerSoup.cpp
180     platform/network/soup/ResourceErrorSoup.cpp
181     platform/network/soup/ResourceHandleSoup.cpp
182     platform/network/soup/ResourceRequestSoup.cpp
183     platform/network/soup/ResourceResponseSoup.cpp
184     platform/network/soup/SocketStreamHandleImplSoup.cpp
185     platform/network/soup/SoupNetworkSession.cpp
186     platform/network/soup/SynchronousLoaderClientSoup.cpp
187     platform/network/soup/WebKitSoupRequestGeneric.cpp
188
189     platform/soup/PublicSuffixSoup.cpp
190     platform/soup/SharedBufferSoup.cpp
191     platform/soup/URLSoup.cpp
192
193     platform/text/Hyphenation.cpp
194     platform/text/LocaleICU.cpp
195
196     platform/text/enchant/TextCheckerEnchant.cpp
197
198     platform/text/hyphen/HyphenationLibHyphen.cpp
199
200     platform/unix/LoggingUnix.cpp
201 )
202
203 list(APPEND WebCorePlatformGTK_SOURCES
204     editing/gtk/EditorGtk.cpp
205
206     page/gtk/DragControllerGtk.cpp
207     page/gtk/EventHandlerGtk.cpp
208
209     platform/graphics/PlatformDisplay.cpp
210
211     platform/graphics/freetype/FontPlatformDataFreeType.cpp
212
213     platform/graphics/gtk/ColorGtk.cpp
214     platform/graphics/gtk/GdkCairoUtilities.cpp
215     platform/graphics/gtk/IconGtk.cpp
216     platform/graphics/gtk/ImageBufferGtk.cpp
217     platform/graphics/gtk/ImageGtk.cpp
218
219     platform/gtk/CursorGtk.cpp
220     platform/gtk/DragImageGtk.cpp
221     platform/gtk/GRefPtrGtk.cpp
222     platform/gtk/GtkUtilities.cpp
223     platform/gtk/GtkVersioning.c
224     platform/gtk/LocalizedStringsGtk.cpp
225     platform/gtk/PasteboardHelper.cpp
226     platform/gtk/PlatformKeyboardEventGtk.cpp
227     platform/gtk/PlatformMouseEventGtk.cpp
228     platform/gtk/PlatformPasteboardGtk.cpp
229     platform/gtk/PlatformScreenGtk.cpp
230     platform/gtk/PlatformWheelEventGtk.cpp
231     platform/gtk/RenderThemeGadget.cpp
232     platform/gtk/ScrollbarThemeGtk.cpp
233     platform/gtk/SoundGtk.cpp
234     platform/gtk/WidgetGtk.cpp
235
236     rendering/RenderThemeGtk.cpp
237 )
238
239 if (USE_GEOCLUE2)
240     list(APPEND WebCore_DERIVED_SOURCES
241         ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c
242     )
243     execute_process(COMMAND pkg-config --variable dbus_interface geoclue-2.0 OUTPUT_VARIABLE GEOCLUE_DBUS_INTERFACE)
244     add_custom_command(
245          OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.h
246          COMMAND gdbus-codegen --interface-prefix org.freedesktop.GeoClue2. --c-namespace Geoclue --generate-c-code ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface ${GEOCLUE_DBUS_INTERFACE}
247     )
248     set_source_files_properties(${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
249 endif ()
250
251 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
252     ${WEBCORE_DIR}/css/mediaControlsGtk.css
253 )
254
255 set(WebCore_USER_AGENT_SCRIPTS
256     ${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js
257     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.js
258     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
259 )
260
261 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
262
263 set(WebCore_SDP_PROCESSOR_SCRIPTS ${WEBCORE_DIR}/Modules/mediastream/sdp.js)
264 set(WebCore_SDP_PROCESSOR_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/mediastream/openwebrtc/SDPProcessorScriptResource.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     ${GNUTLS_LIBRARIES}
278     ${GUDEV_LIBRARIES}
279     ${HARFBUZZ_LIBRARIES}
280     ${LIBSECRET_LIBRARIES}
281     ${LIBSOUP_LIBRARIES}
282     ${LIBXML2_LIBRARIES}
283     ${LIBXSLT_LIBRARIES}
284     ${HYPHEN_LIBRARIES}
285     ${SQLITE_LIBRARIES}
286     ${X11_X11_LIB}
287     ${X11_Xcomposite_LIB}
288     ${X11_Xdamage_LIB}
289     ${X11_Xrender_LIB}
290     ${X11_Xt_LIB}
291     ${ZLIB_LIBRARIES}
292     WTF
293 )
294
295 list(APPEND WebCoreTestSupport_LIBRARIES WTF)
296
297 list(APPEND WebCore_SYSTEM_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     ${GNUTLS_INCLUDE_DIRS}
306     ${GUDEV_INCLUDE_DIRS}
307     ${HARFBUZZ_INCLUDE_DIRS}
308     ${LIBSECRET_INCLUDE_DIRS}
309     ${LIBSOUP_INCLUDE_DIRS}
310     ${LIBXML2_INCLUDE_DIR}
311     ${LIBXSLT_INCLUDE_DIR}
312     ${SQLITE_INCLUDE_DIR}
313     ${ZLIB_INCLUDE_DIRS}
314 )
315
316 if (USE_OPENGL_ES_2)
317     list(APPEND WebCore_SOURCES
318         platform/graphics/opengl/Extensions3DOpenGLES.cpp
319         platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
320     )
321 endif ()
322
323 if (USE_OPENGL)
324     list(APPEND WebCore_SOURCES
325         platform/graphics/OpenGLShims.cpp
326
327         platform/graphics/opengl/Extensions3DOpenGL.cpp
328         platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
329     )
330 endif ()
331
332 if (ENABLE_PLUGIN_PROCESS_GTK2)
333     # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
334     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
335     # for the plugin process.
336     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
337     add_dependencies(WebCorePlatformGTK2 WebCore)
338     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK2)
339     set_property(TARGET WebCorePlatformGTK2
340         APPEND
341         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
342     )
343     target_include_directories(WebCorePlatformGTK2 PRIVATE
344         ${WebCore_INCLUDE_DIRECTORIES}
345         ${GTK2_INCLUDE_DIRS}
346         ${GDK2_INCLUDE_DIRS}
347     )
348     target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
349         ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
350     )
351     target_link_libraries(WebCorePlatformGTK2
352          ${WebCore_LIBRARIES}
353          ${GTK2_LIBRARIES}
354          ${GDK2_LIBRARIES}
355     )
356 endif ()
357
358 if (ENABLE_WAYLAND_TARGET)
359     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
360         ${WAYLAND_INCLUDE_DIRS}
361     )
362     list(APPEND WebCore_LIBRARIES
363         ${WAYLAND_LIBRARIES}
364     )
365 endif ()
366
367 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
368 add_dependencies(WebCorePlatformGTK WebCore)
369 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
370 target_include_directories(WebCorePlatformGTK PRIVATE
371     ${WebCore_INCLUDE_DIRECTORIES}
372 )
373 target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
374     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
375     ${GTK_INCLUDE_DIRS}
376     ${GDK_INCLUDE_DIRS}
377 )
378 target_link_libraries(WebCorePlatformGTK
379     ${WebCore_LIBRARIES}
380     ${GTK_LIBRARIES}
381     ${GDK_LIBRARIES}
382 )
383
384 include_directories(
385     ${WebCore_INCLUDE_DIRECTORIES}
386     "${WEBCORE_DIR}/bindings/gobject/"
387     "${DERIVED_SOURCES_DIR}"
388 )
389
390 include_directories(SYSTEM
391     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
392 )
393
394 add_definitions(-DBUILDING_WEBKIT)
395
396 if (ENABLE_SMOOTH_SCROLLING)
397     list(APPEND WebCore_SOURCES
398         platform/ScrollAnimationSmooth.cpp
399     )
400 endif ()
401
402 if (ENABLE_SUBTLE_CRYPTO)
403     list(APPEND WebCore_SOURCES
404         crypto/CryptoAlgorithm.cpp
405         crypto/CryptoAlgorithmRegistry.cpp
406         crypto/CryptoKey.cpp
407         crypto/CryptoKeyPair.cpp
408         crypto/SubtleCrypto.cpp
409         crypto/WebKitSubtleCrypto.cpp
410
411         crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
412         crypto/algorithms/CryptoAlgorithmAES_KW.cpp
413         crypto/algorithms/CryptoAlgorithmHMAC.cpp
414         crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
415         crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
416         crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
417         crypto/algorithms/CryptoAlgorithmSHA1.cpp
418         crypto/algorithms/CryptoAlgorithmSHA224.cpp
419         crypto/algorithms/CryptoAlgorithmSHA256.cpp
420         crypto/algorithms/CryptoAlgorithmSHA384.cpp
421         crypto/algorithms/CryptoAlgorithmSHA512.cpp
422
423         crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp
424         crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp
425         crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp
426         crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp
427         crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp
428         crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp
429         crypto/gnutls/CryptoAlgorithmRegistryGnuTLS.cpp
430         crypto/gnutls/CryptoKeyRSAGnuTLS.cpp
431         crypto/gnutls/SerializedCryptoKeyWrapGnuTLS.cpp
432
433         crypto/keys/CryptoKeyAES.cpp
434         crypto/keys/CryptoKeyDataOctetSequence.cpp
435         crypto/keys/CryptoKeyDataRSAComponents.cpp
436         crypto/keys/CryptoKeyHMAC.cpp
437         crypto/keys/CryptoKeySerializationRaw.cpp
438     )
439 endif ()