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