Add support for [NoInterfaceObject] Web IDL extended attribute
[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(REMOVE_ITEM WebCore_SOURCES
7     html/shadow/MediaControlsApple.cpp
8 )
9
10 list(APPEND WebCore_INCLUDE_DIRECTORIES
11     "${WEBCORE_DIR}/bindings/cpp"
12     "${WEBCORE_DIR}/platform/blackberry/CookieDatabaseBackingStore"
13     "${WEBCORE_DIR}/platform/graphics/harfbuzz"
14     "${WEBCORE_DIR}/platform/graphics/opentype/"
15     "${WEBCORE_DIR}/platform/network/blackberry"
16     "${WEBCORE_DIR}/platform/network/blackberry/rss"
17 )
18
19 # Other sources
20 list(APPEND WebCore_SOURCES
21     bindings/cpp/WebDOMCString.cpp
22     bindings/cpp/WebDOMEventTarget.cpp
23     bindings/cpp/WebDOMString.cpp
24     bindings/cpp/WebExceptionHandler.cpp
25     platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp
26     platform/blackberry/AuthenticationChallengeManager.cpp
27     platform/blackberry/CookieManager.cpp
28     platform/blackberry/CookieMap.cpp
29     platform/blackberry/CookieParser.cpp
30     platform/blackberry/FileSystemBlackBerry.cpp
31     platform/blackberry/ParsedCookie.cpp
32     platform/graphics/WOFFFileFormat.cpp
33     platform/graphics/opentype/OpenTypeSanitizer.cpp
34     platform/image-encoders/JPEGImageEncoder.cpp
35     platform/posix/FileSystemPOSIX.cpp
36     platform/posix/SharedBufferPOSIX.cpp
37     platform/text/LocaleNone.cpp
38     platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp
39 )
40
41 # Networking sources
42 list(APPEND WebCore_SOURCES
43     platform/network/MIMESniffing.cpp
44     platform/network/NetworkStorageSessionStub.cpp
45     platform/network/ProxyServer.cpp
46     platform/network/blackberry/AutofillBackingStore.cpp
47     platform/network/blackberry/DNSBlackBerry.cpp
48     platform/network/blackberry/DeferredData.cpp
49     platform/network/blackberry/NetworkJob.cpp
50     platform/network/blackberry/NetworkManager.cpp
51     platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
52     platform/network/blackberry/ProxyServerBlackBerry.cpp
53     platform/network/blackberry/ResourceErrorBlackBerry.cpp
54     platform/network/blackberry/ResourceHandleBlackBerry.cpp
55     platform/network/blackberry/ResourceRequestBlackBerry.cpp
56     platform/network/blackberry/ResourceResponseBlackBerry.cpp
57     platform/network/blackberry/SocketStreamHandleBlackBerry.cpp
58     platform/network/blackberry/rss/RSSAtomParser.cpp
59     platform/network/blackberry/rss/RSS10Parser.cpp
60     platform/network/blackberry/rss/RSS20Parser.cpp
61     platform/network/blackberry/rss/RSSFilterStream.cpp
62     platform/network/blackberry/rss/RSSGenerator.cpp
63     platform/network/blackberry/rss/RSSParserBase.cpp
64 )
65
66 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
67     ${WEBCORE_DIR}/css/mediaControlsBlackBerry.css
68     ${WEBCORE_DIR}/css/mediaControlsBlackBerryFullscreen.css
69     ${WEBCORE_DIR}/css/themeBlackBerry.css
70 )
71
72 list(APPEND WebCore_INCLUDE_DIRECTORIES
73     "${WEBCORE_DIR}/bridge/blackberry"
74     "${WEBCORE_DIR}/history/blackberry"
75     "${WEBCORE_DIR}/page/blackberry"
76     "${WEBCORE_DIR}/page/scrolling/blackberry"
77     "${WEBCORE_DIR}/platform/blackberry"
78     "${WEBCORE_DIR}/platform/graphics/blackberry"
79     "${WEBCORE_DIR}/platform/image-decoders/bmp"
80     "${WEBCORE_DIR}/platform/image-decoders/gif"
81     "${WEBCORE_DIR}/platform/image-decoders/ico"
82     "${WEBCORE_DIR}/platform/image-decoders/jpeg"
83     "${WEBCORE_DIR}/platform/image-decoders/png"
84     "${WEBCORE_DIR}/platform/image-encoders"
85     "${WEBCORE_DIR}/platform/network/blackberry"
86     "${WEBCORE_DIR}/platform/text/blackberry"
87     "${WEBKIT_DIR}/blackberry/Api"
88     "${WEBKIT_DIR}/blackberry/WebCoreSupport"
89     "${WEBKIT_DIR}/blackberry/WebKitSupport"
90 )
91
92 # BlackBerry sources
93 list(APPEND WebCore_SOURCES
94     editing/blackberry/EditorBlackBerry.cpp
95     editing/blackberry/SmartReplaceBlackBerry.cpp
96     html/shadow/MediaControlsBlackBerry.cpp
97     loader/blackberry/CookieJarBlackBerry.cpp
98     page/blackberry/AccessibilityObjectBlackBerry.cpp
99     page/blackberry/DragControllerBlackBerry.cpp
100     page/blackberry/EventHandlerBlackBerry.cpp
101     page/blackberry/SettingsBlackBerry.cpp
102     platform/blackberry/ClipboardBlackBerry.cpp
103     platform/blackberry/ContextMenuBlackBerry.cpp
104     platform/blackberry/ContextMenuItemBlackBerry.cpp
105     platform/blackberry/CursorBlackBerry.cpp
106     platform/blackberry/DragDataBlackBerry.cpp
107     platform/blackberry/DragImageBlackBerry.cpp
108     platform/blackberry/EventLoopBlackBerry.cpp
109     platform/blackberry/LocalizedStringsBlackBerry.cpp
110     platform/blackberry/LoggingBlackBerry.cpp
111     platform/blackberry/MIMETypeRegistryBlackBerry.cpp
112     platform/blackberry/PasteboardBlackBerry.cpp
113     platform/blackberry/PlatformKeyboardEventBlackBerry.cpp
114     platform/blackberry/PlatformMouseEventBlackBerry.cpp
115     platform/blackberry/PlatformScreenBlackBerry.cpp
116     platform/blackberry/PlatformTouchEventBlackBerry.cpp
117     platform/blackberry/PlatformTouchPointBlackBerry.cpp
118     platform/blackberry/PopupMenuBlackBerry.cpp
119     platform/blackberry/RenderThemeBlackBerry.cpp
120     platform/blackberry/RunLoopBlackBerry.cpp
121     platform/blackberry/SSLKeyGeneratorBlackBerry.cpp
122     platform/blackberry/ScrollbarThemeBlackBerry.cpp
123     platform/blackberry/SearchPopupMenuBlackBerry.cpp
124     platform/blackberry/SharedTimerBlackBerry.cpp
125     platform/blackberry/SoundBlackBerry.cpp
126     platform/blackberry/SystemTimeBlackBerry.cpp
127     platform/blackberry/TemporaryLinkStubs.cpp
128     platform/blackberry/WidgetBlackBerry.cpp
129     platform/graphics/blackberry/FloatPointBlackBerry.cpp
130     platform/graphics/blackberry/FloatRectBlackBerry.cpp
131     platform/graphics/blackberry/FloatSizeBlackBerry.cpp
132     platform/graphics/blackberry/IconBlackBerry.cpp
133     platform/graphics/blackberry/ImageBlackBerry.cpp
134     platform/graphics/blackberry/IntPointBlackBerry.cpp
135     platform/graphics/blackberry/IntRectBlackBerry.cpp
136     platform/graphics/blackberry/IntSizeBlackBerry.cpp
137     platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp
138     platform/text/blackberry/StringBlackBerry.cpp
139 )
140
141 # Credential Persistence sources
142 list(APPEND WebCore_SOURCES
143     platform/network/blackberry/CredentialBackingStore.cpp
144     platform/network/blackberry/CredentialStorageBlackBerry.cpp
145 )
146
147 # File System support
148 if (ENABLE_FILE_SYSTEM)
149     list(APPEND WebCore_SOURCES
150         platform/blackberry/AsyncFileSystemBlackBerry.cpp
151     )
152 endif ()
153
154 # Touch sources
155 list(APPEND WebCore_SOURCES
156     dom/Touch.cpp
157     dom/TouchEvent.cpp
158     dom/TouchList.cpp
159 )
160
161 if (ENABLE_SMOOTH_SCROLLING)
162     list(APPEND WebCore_SOURCES
163         platform/blackberry/ScrollAnimatorBlackBerry.cpp
164     )
165 endif ()
166
167 list(APPEND WEBDOM_IDL_HEADERS
168     bindings/cpp/WebDOMCString.h
169     bindings/cpp/WebDOMEventTarget.h
170     bindings/cpp/WebDOMObject.h
171     bindings/cpp/WebDOMString.h
172 )
173
174 if (ENABLE_REQUEST_ANIMATION_FRAME)
175     list(APPEND WebCore_SOURCES
176         platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp
177         platform/graphics/DisplayRefreshMonitor.cpp
178     )
179 endif ()
180
181 if (ENABLE_WEBGL)
182     add_definitions(-DWTF_USE_OPENGL_ES_2=1)
183     list(APPEND WebCore_INCLUDE_DIRECTORIES
184         "${WEBCORE_DIR}/platform/graphics/gpu"
185         "${WEBCORE_DIR}/platform/graphics/opengl"
186     )
187     list(APPEND WebCore_SOURCES
188         platform/graphics/blackberry/DrawingBufferBlackBerry.cpp
189         platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp
190         platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
191         platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
192         platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
193         platform/graphics/opengl/Extensions3DOpenGLES.cpp
194         platform/graphics/gpu/SharedGraphicsContext3D.cpp
195     )
196 endif ()
197
198 if (ENABLE_MEDIA_STREAM)
199     list(APPEND WebCore_SOURCES
200         platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp
201     )
202 endif ()
203
204 if (ENABLE_NETSCAPE_PLUGIN_API)
205     list(APPEND WebCore_SOURCES
206         plugins/PluginDatabase.cpp
207         plugins/PluginPackage.cpp
208         plugins/PluginView.cpp
209         plugins/blackberry/NPCallbacksBlackBerry.cpp
210         plugins/blackberry/PluginDataBlackBerry.cpp
211         plugins/blackberry/PluginPackageBlackBerry.cpp
212         plugins/blackberry/PluginViewBlackBerry.cpp
213         plugins/blackberry/PluginViewPrivateBlackBerry.cpp
214     )
215 else ()
216     list(APPEND WebCore_SOURCES
217         plugins/PluginDataNone.cpp
218         plugins/PluginDatabase.cpp
219         plugins/PluginPackage.cpp
220         plugins/PluginPackageNone.cpp
221         plugins/PluginView.cpp
222         plugins/PluginViewNone.cpp
223     )
224 endif ()
225
226 if (ENABLE_TEXT_AUTOSIZING)
227     list(APPEND WebCore_SOURCES
228         ${WEBCORE_DIR}/rendering/TextAutosizer.cpp
229     )
230 endif ()
231
232 # To speed up linking when working on accel comp, you can move this whole chunk
233 # to Source/WebKit/blackberry/CMakeListsBlackBerry.txt.
234 # Append to WebKit_SOURCES instead of WebCore_SOURCES.
235 if (WTF_USE_ACCELERATED_COMPOSITING)
236     list(APPEND WebCore_SOURCES
237         ${WEBCORE_DIR}/platform/graphics/GraphicsLayer.cpp
238         ${WEBCORE_DIR}/platform/graphics/GraphicsLayerUpdater.cpp
239         ${WEBCORE_DIR}/platform/graphics/blackberry/CanvasLayerWebKitThread.cpp
240         ${WEBCORE_DIR}/platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp
241         ${WEBCORE_DIR}/platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp
242         ${WEBCORE_DIR}/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp
243         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerAnimation.cpp
244         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerCompositingThread.cpp
245         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerFilterRenderer.cpp
246         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerRenderer.cpp
247         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerRendererSurface.cpp
248         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerTexture.cpp
249         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerTile.cpp
250         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerTiler.cpp
251         ${WEBCORE_DIR}/platform/graphics/blackberry/LayerWebKitThread.cpp
252         ${WEBCORE_DIR}/platform/graphics/blackberry/PluginLayerWebKitThread.cpp
253         ${WEBCORE_DIR}/platform/graphics/blackberry/TextureCacheCompositingThread.cpp
254         ${WEBCORE_DIR}/platform/graphics/blackberry/WebGLLayerWebKitThread.cpp
255         ${WEBCORE_DIR}/rendering/RenderLayerBacking.cpp
256         ${WEBCORE_DIR}/rendering/RenderLayerCompositor.cpp
257     )
258 endif ()
259
260 set(ENV{WEBKITDIR} ${CMAKE_SOURCE_DIR}/Source)
261 set(ENV{PLATFORMNAME} ${CMAKE_SYSTEM_NAME})
262 execute_process(
263     COMMAND hostname
264     OUTPUT_VARIABLE host
265 )
266 string(REPLACE "\n" "" host1 "${host}")
267 set(ENV{COMPUTERNAME} ${host1})
268
269 if ($ENV{PUBLIC_BUILD})
270     add_definitions(-DPUBLIC_BUILD=$ENV{PUBLIC_BUILD})
271 endif ()
272
273 install(FILES ${WEBDOM_IDL_HEADERS} DESTINATION usr/include/browser/webkit/dom)
274
275 # Create DOM C++ code given an IDL input
276 # We define a new list of feature defines that is prefixed with LANGUAGE_CPP=1 so as to avoid the
277 # warning "missing whitespace after the macro name" when inlining "LANGUAGE_CPP=1 ${FEATURE_DEFINES}".
278 set(FEATURE_DEFINES_WEBCORE "LANGUAGE_CPP=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
279
280 # FIXME: We need to add the IDLs for SQL storage and Web Workers. See PR #123484.
281 set(WebCore_NO_CPP_IDL_FILES
282     ${WebCore_SVG_IDL_FILES}
283     dom/CustomEvent.idl
284     dom/PopStateEvent.idl
285     inspector/ScriptProfile.idl
286     inspector/ScriptProfileNode.idl
287 )
288
289 list(APPEND WebCore_IDL_FILES
290     css/MediaQueryListListener.idl
291 )
292
293 set(WebCore_CPP_IDL_FILES ${WebCore_IDL_FILES})
294
295 foreach (_file ${WebCore_NO_CPP_IDL_FILES})
296     string(REPLACE "${_file}" "" WebCore_CPP_IDL_FILES "${WebCore_CPP_IDL_FILES}")
297 endforeach ()
298
299 set(WebCore_CPP_IDL_FILES
300     dom/EventListener.idl
301     "${WebCore_CPP_IDL_FILES}"
302 )
303
304 foreach (_idl ${WebCore_CPP_IDL_FILES})
305     set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
306 endforeach ()
307 file(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
308
309 add_custom_command(
310     OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE} ${WINDOW_CONSTRUCTORS_FILE}
311     DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_RESOLVE_SUPPLEMENTAL} ${WebCore_CPP_IDL_FILES} ${IDL_ATTRIBUTES_FILE}
312     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} --windowConstructorsFile ${WINDOW_CONSTRUCTORS_FILE}
313     VERBATIM)
314
315 GENERATE_BINDINGS(WebCore_SOURCES
316     "${WebCore_CPP_IDL_FILES}"
317     "${WEBCORE_DIR}"
318     "${IDL_INCLUDES}"
319     "${FEATURE_DEFINES_WEBCORE}"
320     ${DERIVED_SOURCES_WEBCORE_DIR} WebDOM CPP
321     ${SUPPLEMENTAL_DEPENDENCY_FILE}
322     ${WINDOW_CONSTRUCTORS_FILE})
323
324 # Generate contents for PopupPicker.cpp
325 set(WebCore_POPUP_CSS_AND_JS
326     ${WEBCORE_DIR}/Resources/blackberry/popupControlBlackBerry.css
327     ${WEBCORE_DIR}/Resources/blackberry/selectControlBlackBerry.css
328     ${WEBCORE_DIR}/Resources/blackberry/selectControlBlackBerry.js
329 )
330
331 add_custom_command(
332     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.h ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.cpp
333     MAIN_DEPENDENCY ${WEBCORE_DIR}/make-file-arrays.py
334     DEPENDS ${WebCore_POPUP_CSS_AND_JS}
335     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}
336 )
337 list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/PopupPicker.cpp)
338
339 set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> <LINK_FLAGS> cruT <TARGET> <OBJECTS>")
340 set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> <LINK_FLAGS> ruT <TARGET> <OBJECTS>")
341 set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> <LINK_FLAGS> cruT <TARGET> <OBJECTS>")
342 set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> <LINK_FLAGS> ruT <TARGET> <OBJECTS>")