Nix upstreaming - Adding build files and supporting scripts
[WebKit-https.git] / Source / WebCore / PlatformNix.cmake
1 list(APPEND WebCore_INCLUDE_DIRECTORIES
2     "${WEBCORE_DIR}/platform/nix"
3     "${WEBCORE_DIR}/platform/cairo"
4     "${WEBCORE_DIR}/platform/graphics/cairo"
5     "${WEBCORE_DIR}/platform/graphics/freetype"
6     "${WEBCORE_DIR}/platform/graphics/glx"
7     "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
8     "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
9     "${WEBCORE_DIR}/platform/graphics/nix"
10     "${WEBCORE_DIR}/platform/graphics/opengl"
11     "${WEBCORE_DIR}/platform/graphics/opentype"
12     "${WEBCORE_DIR}/platform/graphics/surfaces"
13     "${WEBCORE_DIR}/platform/graphics/texmap"
14     "${WEBCORE_DIR}/platform/linux"
15     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
16     "${PLATFORM_DIR}/nix/"
17 )
18
19 list(APPEND WebCore_SOURCES
20     css/WebKitCSSArrayFunctionValue.cpp
21     css/WebKitCSSMatFunctionValue.cpp
22     css/WebKitCSSMatrix.cpp
23     css/WebKitCSSMixFunctionValue.cpp
24
25     editing/SmartReplaceICU.cpp
26
27     html/shadow/MediaControlsNix.cpp
28
29     page/TouchAdjustment.cpp
30
31     page/nix/EventHandlerNix.cpp
32
33     platform/ContextMenuItemNone.cpp
34     platform/ContextMenuNone.cpp
35     platform/Cursor.cpp
36     platform/LocalizedStrings.cpp
37     platform/PlatformStrategies.cpp
38
39     platform/cairo/WidgetBackingStoreCairo.cpp
40
41     platform/graphics/ImageSource.cpp
42     platform/graphics/OpenGLShims.cpp
43     platform/graphics/WOFFFileFormat.cpp
44
45     platform/graphics/cairo/BitmapImageCairo.cpp
46     platform/graphics/cairo/CairoUtilities.cpp
47     platform/graphics/cairo/DrawingBufferCairo.cpp
48     platform/graphics/cairo/FontCairo.cpp
49     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
50     platform/graphics/cairo/GradientCairo.cpp
51     platform/graphics/cairo/GraphicsContextCairo.cpp
52     platform/graphics/cairo/ImageBufferCairo.cpp
53     platform/graphics/cairo/ImageCairo.cpp
54     platform/graphics/cairo/IntRectCairo.cpp
55     platform/graphics/cairo/OwnPtrCairo.cpp
56     platform/graphics/cairo/PathCairo.cpp
57     platform/graphics/cairo/PatternCairo.cpp
58     platform/graphics/cairo/PlatformContextCairo.cpp
59     platform/graphics/cairo/PlatformPathCairo.cpp
60     platform/graphics/cairo/RefPtrCairo.cpp
61     platform/graphics/cairo/TileCairo.cpp
62     platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp
63     platform/graphics/cairo/TransformationMatrixCairo.cpp
64
65     platform/graphics/filters/CustomFilterMeshGenerator.cpp
66     platform/graphics/filters/CustomFilterValidatedProgram.cpp
67
68     platform/graphics/freetype/FontCacheFreeType.cpp
69     platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
70     platform/graphics/freetype/FontPlatformDataFreeType.cpp
71     platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
72     platform/graphics/freetype/SimpleFontDataFreeType.cpp
73
74     platform/graphics/harfbuzz/HarfBuzzFace.cpp
75     platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
76     platform/graphics/harfbuzz/HarfBuzzShaper.cpp
77
78     platform/graphics/nix/IconNix.cpp
79     platform/graphics/nix/ImageNix.cpp
80
81     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
82     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
83
84     platform/graphics/opentype/OpenTypeVerticalData.cpp
85
86     platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
87     platform/graphics/texmap/TextureMapperGL.cpp
88     platform/graphics/texmap/TextureMapperShaderProgram.cpp
89
90     platform/gtk/EventLoopGtk.cpp
91     platform/gtk/LoggingGtk.cpp
92     platform/gtk/SharedBufferGtk.cpp
93
94     platform/image-decoders/ImageDecoder.cpp
95
96     platform/image-decoders/bmp/BMPImageDecoder.cpp
97     platform/image-decoders/bmp/BMPImageReader.cpp
98
99     platform/image-decoders/cairo/ImageDecoderCairo.cpp
100
101     platform/image-decoders/gif/GIFImageDecoder.cpp
102     platform/image-decoders/gif/GIFImageReader.cpp
103
104     platform/image-decoders/ico/ICOImageDecoder.cpp
105
106     platform/image-decoders/jpeg/JPEGImageDecoder.cpp
107
108     platform/image-decoders/png/PNGImageDecoder.cpp
109
110     platform/image-decoders/webp/WEBPImageDecoder.cpp
111
112     platform/linux/GamepadDeviceLinux.cpp
113
114     platform/nix/CursorNix.cpp
115     platform/nix/DragDataNix.cpp
116     platform/nix/DragImageNix.cpp
117     platform/nix/GamepadsNix.cpp
118     platform/nix/LanguageNix.cpp
119     platform/nix/LocalizedStringsNix.cpp
120     platform/nix/NixKeyboardUtilities.cpp
121     platform/nix/PasteboardNix.cpp
122     platform/nix/PlatformKeyboardEventNix.cpp
123     platform/nix/PlatformScreenNix.cpp
124     platform/nix/RenderThemeNix.cpp
125     platform/nix/ScrollbarThemeNix.cpp
126     platform/nix/SoundNix.cpp
127     platform/nix/WidgetNix.cpp
128
129     platform/nix/support/MultiChannelPCMData.cpp
130
131     platform/text/LocaleNone.cpp
132
133     platform/text/nix/TextBreakIteratorInternalICUNix.cpp
134
135     plugins/PluginDatabase.cpp
136     plugins/PluginDebug.cpp
137     plugins/PluginPackage.cpp
138     plugins/PluginPackageNone.cpp
139     plugins/PluginStream.cpp
140     plugins/PluginView.cpp
141     plugins/PluginViewNone.cpp
142
143     rendering/style/StyleCachedShader.cpp
144     rendering/style/StyleCustomFilterProgram.cpp
145     rendering/style/StyleCustomFilterProgramCache.cpp
146 )
147
148 if (WTF_USE_OPENGL_ES_2)
149     list(APPEND WebCore_SOURCES
150         platform/graphics/opengl/Extensions3DOpenGLES.cpp
151         platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
152     )
153     list(INSERT WebCore_INCLUDE_DIRECTORIES 0 ${OPENGLES2_INCLUDE_DIRS})
154     list(APPEND WebCore_LIBRARIES ${OPENGLES2_LIBRARIES})
155     add_definitions(${OPENGLES2_DEFINITIONS})
156 else ()
157     list(APPEND WebCore_SOURCES
158         platform/graphics/opengl/Extensions3DOpenGL.cpp
159         platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
160     )
161     list(APPEND WebCore_LIBRARIES
162         ${OPENGL_gl_LIBRARY}
163     )
164 endif ()
165
166 if (WTF_USE_EGL)
167     list(INSERT WebCore_INCLUDE_DIRECTORIES 0
168         platform/graphics/egl
169         ${EGL_INCLUDE_DIR}
170     )
171     list(APPEND WebCore_SOURCES
172         platform/graphics/GLContext.cpp
173         platform/graphics/GraphicsContext3DPrivate.cpp
174
175         platform/graphics/cairo/GraphicsContext3DCairo.cpp
176
177         platform/graphics/egl/GLContextFromCurrentEGL.cpp
178     )
179     list(APPEND WebCore_LIBRARIES ${EGL_LIBRARY})
180 else ()
181     list(APPEND WebCore_INCLUDE_DIRECTORIES
182         platform/graphics/surfaces/glx
183         platform/graphics/surfaces/efl
184         ${X11_X11_INCLUDE_PATH}
185     )
186     list(APPEND WebCore_SOURCES
187         platform/graphics/efl/GraphicsContext3DEfl.cpp
188         platform/graphics/efl/GraphicsContext3DPrivate.cpp
189
190         platform/graphics/opengl/GLPlatformContext.cpp
191         platform/graphics/opengl/GLPlatformSurface.cpp
192
193         platform/graphics/surfaces/GLTransportSurface.cpp
194         platform/graphics/surfaces/GraphicsSurface.cpp
195
196         platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp
197
198         platform/graphics/surfaces/glx/GLXContext.cpp
199         platform/graphics/surfaces/glx/GLXSurface.cpp
200         platform/graphics/surfaces/glx/X11Helper.cpp
201     )
202     list(APPEND WebCore_LIBRARIES ${X11_X11_LIB} ${X11_Xcomposite_LIB} ${X11_Xrender_LIB})
203
204     if (ENABLE_MEDIA_STREAM)
205         list(APPEND WebCore_LIBRARIES ${X11_Xext_LIB})
206     endif ()
207 endif ()
208
209 if (ENABLE_BATTERY_STATUS)
210     list(APPEND WebCore_INCLUDE_DIRECTORIES ${DBUS_INCLUDE_DIRS})
211     list(APPEND WebCore_LIBRARIES ${DBUS_LIBRARIES})
212 endif ()
213
214 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
215     ${WEBCORE_DIR}/css/mediaControlsNix.css
216     ${WEBCORE_DIR}/css/mediaControlsNixFullscreen.css
217 )
218
219 list(APPEND WebCore_LIBRARIES
220     ${CAIRO_LIBRARIES}
221     ${FONTCONFIG_LIBRARIES}
222     ${FREETYPE_LIBRARIES}
223     ${GLIB_GIO_LIBRARIES}
224     ${GLIB_GMODULE_LIBRARIES}
225     ${GLIB_GOBJECT_LIBRARIES}
226     ${GLIB_LIBRARIES}
227     ${HARFBUZZ_LIBRARIES}
228     ${JPEG_LIBRARY}
229     ${LIBXML2_LIBRARIES}
230     ${LIBXSLT_LIBRARIES}
231     ${PNG_LIBRARY}
232     ${SQLITE_LIBRARIES}
233     ${ZLIB_LIBRARIES}
234     Platform
235 )
236
237 list(APPEND WebCore_INCLUDE_DIRECTORIES
238     ${FONTCONFIG_INCLUDE_DIR}
239     ${CAIRO_INCLUDE_DIRS}
240     ${FREETYPE_INCLUDE_DIRS}
241     ${LIBXML2_INCLUDE_DIR}
242     ${LIBXSLT_INCLUDE_DIR}
243     ${SQLITE_INCLUDE_DIR}
244     ${GLIB_INCLUDE_DIRS}
245     ${ZLIB_INCLUDE_DIRS}
246     ${HARFBUZZ_INCLUDE_DIRS}
247 )
248
249 add_definitions(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}")
250
251 if (ENABLE_WEB_AUDIO)
252   list(APPEND WebCore_INCLUDE_DIRECTORIES
253     "${WEBCORE_DIR}/platform/audio/nix"
254   )
255   list(APPEND WebCore_SOURCES
256     platform/audio/nix/AudioBusNix.cpp
257     platform/audio/nix/AudioDestinationNix.cpp
258     platform/audio/nix/FFTFrameNix.cpp
259   )
260   set(WEB_AUDIO_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webaudio/resources)
261   file(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav")
262   install(FILES ${WEB_AUDIO_DATA} DESTINATION ${WEB_AUDIO_DIR})
263   add_definitions(-DUNINSTALLED_AUDIO_RESOURCES_DIR="${WEBCORE_DIR}/platform/audio/resources")
264 endif ()
265
266 if (WTF_USE_CURL)
267     list(APPEND WebCore_INCLUDE_DIRECTORIES
268         "${WEBCORE_DIR}/platform/network/curl"
269     )
270
271     list(APPEND WebCore_SOURCES
272         platform/network/NetworkStorageSessionStub.cpp
273
274         platform/network/curl/CookieDatabaseBackingStore.cpp
275         platform/network/curl/CookieJarCurl.cpp
276         platform/network/curl/CookieManager.cpp
277         platform/network/curl/CookieNode.cpp
278         platform/network/curl/CookieStorageCurl.cpp
279         platform/network/curl/CredentialStorageCurl.cpp
280         platform/network/curl/DNSCurl.cpp
281         platform/network/curl/FormDataStreamCurl.cpp
282         platform/network/curl/MultipartHandle.cpp
283         platform/network/curl/ParsedCookie.cpp
284         platform/network/curl/ProxyServerCurl.cpp
285         platform/network/curl/ResourceHandleCurl.cpp
286         platform/network/curl/ResourceHandleManager.cpp
287         platform/network/curl/SocketStreamHandleCurl.cpp
288         platform/network/curl/SynchronousLoaderClientCurl.cpp
289     )
290
291     list(APPEND WebCore_LIBRARIES
292         ${CURL_LIBRARIES}
293     )
294 else ()
295     list(APPEND WebCore_SOURCES
296         loader/soup/CachedRawResourceSoup.cpp
297         loader/soup/SubresourceLoaderSoup.cpp
298
299         platform/network/soup/AuthenticationChallengeSoup.cpp
300         platform/network/soup/CookieJarSoup.cpp
301         platform/network/soup/CookieStorageSoup.cpp
302         platform/network/soup/CredentialStorageSoup.cpp
303         platform/network/soup/DNSSoup.cpp
304         platform/network/soup/GOwnPtrSoup.cpp
305         platform/network/soup/NetworkStorageSessionSoup.cpp
306         platform/network/soup/ProxyResolverSoup.cpp
307         platform/network/soup/ProxyServerSoup.cpp
308         platform/network/soup/ResourceErrorSoup.cpp
309         platform/network/soup/ResourceHandleSoup.cpp
310         platform/network/soup/ResourceRequestSoup.cpp
311         platform/network/soup/ResourceResponseSoup.cpp
312         platform/network/soup/SocketStreamHandleSoup.cpp
313         platform/network/soup/SoupURIUtils.cpp
314         platform/network/soup/SynchronousLoaderClientSoup.cpp
315
316         # Uncomment it after https://bugs.webkit.org/show_bug.cgi?id=118598 is fixed and merged to Nix.
317         # platform/soup/SharedBufferSoup.cpp
318     )
319
320     list(APPEND WebCore_INCLUDE_DIRECTORIES
321         "${WEBCORE_DIR}/platform/network/soup"
322         ${LIBSOUP_INCLUDE_DIRS}
323     )
324
325     list(APPEND WebCore_LIBRARIES
326         ${LIBSOUP_LIBRARIES}
327     )
328 endif ()