e4c97f8918d6df9dcbd88b70addb1a8835ce32bc
[WebKit-https.git] / Source / WebCore / PlatformBlackBerry.cmake
1 LIST(INSERT WebCore_INCLUDE_DIRECTORIES 0
2     "${BLACKBERRY_THIRD_PARTY_DIR}" # For <unicode.h>, which is included from <sys/keycodes.h>.
3     "${BLACKBERRY_THIRD_PARTY_DIR}/icu"
4 )
5
6 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
7     "${WEBCORE_DIR}/bindings/cpp"
8     "${WEBCORE_DIR}/platform/blackberry/CookieDatabaseBackingStore"
9     "${WEBCORE_DIR}/platform/graphics/blackberry/skia"
10     "${WEBCORE_DIR}/platform/graphics/harfbuzz"
11     "${WEBCORE_DIR}/platform/graphics/opentype/"
12     "${WEBCORE_DIR}/platform/graphics/skia"
13     "${WEBCORE_DIR}/platform/image-decoders/skia"
14     "${WEBCORE_DIR}/platform/image-encoders/skia"
15     "${WEBCORE_DIR}/platform/network/blackberry"
16     "${WEBCORE_DIR}/platform/network/blackberry/rss"
17 )
18
19 # Skia sources
20 LIST(APPEND WebCore_SOURCES
21     platform/graphics/skia/FloatPointSkia.cpp
22     platform/graphics/skia/FloatRectSkia.cpp
23     platform/graphics/skia/FontCustomPlatformData.cpp
24     platform/graphics/skia/GradientSkia.cpp
25     platform/graphics/skia/GraphicsContext3DSkia.cpp
26     platform/graphics/skia/GraphicsContextSkia.cpp
27     platform/graphics/skia/HarfbuzzSkia.cpp
28     platform/graphics/skia/ImageBufferSkia.cpp
29     platform/graphics/skia/ImageSkia.cpp
30     platform/graphics/skia/IntPointSkia.cpp
31     platform/graphics/skia/IntRectSkia.cpp
32     platform/graphics/skia/NativeImageSkia.cpp
33     platform/graphics/skia/PathSkia.cpp
34     platform/graphics/skia/PatternSkia.cpp
35     platform/graphics/skia/PlatformContextSkia.cpp
36     platform/graphics/skia/SkiaUtils.cpp
37     platform/graphics/skia/TransformationMatrixSkia.cpp
38     platform/graphics/chromium/VDMXParser.cpp
39     platform/image-decoders/skia/ImageDecoderSkia.cpp
40     platform/image-encoders/skia/PNGImageEncoder.cpp
41 )
42
43 # Skia font backend sources
44 LIST(APPEND WebCore_SOURCES
45     platform/graphics/blackberry/skia/PlatformBridge.cpp
46     platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp
47     platform/graphics/harfbuzz/FontHarfBuzz.cpp
48     platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
49     platform/graphics/harfbuzz/HarfBuzzShaper.cpp
50     platform/graphics/harfbuzz/HarfBuzzSkia.cpp
51     platform/graphics/skia/FontCacheSkia.cpp
52     platform/graphics/skia/GlyphPageTreeNodeSkia.cpp
53     platform/graphics/skia/SimpleFontDataSkia.cpp
54 )
55
56 # Other sources
57 LIST(APPEND WebCore_SOURCES
58     bindings/cpp/WebDOMCString.cpp
59     bindings/cpp/WebDOMEventTarget.cpp
60     bindings/cpp/WebDOMString.cpp
61     bindings/cpp/WebExceptionHandler.cpp
62     platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp
63     platform/blackberry/CookieManager.cpp
64     platform/blackberry/CookieMap.cpp
65     platform/blackberry/CookieParser.cpp
66     platform/blackberry/FileSystemBlackBerry.cpp
67     platform/blackberry/ParsedCookie.cpp
68     platform/graphics/ImageSource.cpp
69     platform/graphics/WOFFFileFormat.cpp
70     platform/graphics/opentype/OpenTypeSanitizer.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/image-encoders/JPEGImageEncoder.cpp
81     platform/image-encoders/skia/JPEGImageEncoder.cpp
82     platform/posix/FileSystemPOSIX.cpp
83     platform/posix/SharedBufferPOSIX.cpp
84     platform/text/TextBreakIteratorICU.cpp
85     platform/text/TextCodecICU.cpp
86     platform/text/TextEncodingDetectorICU.cpp
87     platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp
88 )
89
90 # Networking sources
91 LIST(APPEND WebCore_SOURCES
92     platform/network/MIMESniffing.cpp
93     platform/network/ProxyServer.cpp
94     platform/network/blackberry/AutofillBackingStore.cpp
95     platform/network/blackberry/DNSBlackBerry.cpp
96     platform/network/blackberry/DeferredData.cpp
97     platform/network/blackberry/NetworkJob.cpp
98     platform/network/blackberry/NetworkManager.cpp
99     platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
100     platform/network/blackberry/ProxyServerBlackBerry.cpp
101     platform/network/blackberry/ResourceErrorBlackBerry.cpp
102     platform/network/blackberry/ResourceHandleBlackBerry.cpp
103     platform/network/blackberry/ResourceRequestBlackBerry.cpp
104     platform/network/blackberry/ResourceResponseBlackBerry.cpp
105     platform/network/blackberry/SocketStreamHandleBlackBerry.cpp
106     platform/network/blackberry/rss/RSSAtomParser.cpp
107     platform/network/blackberry/rss/RSS10Parser.cpp
108     platform/network/blackberry/rss/RSS20Parser.cpp
109     platform/network/blackberry/rss/RSSFilterStream.cpp
110     platform/network/blackberry/rss/RSSGenerator.cpp
111     platform/network/blackberry/rss/RSSParserBase.cpp
112 )
113
114 LIST(APPEND WebCore_USER_AGENT_STYLE_SHEETS
115     ${WEBCORE_DIR}/css/mediaControlsBlackBerry.css
116     ${WEBCORE_DIR}/css/themeBlackBerry.css
117 )
118
119 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
120     "${WEBCORE_DIR}/bridge/blackberry"
121     "${WEBCORE_DIR}/history/blackberry"
122     "${WEBCORE_DIR}/page/blackberry"
123     "${WEBCORE_DIR}/platform/blackberry"
124     "${WEBCORE_DIR}/platform/graphics/blackberry"
125     "${WEBCORE_DIR}/platform/image-decoders/bmp"
126     "${WEBCORE_DIR}/platform/image-decoders/gif"
127     "${WEBCORE_DIR}/platform/image-decoders/ico"
128     "${WEBCORE_DIR}/platform/image-decoders/jpeg"
129     "${WEBCORE_DIR}/platform/image-decoders/png"
130     "${WEBCORE_DIR}/platform/image-encoders"
131     "${WEBCORE_DIR}/platform/network/blackberry"
132     "${WEBCORE_DIR}/platform/text/blackberry"
133     "${WEBKIT_DIR}/blackberry/Api"
134     "${WEBKIT_DIR}/blackberry/WebCoreSupport"
135     "${WEBKIT_DIR}/blackberry/WebKitSupport"
136 )
137
138 # BlackBerry sources
139 LIST(APPEND WebCore_SOURCES
140     editing/blackberry/EditorBlackBerry.cpp
141     editing/blackberry/SmartReplaceBlackBerry.cpp
142     page/blackberry/AccessibilityObjectBlackBerry.cpp
143     page/blackberry/DragControllerBlackBerry.cpp
144     page/blackberry/EventHandlerBlackBerry.cpp
145     page/blackberry/SettingsBlackBerry.cpp
146     platform/blackberry/ClipboardBlackBerry.cpp
147     platform/blackberry/ContextMenuBlackBerry.cpp
148     platform/blackberry/ContextMenuItemBlackBerry.cpp
149     platform/blackberry/CookieJarBlackBerry.cpp
150     platform/blackberry/CursorBlackBerry.cpp
151     platform/blackberry/DragDataBlackBerry.cpp
152     platform/blackberry/DragImageBlackBerry.cpp
153     platform/blackberry/EventLoopBlackBerry.cpp
154     platform/blackberry/KURLBlackBerry.cpp
155     platform/blackberry/LocalizedStringsBlackBerry.cpp
156     platform/blackberry/LoggingBlackBerry.cpp
157     platform/blackberry/MIMETypeRegistryBlackBerry.cpp
158     platform/blackberry/PasteboardBlackBerry.cpp
159     platform/blackberry/PlatformKeyboardEventBlackBerry.cpp
160     platform/blackberry/PlatformMouseEventBlackBerry.cpp
161     platform/blackberry/PlatformScreenBlackBerry.cpp
162     platform/blackberry/PlatformTouchEventBlackBerry.cpp
163     platform/blackberry/PlatformTouchPointBlackBerry.cpp
164     platform/blackberry/PopupMenuBlackBerry.cpp
165     platform/blackberry/RenderThemeBlackBerry.cpp
166     platform/blackberry/RunLoopBlackBerry.cpp
167     platform/blackberry/SSLKeyGeneratorBlackBerry.cpp
168     platform/blackberry/ScrollbarThemeBlackBerry.cpp
169     platform/blackberry/SearchPopupMenuBlackBerry.cpp
170     platform/blackberry/SharedTimerBlackBerry.cpp
171     platform/blackberry/SoundBlackBerry.cpp
172     platform/blackberry/SystemTimeBlackBerry.cpp
173     platform/blackberry/TemporaryLinkStubs.cpp
174     platform/blackberry/WidgetBlackBerry.cpp
175     platform/graphics/blackberry/FloatPointBlackBerry.cpp
176     platform/graphics/blackberry/FloatRectBlackBerry.cpp
177     platform/graphics/blackberry/FloatSizeBlackBerry.cpp
178     platform/graphics/blackberry/IconBlackBerry.cpp
179     platform/graphics/blackberry/ImageBlackBerry.cpp
180     platform/graphics/blackberry/IntPointBlackBerry.cpp
181     platform/graphics/blackberry/IntRectBlackBerry.cpp
182     platform/graphics/blackberry/IntSizeBlackBerry.cpp
183     platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp
184     platform/text/blackberry/StringBlackBerry.cpp
185 )
186
187 # Credential Persistence sources
188 LIST(APPEND WebCore_SOURCES
189     platform/network/blackberry/CredentialBackingStore.cpp
190     platform/network/blackberry/CredentialStorageBlackBerry.cpp
191 )
192
193 # File System support
194 IF (ENABLE_FILE_SYSTEM)
195     LIST(APPEND WebCore_SOURCES
196         platform/blackberry/AsyncFileSystemBlackBerry.cpp
197     )
198 ENDIF ()
199
200 # Touch sources
201 LIST(APPEND WebCore_SOURCES
202     dom/Touch.cpp
203     dom/TouchEvent.cpp
204     dom/TouchList.cpp
205 )
206
207 IF (ENABLE_SMOOTH_SCROLLING)
208     LIST(APPEND WebCore_SOURCES
209         platform/blackberry/ScrollAnimatorBlackBerry.cpp
210     )
211 ENDIF ()
212
213 LIST(APPEND WEBDOM_IDL_HEADERS
214     bindings/cpp/WebDOMCString.h
215     bindings/cpp/WebDOMEventTarget.h
216     bindings/cpp/WebDOMObject.h
217     bindings/cpp/WebDOMString.h
218 )
219
220 if (ENABLE_REQUEST_ANIMATION_FRAME)
221     LIST(APPEND WebCore_SOURCES
222         platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp
223         platform/graphics/DisplayRefreshMonitor.cpp
224     )
225 ENDIF ()
226
227 if (ENABLE_WEBGL)
228     ADD_DEFINITIONS (-DWTF_USE_OPENGL_ES_2=1)
229     LIST(APPEND WebCore_INCLUDE_DIRECTORIES
230         "${WEBCORE_DIR}/platform/graphics/gpu"
231         "${WEBCORE_DIR}/platform/graphics/opengl"
232     )
233     LIST(APPEND WebCore_SOURCES
234         platform/graphics/blackberry/DrawingBufferBlackBerry.cpp
235         platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp
236         platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
237         platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
238         platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
239         platform/graphics/opengl/Extensions3DOpenGLES.cpp
240         platform/graphics/gpu/SharedGraphicsContext3D.cpp
241     )
242 ENDIF ()
243
244 if (ENABLE_MEDIA_STREAM)
245     LIST(APPEND WebCore_SOURCES
246         platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp
247     )
248 ENDIF ()
249
250 IF (ENABLE_NETSCAPE_PLUGIN_API)
251     LIST(APPEND WebCore_SOURCES
252         plugins/PluginDatabase.cpp
253         plugins/PluginPackage.cpp
254         plugins/PluginView.cpp
255         plugins/blackberry/NPCallbacksBlackBerry.cpp
256         plugins/blackberry/PluginDataBlackBerry.cpp
257         plugins/blackberry/PluginPackageBlackBerry.cpp
258         plugins/blackberry/PluginViewBlackBerry.cpp
259         plugins/blackberry/PluginViewPrivateBlackBerry.cpp
260     )
261 ELSE ()
262     LIST(APPEND WebCore_SOURCES
263         plugins/PluginDataNone.cpp
264         plugins/PluginDatabase.cpp
265         plugins/PluginPackage.cpp
266         plugins/PluginPackageNone.cpp
267         plugins/PluginView.cpp
268         plugins/PluginViewNone.cpp
269     )
270 ENDIF ()
271
272 # To speed up linking when working on accel comp, you can move this whole chunk
273 # to Source/WebKit/blackberry/CMakeListsBlackBerry.txt.
274 # Append to WebKit_SOURCES instead of WebCore_SOURCES.
275 IF (WTF_USE_ACCELERATED_COMPOSITING)
276     LIST(APPEND WebCore_SOURCES
277         ${WEBCORE_DIR}/platform/graphics/GraphicsLayer.cpp
278         ${WEBCORE_DIR}/platform/graphics/blackberry/CanvasLayerWebKitThread.cpp
279         ${WEBCORE_DIR}/platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp
280         ${WEBCORE_DIR}/platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp
281         ${WEBCORE_DIR}/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp
282         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerAnimation.cpp
283         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerCompositingThread.cpp
284         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerFilterRenderer.cpp
285         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerRenderer.cpp
286         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerRendererSurface.cpp
287         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerTile.cpp
288         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerTiler.cpp
289         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerWebKitThread.cpp
290         ${WEBCORE_DIR}/platform/graphics/blackberry/PluginLayerWebKitThread.cpp
291         ${WEBCORE_DIR}/platform/graphics/blackberry/Texture.cpp
292         ${WEBCORE_DIR}/platform/graphics/blackberry/TextureCacheCompositingThread.cpp
293         ${WEBCORE_DIR}/platform/graphics/blackberry/WebGLLayerWebKitThread.cpp
294         ${WEBCORE_DIR}/rendering/RenderLayerBacking.cpp
295         ${WEBCORE_DIR}/rendering/RenderLayerCompositor.cpp
296     )
297 ENDIF ()
298
299 SET(ENV{WEBKITDIR} ${CMAKE_SOURCE_DIR}/Source)
300 SET(ENV{PLATFORMNAME} ${CMAKE_SYSTEM_NAME})
301 EXECUTE_PROCESS(
302     COMMAND hostname
303     OUTPUT_VARIABLE host
304 )
305 STRING(REPLACE "\n" "" host1 "${host}")
306 SET(ENV{COMPUTERNAME} ${host1})
307
308 IF ($ENV{PUBLIC_BUILD})
309     ADD_DEFINITIONS(-DPUBLIC_BUILD=$ENV{PUBLIC_BUILD})
310 ENDIF ()
311
312 INSTALL(FILES ${WEBDOM_IDL_HEADERS} DESTINATION usr/include/browser/webkit/dom)
313
314 # Create DOM C++ code given an IDL input
315 # We define a new list of feature defines that is prefixed with LANGUAGE_CPP=1 so as to avoid the
316 # warning "missing whitespace after the macro name" when inlining "LANGUAGE_CPP=1 ${FEATURE_DEFINES}".
317 SET(FEATURE_DEFINES_WEBCORE "LANGUAGE_CPP=1")
318 FOREACH (_feature ${FEATURE_DEFINES})
319     SET(FEATURE_DEFINES_WEBCORE "${FEATURE_DEFINES_WEBCORE} ${_feature}")
320 ENDFOREACH ()
321
322 # FIXME: We need to add the IDLs for SQL storage and Web Workers. See PR #123484.
323 SET(WebCore_NO_CPP_IDL_FILES
324     ${WebCore_SVG_IDL_FILES}
325     dom/CustomEvent.idl
326     dom/PopStateEvent.idl
327     inspector/ScriptProfile.idl
328     inspector/ScriptProfileNode.idl
329 )
330
331 LIST(APPEND WebCore_IDL_FILES
332     css/MediaQueryListListener.idl
333 )
334
335 SET(WebCore_CPP_IDL_FILES ${WebCore_IDL_FILES})
336
337 FOREACH (_file ${WebCore_NO_CPP_IDL_FILES})
338     STRING(REPLACE "${_file}" "" WebCore_CPP_IDL_FILES "${WebCore_CPP_IDL_FILES}")
339 ENDFOREACH ()
340
341 SET(WebCore_CPP_IDL_FILES
342     dom/EventListener.idl
343     "${WebCore_CPP_IDL_FILES}"
344 )
345
346 FOREACH (_idl ${WebCore_CPP_IDL_FILES})
347     SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
348 ENDFOREACH ()
349 FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
350
351 ADD_CUSTOM_COMMAND(
352     OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE}
353     DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_RESOLVE_SUPPLEMENTAL} ${WebCore_CPP_IDL_FILES} ${IDL_ATTRIBUTES_FILE}
354     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --idlFilesList ${IDL_FILES_TMP} --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --supplementalDependencyFile ${SUPPLEMENTAL_DEPENDENCY_FILE} --idlAttributesFile ${IDL_ATTRIBUTES_FILE}
355     VERBATIM)
356
357 GENERATE_BINDINGS(WebCore_SOURCES
358     "${WebCore_CPP_IDL_FILES}"
359     "${WEBCORE_DIR}"
360     "${IDL_INCLUDES}"
361     "${FEATURE_DEFINES_WEBCORE}"
362     ${DERIVED_SOURCES_WEBCORE_DIR} WebDOM CPP
363     ${SUPPLEMENTAL_DEPENDENCY_FILE})
364
365 # Generate contents for PopupPicker.cpp
366 SET(WebCore_POPUP_CSS_AND_JS
367     ${WEBCORE_DIR}/Resources/blackberry/popupControlBlackBerry.css
368     ${WEBCORE_DIR}/Resources/blackberry/selectControlBlackBerry.css
369     ${WEBCORE_DIR}/Resources/blackberry/selectControlBlackBerry.js
370 )
371
372 ADD_CUSTOM_COMMAND(
373     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.h ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.cpp
374     MAIN_DEPENDENCY ${WEBCORE_DIR}/make-file-arrays.py
375     DEPENDS ${WebCore_POPUP_CSS_AND_JS}
376     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/make-file-arrays.py --out-h=${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.h --out-cpp=${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.cpp ${WebCore_POPUP_CSS_AND_JS}
377 )
378 LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.cpp)