[EFL] Add Gamepad support
[WebKit-https.git] / Source / WebCore / PlatformEfl.cmake
1 LIST(APPEND WebCore_LINK_FLAGS
2     ${ECORE_X_LDFLAGS}
3     ${EFLDEPS_LDFLAGS}
4 )
5
6 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
7   "${WEBCORE_DIR}/accessibility/efl"
8   "${WEBCORE_DIR}/page/efl"
9   "${WEBCORE_DIR}/platform/efl"
10   "${WEBCORE_DIR}/platform/graphics/efl"
11   "${WEBCORE_DIR}/platform/linux"
12   "${WEBCORE_DIR}/platform/mediastream/gstreamer"
13   "${WEBCORE_DIR}/platform/network/soup"
14   "${WEBCORE_DIR}/platform/text/efl"
15   "${WEBCORE_DIR}/plugins/efl"
16   "${WEBKIT_DIR}/efl/WebCoreSupport"
17   "${WEBKIT_DIR}/efl/ewk"
18 )
19
20 LIST(APPEND WebCore_SOURCES
21   accessibility/efl/AccessibilityObjectEfl.cpp
22   bindings/js/ScriptControllerEfl.cpp
23   page/efl/DragControllerEfl.cpp
24   page/efl/EventHandlerEfl.cpp
25   platform/Cursor.cpp
26   platform/efl/ClipboardEfl.cpp
27   platform/efl/ColorChooserEfl.cpp
28   platform/efl/ContextMenuEfl.cpp
29   platform/efl/ContextMenuItemEfl.cpp
30   platform/efl/CursorEfl.cpp
31   platform/efl/DragDataEfl.cpp
32   platform/efl/DragImageEfl.cpp
33   platform/efl/EflKeyboardUtilities.cpp
34   platform/efl/EflScreenUtilities.cpp
35   platform/efl/EventLoopEfl.cpp
36   platform/efl/FileSystemEfl.cpp
37   platform/efl/GamepadsEfl.cpp
38   platform/efl/KURLEfl.cpp
39   platform/efl/LanguageEfl.cpp
40   platform/efl/LocalizedStringsEfl.cpp
41   platform/efl/LoggingEfl.cpp
42   platform/efl/MIMETypeRegistryEfl.cpp
43   platform/efl/PasteboardEfl.cpp
44   platform/efl/PlatformKeyboardEventEfl.cpp
45   platform/efl/PlatformMouseEventEfl.cpp
46   platform/efl/PlatformScreenEfl.cpp
47   platform/efl/PlatformTouchEventEfl.cpp
48   platform/efl/PlatformTouchPointEfl.cpp
49   platform/efl/PlatformWheelEventEfl.cpp
50   platform/efl/PopupMenuEfl.cpp
51   platform/efl/RefPtrEfl.cpp
52   platform/efl/RenderThemeEfl.cpp
53   platform/efl/RunLoopEfl.cpp
54   platform/efl/ScrollViewEfl.cpp
55   platform/efl/ScrollbarEfl.cpp
56   platform/efl/ScrollbarThemeEfl.cpp
57   platform/efl/SearchPopupMenuEfl.cpp
58   platform/efl/SharedBufferEfl.cpp
59   platform/efl/SharedTimerEfl.cpp
60   platform/efl/SoundEfl.cpp
61   platform/efl/SystemTimeEfl.cpp
62   platform/efl/TemporaryLinkStubs.cpp
63   platform/efl/WidgetEfl.cpp
64   platform/graphics/ImageSource.cpp
65   platform/graphics/efl/GraphicsLayerEfl.cpp
66   platform/graphics/efl/IconEfl.cpp
67   platform/graphics/efl/ImageEfl.cpp
68   platform/graphics/efl/IntPointEfl.cpp
69   platform/graphics/efl/IntRectEfl.cpp
70   platform/image-decoders/ImageDecoder.cpp
71   platform/image-decoders/bmp/BMPImageDecoder.cpp
72   platform/image-decoders/bmp/BMPImageReader.cpp
73   platform/image-decoders/gif/GIFImageDecoder.cpp
74   platform/image-decoders/gif/GIFImageReader.cpp
75   platform/image-decoders/ico/ICOImageDecoder.cpp
76   platform/image-decoders/jpeg/JPEGImageDecoder.cpp
77   platform/image-decoders/png/PNGImageDecoder.cpp
78   platform/image-decoders/webp/WEBPImageDecoder.cpp
79   platform/linux/GamepadDeviceLinux.cpp
80   platform/mediastream/gstreamer/DeprecatedPeerConnectionHandler.cpp
81   platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
82   platform/network/soup/CookieJarSoup.cpp
83   platform/network/soup/CredentialStorageSoup.cpp
84   platform/network/soup/DNSSoup.cpp
85   platform/network/soup/GOwnPtrSoup.cpp
86   platform/network/soup/ProxyServerSoup.cpp
87   platform/network/soup/ResourceHandleSoup.cpp
88   platform/network/soup/ResourceRequestSoup.cpp
89   platform/network/soup/ResourceResponseSoup.cpp
90   platform/network/soup/SocketStreamHandleSoup.cpp
91   platform/network/soup/SoupURIUtils.cpp
92   platform/PlatformStrategies.cpp
93   platform/posix/FileSystemPOSIX.cpp
94   platform/text/efl/TextBreakIteratorInternalICUEfl.cpp
95 )
96
97 IF (ENABLE_NETSCAPE_PLUGIN_API)
98   LIST(APPEND WebCore_SOURCES
99     plugins/PluginDatabase.cpp
100     plugins/PluginDebug.cpp
101     plugins/PluginPackage.cpp
102     plugins/PluginStream.cpp
103     plugins/PluginView.cpp
104
105     plugins/efl/PluginPackageEfl.cpp
106     plugins/efl/PluginViewEfl.cpp
107   )
108 ELSE ()
109   LIST(APPEND WebCore_SOURCES
110     plugins/PluginPackageNone.cpp
111     plugins/PluginViewNone.cpp
112   )
113 ENDIF ()
114
115 LIST(APPEND WebCore_USER_AGENT_STYLE_SHEETS
116     ${WEBCORE_DIR}/css/mediaControlsEfl.css
117     ${WEBCORE_DIR}/css/mediaControlsEflFullscreen.css
118 )
119
120 IF (WTF_USE_CAIRO)
121   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
122     "${WEBCORE_DIR}/platform/cairo"
123     "${WEBCORE_DIR}/platform/graphics/cairo"
124   )
125   LIST(APPEND WebCore_SOURCES
126     platform/cairo/WidgetBackingStoreCairo.cpp
127     platform/graphics/cairo/BitmapImageCairo.cpp
128     platform/graphics/cairo/CairoUtilities.cpp
129     platform/graphics/cairo/FontCairo.cpp
130     platform/graphics/cairo/GradientCairo.cpp
131     platform/graphics/cairo/GraphicsContextCairo.cpp
132     platform/graphics/cairo/ImageBufferCairo.cpp
133     platform/graphics/cairo/ImageCairo.cpp
134     platform/graphics/cairo/NativeImageCairo.cpp
135     platform/graphics/cairo/OwnPtrCairo.cpp
136     platform/graphics/cairo/PathCairo.cpp
137     platform/graphics/cairo/PatternCairo.cpp
138     platform/graphics/cairo/PlatformContextCairo.cpp
139     platform/graphics/cairo/PlatformPathCairo.cpp
140     platform/graphics/cairo/RefPtrCairo.cpp
141     platform/graphics/cairo/TransformationMatrixCairo.cpp
142
143     platform/image-decoders/cairo/ImageDecoderCairo.cpp
144   )
145
146   IF (WTF_USE_FREETYPE)
147     LIST(APPEND WebCore_INCLUDE_DIRECTORIES
148       "${WEBCORE_DIR}/platform/graphics/freetype"
149     )
150     LIST(APPEND WebCore_SOURCES
151       platform/graphics/WOFFFileFormat.cpp
152       platform/graphics/efl/FontEfl.cpp
153       platform/graphics/freetype/FontCacheFreeType.cpp
154       platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
155       platform/graphics/freetype/FontPlatformDataFreeType.cpp
156       platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
157       platform/graphics/freetype/SimpleFontDataFreeType.cpp
158     )
159   ENDIF ()
160
161   IF (WTF_USE_PANGO)
162     LIST(APPEND WebCore_INCLUDE_DIRECTORIES
163       "${WEBCORE_DIR}/platform/graphics/pango"
164       ${Pango_INCLUDE_DIRS}
165     )
166     LIST(APPEND WebCore_SOURCES
167       platform/graphics/pango/FontPango.cpp
168       platform/graphics/pango/FontCachePango.cpp
169       platform/graphics/pango/FontCustomPlatformDataPango.cpp
170       platform/graphics/pango/FontPlatformDataPango.cpp
171       platform/graphics/pango/GlyphPageTreeNodePango.cpp
172       platform/graphics/pango/SimpleFontDataPango.cpp
173       platform/graphics/pango/PangoUtilities.cpp
174     )
175     LIST(APPEND WebCore_LIBRARIES
176       ${Pango_LIBRARY}
177       ${Pango_Cairo_LIBRARY}
178     )
179   ENDIF ()
180 ENDIF ()
181
182 IF (WTF_USE_ICU_UNICODE)
183   LIST(APPEND WebCore_SOURCES
184     editing/SmartReplaceICU.cpp
185     platform/text/TextEncodingDetectorICU.cpp
186     platform/text/TextBreakIteratorICU.cpp
187     platform/text/TextCodecICU.cpp
188   )
189 ENDIF ()
190
191 LIST(APPEND WebCore_LIBRARIES
192   ${CAIRO_LIBRARIES}
193   ${ECORE_X_LIBRARIES}
194   ${EFLDEPS_LIBRARIES}
195   ${EVAS_LIBRARIES}
196   ${FONTCONFIG_LIBRARIES}
197   ${FREETYPE_LIBRARIES}
198   ${ICU_LIBRARIES}
199   ${JPEG_LIBRARY}
200   ${LIBXML2_LIBRARIES}
201   ${LIBXSLT_LIBRARIES}
202   ${PNG_LIBRARY}
203   ${SQLITE_LIBRARIES}
204   ${Glib_LIBRARIES}
205   ${LIBSOUP24_LIBRARIES}
206   ${ZLIB_LIBRARIES}
207 )
208
209 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
210   ${CAIRO_INCLUDE_DIRS}
211   ${ECORE_X_INCLUDE_DIRS}
212   ${EFLDEPS_INCLUDE_DIRS}
213   ${EVAS_INCLUDE_DIRS}
214   ${FREETYPE_INCLUDE_DIRS}
215   ${ICU_INCLUDE_DIRS}
216   ${LIBXML2_INCLUDE_DIR}
217   ${LIBXSLT_INCLUDE_DIR}
218   ${SQLITE_INCLUDE_DIR}
219   ${Glib_INCLUDE_DIRS}
220   ${LIBSOUP24_INCLUDE_DIRS}
221   ${ZLIB_INCLUDE_DIRS}
222 )
223
224 IF (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
225   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
226     "${WEBCORE_DIR}/platform/graphics/gstreamer"
227
228     ${GSTREAMER_INCLUDE_DIRS}
229     ${GSTREAMER_BASE_INCLUDE_DIRS}
230     ${GSTREAMER_APP_INCLUDE_DIRS}
231     ${GSTREAMER_INTERFACES_INCLUDE_DIRS}
232     ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
233   )
234   LIST(APPEND WebCore_SOURCES
235     platform/graphics/gstreamer/GRefPtrGStreamer.cpp
236     platform/graphics/gstreamer/GStreamerUtilities.cpp
237     platform/graphics/gstreamer/GStreamerVersioning.cpp
238   )
239   LIST(APPEND WebCore_LIBRARIES
240     ${GSTREAMER_LIBRARIES}
241     ${GSTREAMER_BASE_LIBRARIES}
242     ${GSTREAMER_APP_LIBRARIES}
243     ${GSTREAMER_INTERFACES_LIBRARIES}
244     ${GSTREAMER_PBUTILS_LIBRARIES}
245   )
246 ENDIF ()
247
248 IF (ENABLE_VIDEO)
249   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
250     ${GSTREAMER_VIDEO_INCLUDE_DIRS}
251   )
252   LIST(APPEND WebCore_SOURCES
253     platform/graphics/gstreamer/GStreamerGWorld.cpp
254     platform/graphics/gstreamer/ImageGStreamerCairo.cpp
255     platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
256     platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp
257     platform/graphics/gstreamer/VideoSinkGStreamer.cpp
258     platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
259   )
260   LIST(APPEND WebCore_LIBRARIES
261     ${GSTREAMER_VIDEO_LIBRARIES}
262   )
263 ENDIF ()
264
265 IF (ENABLE_WEBGL)
266   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
267     ${OPENGL_INCLUDE_DIR}
268     "${WEBCORE_DIR}/platform/graphics/cairo"
269     "${WEBCORE_DIR}/platform/graphics/glx"
270     "${WEBCORE_DIR}/platform/graphics/opengl"
271   )
272   LIST(APPEND WebCore_LIBRARIES
273     ${OPENGL_gl_LIBRARY}
274   )
275   LIST(APPEND WebCore_SOURCES
276     platform/graphics/cairo/DrawingBufferCairo.cpp
277     platform/graphics/cairo/GraphicsContext3DCairo.cpp
278     platform/graphics/glx/GraphicsContext3DPrivate.cpp
279     platform/graphics/OpenGLShims.cpp
280     platform/graphics/opengl/Extensions3DOpenGL.cpp
281     platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
282     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
283   )
284 ENDIF ()
285
286 ADD_DEFINITIONS(-DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1
287                 -DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}")
288
289 IF (ENABLE_WEB_AUDIO)
290   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
291     "${WEBCORE_DIR}/platform/audio/gstreamer"
292
293     ${GSTREAMER_AUDIO_INCLUDE_DIRS}
294     ${GSTREAMER_FFT_INCLUDE_DIRS}
295   )
296   LIST(APPEND WebCore_SOURCES
297     platform/audio/efl/AudioBusEfl.cpp
298     platform/audio/gstreamer/AudioDestinationGStreamer.cpp
299     platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
300     platform/audio/gstreamer/FFTFrameGStreamer.cpp
301     platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
302   )
303   LIST(APPEND WebCore_LIBRARIES
304     ${GSTREAMER_AUDIO_LIBRARIES}
305     ${GSTREAMER_FFT_LIBRARIES}
306   )
307   SET(WEB_AUDIO_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webaudio/resources)
308   FILE(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav")
309   INSTALL(FILES ${WEB_AUDIO_DATA} DESTINATION ${WEB_AUDIO_DIR})
310   ADD_DEFINITIONS(-DUNINSTALLED_AUDIO_RESOURCES_DIR="${WEBCORE_DIR}/platform/audio/resources")
311 ENDIF ()
312
313 IF (ENABLE_GAMEPAD)
314   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
315     ${EEZE_INCLUDE_DIRS}
316   )
317   LIST(APPEND WebCore_LIBRARIES
318     ${EEZE_LIBRARIES}
319   )
320 ENDIF ()
321