[EFL][Qt][WebGL] Share the common code between GraphicsSurfaceGLX and X11WindowResources.
[WebKit-https.git] / Source / WebCore / PlatformEfl.cmake
1 list(APPEND WebCore_INCLUDE_DIRECTORIES
2     "${WEBCORE_DIR}/page/efl"
3     "${WEBCORE_DIR}/platform/cairo"
4     "${WEBCORE_DIR}/platform/efl"
5     "${WEBCORE_DIR}/platform/graphics/cairo"
6     "${WEBCORE_DIR}/platform/graphics/efl"
7     "${WEBCORE_DIR}/platform/graphics/freetype"
8     "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
9     "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
10     "${WEBCORE_DIR}/platform/linux"
11     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
12     "${WEBCORE_DIR}/platform/network/soup"
13     "${WEBCORE_DIR}/platform/text/efl"
14     "${WEBCORE_DIR}/plugins/efl"
15 )
16
17 list(APPEND WebCore_SOURCES
18     accessibility/atk/AccessibilityObjectAtk.cpp
19     accessibility/atk/AXObjectCacheAtk.cpp
20     accessibility/atk/WebKitAccessibleHyperlink.cpp
21     accessibility/atk/WebKitAccessibleInterfaceAction.cpp
22     accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
23     accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
24     accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
25     accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
26     accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
27     accessibility/atk/WebKitAccessibleInterfaceImage.cpp
28     accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
29     accessibility/atk/WebKitAccessibleInterfaceTable.cpp
30     accessibility/atk/WebKitAccessibleInterfaceText.cpp
31     accessibility/atk/WebKitAccessibleInterfaceValue.cpp
32     accessibility/atk/WebKitAccessibleUtil.cpp
33     accessibility/atk/WebKitAccessibleWrapperAtk.cpp
34
35     editing/SmartReplaceICU.cpp
36
37     page/efl/DragControllerEfl.cpp
38     page/efl/EventHandlerEfl.cpp
39
40     platform/cairo/WidgetBackingStoreCairo.cpp
41
42     platform/Cursor.cpp
43
44     platform/audio/efl/AudioBusEfl.cpp
45     platform/audio/gstreamer/AudioDestinationGStreamer.cpp
46     platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
47     platform/audio/gstreamer/FFTFrameGStreamer.cpp
48     platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
49
50     platform/efl/AsyncFileSystemEfl.cpp
51     platform/efl/BatteryProviderEfl.cpp
52     platform/efl/ClipboardEfl.cpp
53     platform/efl/ContextMenuEfl.cpp
54     platform/efl/ContextMenuItemEfl.cpp
55     platform/efl/CursorEfl.cpp
56     platform/efl/DragDataEfl.cpp
57     platform/efl/DragImageEfl.cpp
58     platform/efl/EflInspectorUtilities.cpp
59     platform/efl/EflKeyboardUtilities.cpp
60     platform/efl/EflScreenUtilities.cpp
61     platform/efl/ErrorsEfl.cpp
62     platform/efl/EventLoopEfl.cpp
63     platform/efl/FileSystemEfl.cpp
64     platform/efl/GamepadsEfl.cpp
65     platform/efl/KURLEfl.cpp
66     platform/efl/LanguageEfl.cpp
67     platform/efl/LocalizedStringsEfl.cpp
68     platform/efl/LoggingEfl.cpp
69     platform/efl/MIMETypeRegistryEfl.cpp
70     platform/efl/NetworkInfoProviderEfl.cpp
71     platform/efl/PasteboardEfl.cpp
72     platform/efl/PlatformKeyboardEventEfl.cpp
73     platform/efl/PlatformMouseEventEfl.cpp
74     platform/efl/PlatformScreenEfl.cpp
75     platform/efl/PlatformWheelEventEfl.cpp
76     platform/efl/RenderThemeEfl.cpp
77     platform/efl/RunLoopEfl.cpp
78     platform/efl/ScrollbarEfl.cpp
79     platform/efl/ScrollbarThemeEfl.cpp
80     platform/efl/ScrollViewEfl.cpp
81     platform/efl/SharedTimerEfl.cpp
82     platform/efl/SoundEfl.cpp
83     platform/efl/SystemTimeEfl.cpp
84     platform/efl/TemporaryLinkStubs.cpp
85     platform/efl/WidgetEfl.cpp
86
87     platform/graphics/cairo/BitmapImageCairo.cpp
88     platform/graphics/cairo/CairoUtilities.cpp
89     platform/graphics/cairo/FontCairo.cpp
90     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
91     platform/graphics/cairo/GradientCairo.cpp
92     platform/graphics/cairo/GraphicsContextCairo.cpp
93     platform/graphics/cairo/ImageBufferCairo.cpp
94     platform/graphics/cairo/ImageCairo.cpp
95     platform/graphics/cairo/IntRectCairo.cpp
96     platform/graphics/cairo/NativeImageCairo.cpp
97     platform/graphics/cairo/OwnPtrCairo.cpp
98     platform/graphics/cairo/PathCairo.cpp
99     platform/graphics/cairo/PatternCairo.cpp
100     platform/graphics/cairo/PlatformContextCairo.cpp
101     platform/graphics/cairo/PlatformPathCairo.cpp
102     platform/graphics/cairo/RefPtrCairo.cpp
103     platform/graphics/cairo/TileCairo.cpp
104     platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp
105     platform/graphics/cairo/TransformationMatrixCairo.cpp
106
107     platform/graphics/efl/CairoUtilitiesEfl.cpp
108     platform/graphics/efl/IconEfl.cpp
109     platform/graphics/efl/ImageEfl.cpp
110     platform/graphics/efl/IntPointEfl.cpp
111     platform/graphics/efl/IntRectEfl.cpp
112
113     platform/graphics/freetype/FontCacheFreeType.cpp
114     platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
115     platform/graphics/freetype/FontPlatformDataFreeType.cpp
116     platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
117     platform/graphics/freetype/SimpleFontDataFreeType.cpp
118
119     platform/graphics/gstreamer/GRefPtrGStreamer.cpp
120     platform/graphics/gstreamer/GStreamerGWorld.cpp
121     platform/graphics/gstreamer/GStreamerUtilities.cpp
122     platform/graphics/gstreamer/GStreamerVersioning.cpp
123     platform/graphics/gstreamer/ImageGStreamerCairo.cpp
124     platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
125     platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
126     platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp
127     platform/graphics/gstreamer/VideoSinkGStreamer.cpp
128     platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
129
130     platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp
131     platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
132     platform/graphics/harfbuzz/HarfBuzzFace.cpp
133     platform/graphics/harfbuzz/HarfBuzzShaper.cpp
134
135     platform/graphics/WOFFFileFormat.cpp
136
137     platform/image-decoders/cairo/ImageDecoderCairo.cpp
138
139     platform/linux/GamepadDeviceLinux.cpp
140
141     platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
142
143     platform/network/efl/NetworkStateNotifierEfl.cpp
144
145     platform/network/soup/AuthenticationChallengeSoup.cpp
146     platform/network/soup/CookieJarSoup.cpp
147     platform/network/soup/CookieStorageSoup.cpp
148     platform/network/soup/CredentialStorageSoup.cpp
149     platform/network/soup/DNSSoup.cpp
150     platform/network/soup/GOwnPtrSoup.cpp
151     platform/network/soup/NetworkStorageSessionSoup.cpp
152     platform/network/soup/ProxyResolverSoup.cpp
153     platform/network/soup/ProxyServerSoup.cpp
154     platform/network/soup/ResourceErrorSoup.cpp
155     platform/network/soup/ResourceHandleSoup.cpp
156     platform/network/soup/ResourceRequestSoup.cpp
157     platform/network/soup/ResourceResponseSoup.cpp
158     platform/network/soup/SocketStreamHandleSoup.cpp
159     platform/network/soup/SoupURIUtils.cpp
160
161     platform/PlatformStrategies.cpp
162
163     platform/posix/FileSystemPOSIX.cpp
164     platform/posix/SharedBufferPOSIX.cpp
165
166     platform/text/efl/TextBreakIteratorInternalICUEfl.cpp
167     platform/text/enchant/TextCheckerEnchant.cpp
168     platform/text/TextBreakIteratorICU.cpp
169     platform/text/TextCodecICU.cpp
170     platform/text/TextEncodingDetectorICU.cpp
171 )
172
173 if (ENABLE_BATTERY_STATUS)
174     list(APPEND WebCore_INCLUDE_DIRECTORIES ${DBUS_INCLUDE_DIRS})
175     list(APPEND WebCore_LIBRARIES ${DBUS_LIBRARIES})
176 endif ()
177
178 if (ENABLE_NETSCAPE_PLUGIN_API)
179     list(APPEND WebCore_SOURCES
180         plugins/PluginDatabase.cpp
181         plugins/PluginDebug.cpp
182         plugins/PluginPackage.cpp
183         plugins/PluginStream.cpp
184         plugins/PluginView.cpp
185
186         plugins/efl/PluginPackageEfl.cpp
187         plugins/efl/PluginViewEfl.cpp
188     )
189 else ()
190     list(APPEND WebCore_SOURCES
191         plugins/PluginPackageNone.cpp
192         plugins/PluginViewNone.cpp
193     )
194 endif ()
195
196 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
197     ${WEBCORE_DIR}/css/mediaControlsEfl.css
198     ${WEBCORE_DIR}/css/mediaControlsEflFullscreen.css
199 )
200
201 if (WTF_USE_TEXTURE_MAPPER)
202     list(APPEND WebCore_SOURCES
203         platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
204     )
205 endif ()
206
207 list(APPEND WebCore_LIBRARIES
208     ${CAIRO_LIBRARIES}
209     ${ECORE_LIBRARIES}
210     ${ECORE_EVAS_LIBRARIES}
211     ${ECORE_FILE_LIBRARIES}
212     ${ECORE_X_LIBRARIES}
213     ${EO_LIBRARIES}
214     ${E_DBUS_LIBRARIES}
215     ${E_DBUS_EUKIT_LIBRARIES}
216     ${EDJE_LIBRARIES}
217     ${EEZE_LIBRARIES}
218     ${EINA_LIBRARIES}
219     ${EVAS_LIBRARIES}
220     ${FONTCONFIG_LIBRARIES}
221     ${FREETYPE_LIBRARIES}
222     ${ICU_LIBRARIES}
223     ${JPEG_LIBRARIES}
224     ${LIBXML2_LIBRARIES}
225     ${LIBXSLT_LIBRARIES}
226     ${PNG_LIBRARIES}
227     ${SQLITE_LIBRARIES}
228     ${GLIB_LIBRARIES}
229     ${GLIB_GIO_LIBRARIES}
230     ${GLIB_GOBJECT_LIBRARIES}
231     ${LIBSOUP_LIBRARIES}
232     ${ZLIB_LIBRARIES}
233     ${HARFBUZZ_LIBRARIES}
234 )
235
236 list(APPEND WebCore_INCLUDE_DIRECTORIES
237     ${CAIRO_INCLUDE_DIRS}
238     ${ECORE_INCLUDE_DIRS}
239     ${ECORE_EVAS_INCLUDE_DIRS}
240     ${ECORE_FILE_INCLUDE_DIRS}
241     ${ECORE_X_INCLUDE_DIRS}
242     ${EO_INCLUDE_DIRS}
243     ${E_DBUS_INCLUDE_DIRS}
244     ${E_DBUS_EUKIT_INCLUDE_DIRS}
245     ${EDJE_INCLUDE_DIRS}
246     ${EEZE_INCLUDE_DIRS}
247     ${EINA_INCLUDE_DIRS}
248     ${EVAS_INCLUDE_DIRS}
249     ${FREETYPE_INCLUDE_DIRS}
250     ${ICU_INCLUDE_DIRS}
251     ${LIBXML2_INCLUDE_DIR}
252     ${LIBXSLT_INCLUDE_DIR}
253     ${SQLITE_INCLUDE_DIR}
254     ${GLIB_INCLUDE_DIRS}
255     ${LIBSOUP_INCLUDE_DIRS}
256     ${ZLIB_INCLUDE_DIRS}
257     ${HARFBUZZ_INCLUDE_DIRS}
258 )
259
260 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
261     list(APPEND WebCore_INCLUDE_DIRECTORIES
262         "${WEBCORE_DIR}/platform/graphics/gstreamer"
263
264         ${GSTREAMER_INCLUDE_DIRS}
265         ${GSTREAMER_BASE_INCLUDE_DIRS}
266         ${GSTREAMER_APP_INCLUDE_DIRS}
267         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
268     )
269
270     list(APPEND WebCore_LIBRARIES
271         ${GSTREAMER_LIBRARIES}
272         ${GSTREAMER_BASE_LIBRARIES}
273         ${GSTREAMER_APP_LIBRARIES}
274         ${GSTREAMER_PBUTILS_LIBRARIES}
275     )
276     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
277     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
278 endif ()
279
280 if (ENABLE_VIDEO)
281     list(APPEND WebCore_INCLUDE_DIRECTORIES
282         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
283     )
284     list(APPEND WebCore_LIBRARIES
285         ${GSTREAMER_VIDEO_LIBRARIES}
286     )
287 endif ()
288
289 if (WTF_USE_3D_GRAPHICS)
290     set(WTF_USE_OPENGL 1)
291     add_definitions(-DWTF_USE_OPENGL=1)
292
293     list(APPEND WebCore_INCLUDE_DIRECTORIES
294         "${WEBCORE_DIR}/platform/graphics/opengl"
295         "${WEBCORE_DIR}/platform/graphics/surfaces"
296         "${WEBCORE_DIR}/platform/graphics/surfaces/glx"
297         "${WEBCORE_DIR}/platform/graphics/texmap"
298     )
299
300     if (WTF_USE_EGL)
301         list(APPEND WebCore_INCLUDE_DIRECTORIES
302             ${EGL_INCLUDE_DIR}
303             "${WEBCORE_DIR}/platform/graphics/surfaces/egl"
304     )
305     endif ()
306
307     list(APPEND WebCore_SOURCES
308         platform/graphics/cairo/DrawingBufferCairo.cpp
309         platform/graphics/efl/GraphicsContext3DEfl.cpp
310         platform/graphics/efl/GraphicsContext3DPrivate.cpp
311         platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
312         platform/graphics/opengl/GLPlatformContext.cpp
313         platform/graphics/opengl/GLPlatformSurface.cpp
314         platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
315         platform/graphics/surfaces/GraphicsSurface.cpp
316         platform/graphics/surfaces/glx/X11Helper.cpp
317         platform/graphics/texmap/TextureMapperGL.cpp
318         platform/graphics/texmap/TextureMapperShaderProgram.cpp
319     )
320
321     if (WTF_USE_EGL)
322         list(APPEND WebCore_SOURCES
323             platform/graphics/surfaces/egl/EGLConfigSelector.cpp
324             platform/graphics/surfaces/egl/EGLContext.cpp
325             platform/graphics/surfaces/egl/EGLSurface.cpp
326         )
327     else ()
328         list(APPEND WebCore_SOURCES
329             platform/graphics/surfaces/glx/GLXContext.cpp
330             platform/graphics/surfaces/glx/GLXSurface.cpp
331             platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp
332         )
333     endif ()
334
335     if (WTF_USE_OPENGL_ES_2)
336         list(APPEND WebCore_SOURCES
337             platform/graphics/opengl/Extensions3DOpenGLES.cpp
338             platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
339         )
340     else ()
341         list(APPEND WebCore_SOURCES
342             platform/graphics/opengl/Extensions3DOpenGL.cpp
343             platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
344             platform/graphics/OpenGLShims.cpp
345         )
346     endif ()
347
348     list(APPEND WebCore_LIBRARIES
349         ${X11_X11_LIB}
350         ${X11_Xcomposite_LIB}
351         ${X11_Xrender_LIB}
352     )
353     if (WTF_USE_EGL)
354         list(APPEND WebCore_LIBRARIES
355             ${EGL_LIBRARY}
356         )
357     endif ()
358 endif ()
359
360 add_definitions(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}")
361
362 if (ENABLE_WEB_AUDIO)
363     list(APPEND WebCore_INCLUDE_DIRECTORIES
364         "${WEBCORE_DIR}/platform/audio/gstreamer"
365
366         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
367         ${GSTREAMER_FFT_INCLUDE_DIRS}
368     )
369     list(APPEND WebCore_LIBRARIES
370         ${GSTREAMER_AUDIO_LIBRARIES}
371         ${GSTREAMER_FFT_LIBRARIES}
372     )
373     set(WEB_AUDIO_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webaudio/resources)
374     file(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav")
375     install(FILES ${WEB_AUDIO_DATA} DESTINATION ${WEB_AUDIO_DIR})
376     add_definitions(-DUNINSTALLED_AUDIO_RESOURCES_DIR="${WEBCORE_DIR}/platform/audio/resources")
377 endif ()
378
379 if (ENABLE_SPELLCHECK)
380     list(APPEND WebCore_INCLUDE_DIRECTORIES
381         ${ENCHANT_INCLUDE_DIRS}
382     )
383     list(APPEND WebCore_LIBRARIES
384         ${ENCHANT_LIBRARIES}
385     )
386 endif ()
387
388 if (ENABLE_ACCESSIBILITY)
389     list(APPEND WebCore_INCLUDE_DIRECTORIES
390         "${WEBCORE_DIR}/accessibility/atk"
391         ${ATK_INCLUDE_DIRS}
392     )
393     list(APPEND WebCore_LIBRARIES
394         ${ATK_LIBRARIES}
395     )
396 endif ()