[WebIDL] Add support for converting dictionaries to JS
[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/gcrypt/CryptoDigestGCrypt.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/network/soup/AuthenticationChallengeSoup.cpp
170     platform/network/soup/CertificateInfo.cpp
171     platform/network/soup/CookieJarSoup.cpp
172     platform/network/soup/CookieStorageSoup.cpp
173     platform/network/soup/CredentialStorageSoup.cpp
174     platform/network/soup/DNSSoup.cpp
175     platform/network/soup/GRefPtrSoup.cpp
176     platform/network/soup/NetworkStorageSessionSoup.cpp
177     platform/network/soup/ProxyServerSoup.cpp
178     platform/network/soup/ResourceErrorSoup.cpp
179     platform/network/soup/ResourceHandleSoup.cpp
180     platform/network/soup/ResourceRequestSoup.cpp
181     platform/network/soup/ResourceResponseSoup.cpp
182     platform/network/soup/SocketStreamHandleImplSoup.cpp
183     platform/network/soup/SoupNetworkSession.cpp
184     platform/network/soup/SynchronousLoaderClientSoup.cpp
185     platform/network/soup/WebKitSoupRequestGeneric.cpp
186
187     platform/soup/PublicSuffixSoup.cpp
188     platform/soup/SharedBufferSoup.cpp
189     platform/soup/URLSoup.cpp
190
191     platform/text/Hyphenation.cpp
192     platform/text/LocaleICU.cpp
193
194     platform/text/enchant/TextCheckerEnchant.cpp
195
196     platform/text/hyphen/HyphenationLibHyphen.cpp
197
198     platform/unix/LoggingUnix.cpp
199 )
200
201 list(APPEND WebCorePlatformGTK_SOURCES
202     editing/gtk/EditorGtk.cpp
203
204     page/gtk/DragControllerGtk.cpp
205     page/gtk/EventHandlerGtk.cpp
206
207     platform/graphics/PlatformDisplay.cpp
208
209     platform/graphics/freetype/FontPlatformDataFreeType.cpp
210
211     platform/graphics/gtk/ColorGtk.cpp
212     platform/graphics/gtk/GdkCairoUtilities.cpp
213     platform/graphics/gtk/IconGtk.cpp
214     platform/graphics/gtk/ImageBufferGtk.cpp
215     platform/graphics/gtk/ImageGtk.cpp
216
217     platform/gtk/CursorGtk.cpp
218     platform/gtk/DragImageGtk.cpp
219     platform/gtk/GRefPtrGtk.cpp
220     platform/gtk/GtkUtilities.cpp
221     platform/gtk/GtkVersioning.c
222     platform/gtk/LocalizedStringsGtk.cpp
223     platform/gtk/PasteboardHelper.cpp
224     platform/gtk/PlatformKeyboardEventGtk.cpp
225     platform/gtk/PlatformMouseEventGtk.cpp
226     platform/gtk/PlatformPasteboardGtk.cpp
227     platform/gtk/PlatformScreenGtk.cpp
228     platform/gtk/PlatformWheelEventGtk.cpp
229     platform/gtk/RenderThemeGadget.cpp
230     platform/gtk/ScrollbarThemeGtk.cpp
231     platform/gtk/SoundGtk.cpp
232     platform/gtk/WidgetGtk.cpp
233
234     rendering/RenderThemeGtk.cpp
235 )
236
237 if (USE_GEOCLUE2)
238     list(APPEND WebCore_DERIVED_SOURCES
239         ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c
240     )
241     execute_process(COMMAND pkg-config --variable dbus_interface geoclue-2.0 OUTPUT_VARIABLE GEOCLUE_DBUS_INTERFACE)
242     add_custom_command(
243          OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.h
244          COMMAND gdbus-codegen --interface-prefix org.freedesktop.GeoClue2. --c-namespace Geoclue --generate-c-code ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface ${GEOCLUE_DBUS_INTERFACE}
245     )
246     set_source_files_properties(${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
247 endif ()
248
249 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
250     ${WEBCORE_DIR}/css/mediaControlsGtk.css
251 )
252
253 set(WebCore_USER_AGENT_SCRIPTS
254     ${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js
255     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.js
256     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
257 )
258
259 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
260
261 list(APPEND WebCore_LIBRARIES
262     ${ATK_LIBRARIES}
263     ${CAIRO_LIBRARIES}
264     ${ENCHANT_LIBRARIES}
265     ${FONTCONFIG_LIBRARIES}
266     ${FREETYPE2_LIBRARIES}
267     ${GEOCLUE_LIBRARIES}
268     ${GLIB_GIO_LIBRARIES}
269     ${GLIB_GMODULE_LIBRARIES}
270     ${GLIB_GOBJECT_LIBRARIES}
271     ${GLIB_LIBRARIES}
272     ${GUDEV_LIBRARIES}
273     ${HARFBUZZ_LIBRARIES}
274     ${LIBGCRYPT_LIBRARIES}
275     ${LIBSECRET_LIBRARIES}
276     ${LIBSOUP_LIBRARIES}
277     ${LIBXML2_LIBRARIES}
278     ${LIBXSLT_LIBRARIES}
279     ${HYPHEN_LIBRARIES}
280     ${SQLITE_LIBRARIES}
281     ${X11_X11_LIB}
282     ${X11_Xcomposite_LIB}
283     ${X11_Xdamage_LIB}
284     ${X11_Xrender_LIB}
285     ${X11_Xt_LIB}
286     ${ZLIB_LIBRARIES}
287     WTF
288 )
289
290 list(APPEND WebCoreTestSupport_LIBRARIES WTF)
291
292 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
293     ${ATK_INCLUDE_DIRS}
294     ${CAIRO_INCLUDE_DIRS}
295     ${ENCHANT_INCLUDE_DIRS}
296     ${FREETYPE2_INCLUDE_DIRS}
297     ${GEOCLUE_INCLUDE_DIRS}
298     ${GIO_UNIX_INCLUDE_DIRS}
299     ${GLIB_INCLUDE_DIRS}
300     ${GUDEV_INCLUDE_DIRS}
301     ${HARFBUZZ_INCLUDE_DIRS}
302     ${LIBGCRYPT_INCLUDE_DIRS}
303     ${LIBSECRET_INCLUDE_DIRS}
304     ${LIBSOUP_INCLUDE_DIRS}
305     ${LIBXML2_INCLUDE_DIR}
306     ${LIBXSLT_INCLUDE_DIR}
307     ${SQLITE_INCLUDE_DIR}
308     ${ZLIB_INCLUDE_DIRS}
309 )
310
311 if (USE_OPENGL_ES_2)
312     list(APPEND WebCore_SOURCES
313         platform/graphics/opengl/Extensions3DOpenGLES.cpp
314         platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
315     )
316 endif ()
317
318 if (USE_OPENGL)
319     list(APPEND WebCore_SOURCES
320         platform/graphics/OpenGLShims.cpp
321
322         platform/graphics/opengl/Extensions3DOpenGL.cpp
323         platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
324     )
325 endif ()
326
327 if (ENABLE_PLUGIN_PROCESS_GTK2)
328     # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
329     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
330     # for the plugin process.
331     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
332     add_dependencies(WebCorePlatformGTK2 WebCore)
333     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK2)
334     set_property(TARGET WebCorePlatformGTK2
335         APPEND
336         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
337     )
338     target_include_directories(WebCorePlatformGTK2 PRIVATE
339         ${WebCore_INCLUDE_DIRECTORIES}
340         ${GTK2_INCLUDE_DIRS}
341         ${GDK2_INCLUDE_DIRS}
342     )
343     target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
344         ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
345     )
346     target_link_libraries(WebCorePlatformGTK2
347          ${WebCore_LIBRARIES}
348          ${GTK2_LIBRARIES}
349          ${GDK2_LIBRARIES}
350     )
351 endif ()
352
353 if (ENABLE_WAYLAND_TARGET)
354     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
355         ${WAYLAND_INCLUDE_DIRS}
356     )
357     list(APPEND WebCore_LIBRARIES
358         ${WAYLAND_LIBRARIES}
359     )
360 endif ()
361
362 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
363 add_dependencies(WebCorePlatformGTK WebCore)
364 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
365 target_include_directories(WebCorePlatformGTK PRIVATE
366     ${WebCore_INCLUDE_DIRECTORIES}
367 )
368 target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
369     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
370     ${GTK_INCLUDE_DIRS}
371     ${GDK_INCLUDE_DIRS}
372 )
373 target_link_libraries(WebCorePlatformGTK
374     ${WebCore_LIBRARIES}
375     ${GTK_LIBRARIES}
376     ${GDK_LIBRARIES}
377 )
378
379 include_directories(
380     ${WebCore_INCLUDE_DIRECTORIES}
381     "${WEBCORE_DIR}/bindings/gobject/"
382     "${DERIVED_SOURCES_DIR}"
383 )
384
385 include_directories(SYSTEM
386     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
387 )
388
389 add_definitions(-DBUILDING_WEBKIT)
390
391 if (ENABLE_SMOOTH_SCROLLING)
392     list(APPEND WebCore_SOURCES
393         platform/ScrollAnimationSmooth.cpp
394     )
395 endif ()
396
397 if (ENABLE_SUBTLE_CRYPTO)
398     list(APPEND WebCore_SOURCES
399         crypto/CryptoAlgorithm.cpp
400         crypto/CryptoAlgorithmRegistry.cpp
401         crypto/CryptoKey.cpp
402         crypto/SubtleCrypto.cpp
403         crypto/WebKitSubtleCrypto.cpp
404
405         crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
406         crypto/algorithms/CryptoAlgorithmAES_KW.cpp
407         crypto/algorithms/CryptoAlgorithmHMAC.cpp
408         crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
409         crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
410         crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
411         crypto/algorithms/CryptoAlgorithmSHA1.cpp
412         crypto/algorithms/CryptoAlgorithmSHA224.cpp
413         crypto/algorithms/CryptoAlgorithmSHA256.cpp
414         crypto/algorithms/CryptoAlgorithmSHA384.cpp
415         crypto/algorithms/CryptoAlgorithmSHA512.cpp
416
417         crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp
418
419         crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp
420         crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp
421         crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp
422         crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp
423         crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp
424         crypto/gnutls/CryptoAlgorithmRegistryGnuTLS.cpp
425         crypto/gnutls/CryptoKeyRSAGnuTLS.cpp
426         crypto/gnutls/SerializedCryptoKeyWrapGnuTLS.cpp
427
428         crypto/keys/CryptoKeyAES.cpp
429         crypto/keys/CryptoKeyDataOctetSequence.cpp
430         crypto/keys/CryptoKeyDataRSAComponents.cpp
431         crypto/keys/CryptoKeyHMAC.cpp
432         crypto/keys/CryptoKeyRSA.cpp
433         crypto/keys/CryptoKeySerializationRaw.cpp
434     )
435 endif ()