cec781a42bc74e60fa8194ee6a10dbc96acd75ed
[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/network/blackberry"
10     "${WEBCORE_DIR}/platform/graphics/blackberry/skia"
11     "${WEBCORE_DIR}/platform/graphics/harfbuzz"
12     "${WEBCORE_DIR}/platform/graphics/opentype/"
13     "${WEBCORE_DIR}/platform/graphics/skia"
14     "${WEBCORE_DIR}/platform/image-decoders/skia"
15     "${WEBCORE_DIR}/platform/image-encoders/skia"
16 )
17
18 # Skia sources
19 LIST(APPEND WebCore_SOURCES
20     platform/graphics/skia/FloatPointSkia.cpp
21     platform/graphics/skia/FloatRectSkia.cpp
22     platform/graphics/skia/FontCustomPlatformData.cpp
23     platform/graphics/skia/GradientSkia.cpp
24     platform/graphics/skia/GraphicsContext3DSkia.cpp
25     platform/graphics/skia/GraphicsContextSkia.cpp
26     platform/graphics/skia/HarfbuzzSkia.cpp
27     platform/graphics/skia/ImageBufferSkia.cpp
28     platform/graphics/skia/ImageSkia.cpp
29     platform/graphics/skia/IntPointSkia.cpp
30     platform/graphics/skia/IntRectSkia.cpp
31     platform/graphics/skia/NativeImageSkia.cpp
32     platform/graphics/skia/PathSkia.cpp
33     platform/graphics/skia/PatternSkia.cpp
34     platform/graphics/skia/PlatformContextSkia.cpp
35     platform/graphics/skia/SkiaUtils.cpp
36     platform/graphics/skia/TransformationMatrixSkia.cpp
37     platform/graphics/skia/VDMXParser.cpp
38     platform/image-decoders/skia/ImageDecoderSkia.cpp
39     platform/image-encoders/skia/PNGImageEncoder.cpp
40 )
41
42 # Skia font backend sources
43 LIST(APPEND WebCore_SOURCES
44     platform/graphics/blackberry/skia/PlatformBridge.cpp
45     platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp
46     platform/graphics/harfbuzz/FontHarfBuzz.cpp
47     platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
48     platform/graphics/harfbuzz/HarfBuzzSkia.cpp
49     platform/graphics/skia/FontCacheSkia.cpp
50     platform/graphics/skia/GlyphPageTreeNodeSkia.cpp
51     platform/graphics/skia/SimpleFontDataSkia.cpp
52 )
53
54 # Other sources
55 LIST(APPEND WebCore_SOURCES
56     bindings/cpp/WebDOMCString.cpp
57     bindings/cpp/WebDOMEventTarget.cpp
58     bindings/cpp/WebDOMString.cpp
59     bindings/cpp/WebExceptionHandler.cpp
60     platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp
61     platform/blackberry/CookieManager.cpp
62     platform/blackberry/CookieMap.cpp
63     platform/blackberry/CookieParser.cpp
64     platform/blackberry/FileSystemBlackBerry.cpp
65     platform/blackberry/ParsedCookie.cpp
66     platform/graphics/ImageSource.cpp
67     platform/graphics/WOFFFileFormat.cpp
68     platform/graphics/opentype/OpenTypeSanitizer.cpp
69     platform/image-decoders/ImageDecoder.cpp
70     platform/image-decoders/bmp/BMPImageDecoder.cpp
71     platform/image-decoders/bmp/BMPImageReader.cpp
72     platform/image-decoders/gif/GIFImageDecoder.cpp
73     platform/image-decoders/gif/GIFImageReader.cpp
74     platform/image-decoders/ico/ICOImageDecoder.cpp
75     platform/image-decoders/jpeg/JPEGImageDecoder.cpp
76     platform/image-decoders/png/PNGImageDecoder.cpp
77     platform/image-decoders/webp/WEBPImageDecoder.cpp
78     platform/image-encoders/JPEGImageEncoder.cpp
79     platform/posix/FileSystemPOSIX.cpp
80     platform/posix/SharedBufferPOSIX.cpp
81     platform/text/TextBreakIteratorICU.cpp
82     platform/text/TextCodecICU.cpp
83     platform/text/TextEncodingDetectorICU.cpp
84     platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp
85 )
86
87 # Networking sources
88 LIST(APPEND WebCore_SOURCES
89     platform/network/ProxyServer.cpp
90     platform/network/blackberry/DeferredData.cpp
91     platform/network/blackberry/NetworkJob.cpp
92     platform/network/blackberry/NetworkManager.cpp
93     platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
94     platform/network/blackberry/ProxyServerBlackBerry.cpp
95     platform/network/blackberry/ResourceErrorBlackBerry.cpp
96     platform/network/blackberry/ResourceHandleBlackBerry.cpp
97     platform/network/blackberry/ResourceRequestBlackBerry.cpp
98     platform/network/blackberry/ResourceResponseBlackBerry.cpp
99     platform/network/blackberry/SocketStreamHandleBlackBerry.cpp
100 )
101
102 LIST(APPEND WebCore_USER_AGENT_STYLE_SHEETS
103     ${WEBCORE_DIR}/css/mediaControlsBlackBerry.css
104     ${WEBCORE_DIR}/css/themeBlackBerry.css
105 )
106
107 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
108     "${WEBCORE_DIR}/bridge/blackberry"
109     "${WEBCORE_DIR}/history/blackberry"
110     "${WEBCORE_DIR}/page/blackberry"
111     "${WEBCORE_DIR}/platform/blackberry"
112     "${WEBCORE_DIR}/platform/graphics/blackberry"
113     "${WEBCORE_DIR}/platform/image-decoders/bmp"
114     "${WEBCORE_DIR}/platform/image-decoders/gif"
115     "${WEBCORE_DIR}/platform/image-decoders/ico"
116     "${WEBCORE_DIR}/platform/image-decoders/jpeg"
117     "${WEBCORE_DIR}/platform/image-decoders/png"
118     "${WEBCORE_DIR}/platform/image-encoders"
119     "${WEBCORE_DIR}/platform/network/blackberry"
120     "${WEBCORE_DIR}/platform/text/blackberry"
121     "${WEBKIT_DIR}/blackberry/Api"
122     "${WEBKIT_DIR}/blackberry/WebCoreSupport"
123     "${WEBKIT_DIR}/blackberry/WebKitSupport"
124 )
125
126 # BlackBerry sources
127 LIST(APPEND WebCore_SOURCES
128     bindings/js/ScriptControllerBlackBerry.cpp
129     editing/blackberry/EditorBlackBerry.cpp
130     editing/blackberry/SmartReplaceBlackBerry.cpp
131     page/blackberry/AccessibilityObjectBlackBerry.cpp
132     page/blackberry/DragControllerBlackBerry.cpp
133     page/blackberry/EventHandlerBlackBerry.cpp
134     page/blackberry/FrameBlackBerry.cpp
135     platform/blackberry/ClipboardBlackBerry.cpp
136     platform/blackberry/ContextMenuBlackBerry.cpp
137     platform/blackberry/ContextMenuItemBlackBerry.cpp
138     platform/blackberry/CookieJarBlackBerry.cpp
139     platform/blackberry/CursorBlackBerry.cpp
140     platform/blackberry/DragDataBlackBerry.cpp
141     platform/blackberry/DragImageBlackBerry.cpp
142     platform/blackberry/EventLoopBlackBerry.cpp
143     platform/blackberry/KURLBlackBerry.cpp
144     platform/blackberry/LocalizedStringsBlackBerry.cpp
145     platform/blackberry/LoggingBlackBerry.cpp
146     platform/blackberry/MIMETypeRegistryBlackBerry.cpp
147     platform/blackberry/PasteboardBlackBerry.cpp
148     platform/blackberry/PlatformKeyboardEventBlackBerry.cpp
149     platform/blackberry/PlatformMouseEventBlackBerry.cpp
150     platform/blackberry/PlatformScreenBlackBerry.cpp
151     platform/blackberry/PlatformTouchEventBlackBerry.cpp
152     platform/blackberry/PlatformTouchPointBlackBerry.cpp
153     platform/blackberry/PopupMenuBlackBerry.cpp
154     platform/blackberry/RenderThemeBlackBerry.cpp
155     platform/blackberry/SSLKeyGeneratorBlackBerry.cpp
156     platform/blackberry/ScrollbarThemeBlackBerry.cpp
157     platform/blackberry/SearchPopupMenuBlackBerry.cpp
158     platform/blackberry/SharedTimerBlackBerry.cpp
159     platform/blackberry/SoundBlackBerry.cpp
160     platform/blackberry/SystemTimeBlackBerry.cpp
161     platform/blackberry/TemporaryLinkStubs.cpp
162     platform/blackberry/WidgetBlackBerry.cpp
163     platform/graphics/blackberry/FloatPointBlackBerry.cpp
164     platform/graphics/blackberry/FloatRectBlackBerry.cpp
165     platform/graphics/blackberry/FloatSizeBlackBerry.cpp
166     platform/graphics/blackberry/IconBlackBerry.cpp
167     platform/graphics/blackberry/IntPointBlackBerry.cpp
168     platform/graphics/blackberry/IntRectBlackBerry.cpp
169     platform/graphics/blackberry/IntSizeBlackBerry.cpp
170     platform/graphics/blackberry/MMrenderer.cpp
171     platform/graphics/blackberry/MediaPlayerPrivateMMrenderer.cpp
172     platform/graphics/blackberry/ResourceBlackBerry.cpp
173     platform/text/blackberry/StringBlackBerry.cpp
174 )
175
176 # Credential Persistence sources
177 LIST(APPEND WebCore_SOURCES
178     platform/network/blackberry/CredentialBackingStore.cpp
179     platform/network/blackberry/CredentialStorageBlackBerry.cpp
180 )
181
182 # Touch sources
183 LIST(APPEND WebCore_SOURCES
184     dom/Touch.cpp
185     dom/TouchEvent.cpp
186     dom/TouchList.cpp
187 )
188
189 LIST(APPEND WEBDOM_IDL_HEADERS
190     bindings/cpp/WebDOMCString.h
191     bindings/cpp/WebDOMEventTarget.h
192     bindings/cpp/WebDOMObject.h
193     bindings/cpp/WebDOMString.h
194 )
195
196 if (ENABLE_WEBGL)
197     LIST(APPEND WebCore_INCLUDE_DIRECTORIES
198         "${WEBCORE_DIR}/platform/graphics/gpu"
199         "${WEBCORE_DIR}/platform/graphics/opengl"
200     )
201     LIST(APPEND WebCore_SOURCES
202         platform/graphics/blackberry/DrawingBufferBlackBerry.cpp
203         platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp
204     )
205 ENDIF ()
206
207 IF (ENABLE_NETSCAPE_PLUGIN_API)
208     LIST(APPEND WebCore_SOURCES
209         plugins/PluginDatabase.cpp
210         plugins/PluginPackage.cpp
211         plugins/PluginView.cpp
212         plugins/blackberry/NPCallbacksBlackBerry.cpp
213         plugins/blackberry/PluginDataBlackBerry.cpp
214         plugins/blackberry/PluginPackageBlackBerry.cpp
215         plugins/blackberry/PluginViewBlackBerry.cpp
216         plugins/blackberry/PluginViewPrivateBlackBerry.cpp
217     )
218 ELSE ()
219     LIST(APPEND WebCore_SOURCES
220         plugins/PluginDataNone.cpp
221         plugins/PluginDatabase.cpp
222         plugins/PluginPackage.cpp
223         plugins/PluginPackageNone.cpp
224         plugins/PluginView.cpp
225         plugins/PluginViewNone.cpp
226     )
227 ENDIF ()
228
229 # To speed up linking when working on accel comp, you can move this whole chunk
230 # to Source/WebKit/blackberry/CMakeListsBlackBerry.txt.
231 # Append to WebKit_SOURCES instead of WebCore_SOURCES.
232 IF (WTF_USE_ACCELERATED_COMPOSITING)
233     LIST(APPEND WebCore_SOURCES
234         ${WEBCORE_DIR}/platform/graphics/GraphicsLayer.cpp
235         ${WEBCORE_DIR}/platform/graphics/blackberry/CanvasLayerWebKitThread.cpp
236         ${WEBCORE_DIR}/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp
237         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerAnimation.cpp
238         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerCompositingThread.cpp
239         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerRenderer.cpp
240         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerTile.cpp
241         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerTiler.cpp
242         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerWebKitThread.cpp
243         ${WEBCORE_DIR}/platform/graphics/blackberry/PluginLayerWebKitThread.cpp
244         ${WEBCORE_DIR}/platform/graphics/blackberry/Texture.cpp
245         ${WEBCORE_DIR}/platform/graphics/blackberry/TextureCacheCompositingThread.cpp
246         ${WEBCORE_DIR}/platform/graphics/blackberry/WebGLLayerWebKitThread.cpp
247         ${WEBCORE_DIR}/rendering/RenderLayerBacking.cpp
248         ${WEBCORE_DIR}/rendering/RenderLayerCompositor.cpp
249     )
250 ENDIF ()
251
252 SET(ENV{WEBKITDIR} ${CMAKE_SOURCE_DIR}/Source)
253 SET(ENV{PLATFORMNAME} ${CMAKE_SYSTEM_NAME})
254 EXECUTE_PROCESS(
255     COMMAND hostname
256     OUTPUT_VARIABLE host
257 )
258 STRING(REPLACE "\n" "" host1 "${host}")
259 SET(ENV{COMPUTERNAME} ${host1})
260
261 IF ($ENV{PUBLIC_BUILD})
262     ADD_DEFINITIONS(-DPUBLIC_BUILD=$ENV{PUBLIC_BUILD})
263 ENDIF ()
264
265 INSTALL(FILES ${WEBDOM_IDL_HEADERS} DESTINATION usr/include/browser/webkit/dom)
266
267 # Create DOM C++ code given an IDL input
268 # We define a new list of feature defines that is prefixed with LANGUAGE_CPP=1 so as to avoid the
269 # warning "missing whitespace after the macro name" when inlining "LANGUAGE_CPP=1 ${FEATURE_DEFINES}".
270 SET(FEATURE_DEFINES_WEBCORE "LANGUAGE_CPP=1")
271 FOREACH (_feature ${FEATURE_DEFINES})
272     SET(FEATURE_DEFINES_WEBCORE "${FEATURE_DEFINES_WEBCORE} ${_feature}")
273 ENDFOREACH ()
274
275 # FIXME: We need to add the IDLs for SQL storage and Web Workers. See PR #123484.
276 SET(WebCore_NO_CPP_IDL_FILES
277     ${SVG_IDL_FILES}
278     dom/CustomEvent.idl
279     dom/PopStateEvent.idl
280     inspector/ScriptProfile.idl
281     inspector/ScriptProfileNode.idl
282 )
283
284 LIST(APPEND WebCore_IDL_FILES
285     css/MediaQueryListListener.idl
286 )
287
288 SET(WebCore_CPP_IDL_FILES ${WebCore_IDL_FILES})
289
290 FOREACH (_file ${WebCore_NO_CPP_IDL_FILES})
291     STRING(REPLACE "${_file}" "" WebCore_CPP_IDL_FILES "${WebCore_CPP_IDL_FILES}")
292 ENDFOREACH ()
293
294 SET(WebCore_CPP_IDL_FILES
295     dom/EventListener.idl
296     html/canvas/CanvasPixelArray.idl
297     "${WebCore_CPP_IDL_FILES}"
298 )
299
300 FOREACH (_file ${WebCore_CPP_IDL_FILES})
301     GET_FILENAME_COMPONENT (_name ${_file} NAME_WE)
302     ADD_CUSTOM_COMMAND(
303         OUTPUT  ${DERIVED_SOURCES_WEBCORE_DIR}/WebDOM${_name}.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/WebDOM${_name}.h
304         MAIN_DEPENDENCY ${_file}
305         DEPENDS ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/bindings/scripts/CodeGeneratorCPP.pm ${_file}
306         COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl --defines "${FEATURE_DEFINES_WEBCORE}" --generator CPP ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_WEBCORE_DIR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" ${WEBCORE_DIR}/${_file}
307         VERBATIM)
308     LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/WebDOM${_name}.cpp)
309 ENDFOREACH ()