Support additional Coordinates information
[framework/web/webkit-efl.git] / Source / WebKit / PlatformBlackBerry.cmake
1 LIST(INSERT WebKit_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 WebKit_INCLUDE_DIRECTORIES
7     "${JAVASCRIPTCORE_DIR}/wtf/text"
8     "${WEBCORE_DIR}/bindings/cpp"
9     "${WEBCORE_DIR}/history/blackberry"
10     "${WEBCORE_DIR}/html/canvas"
11     "${WEBCORE_DIR}/html/parser" # For HTMLParserIdioms.h
12     "${WEBCORE_DIR}/loader/appcache"
13     "${WEBCORE_DIR}/notifications"
14     "${WEBCORE_DIR}/platform/blackberry"
15     "${WEBCORE_DIR}/platform/graphics/blackberry"
16     "${WEBCORE_DIR}/platform/graphics/blackberry/skia"
17     "${WEBCORE_DIR}/platform/graphics/skia"
18     "${WEBCORE_DIR}/platform/network/blackberry"
19     "${WEBCORE_DIR}/Modules/websockets"
20     "${WEBCORE_DIR}/Modules/geolocation"
21     "${WEBCORE_DIR}/Modules/vibration"
22     "${WEBKIT_DIR}/blackberry/Api"
23     "${WEBKIT_DIR}/blackberry/WebCoreSupport"
24     "${WEBKIT_DIR}/blackberry/WebKitSupport"
25     "${CMAKE_SOURCE_DIR}/Source" # For JavaScriptCore API headers
26 )
27 IF (NOT PUBLIC_BUILD)
28     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
29         # needed for DRT for now
30         "${JAVASCRIPTCORE_DIR}/wtf"
31         "${WEBCORE_DIR}/platform/mock"
32         "${WEBCORE_DIR}/svg/animation"
33         "${WEBCORE_DIR}/workers"
34         "${TOOLS_DIR}"
35         "${TOOLS_DIR}/DumpRenderTree"
36         "${TOOLS_DIR}/DumpRenderTree/blackberry"
37     )
38 ENDIF ()
39
40 IF (ENABLE_BATTERY_STATUS)
41     LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
42     LIST(APPEND WebKit_SOURCES blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp)
43 ENDIF ()
44
45 IF (ENABLE_MEDIA_STREAM)
46     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
47         "${WEBCORE_DIR}/Modules/mediastream"
48         "${WEBCORE_DIR}/platform/mediastream"
49     )
50     LIST(APPEND WebKit_SOURCES
51         blackberry/WebCoreSupport/UserMediaClientImpl.cpp
52     )
53 ENDIF ()
54
55 ADD_DEFINITIONS(-DUSER_PROCESSES)
56
57 LIST(APPEND WebKit_SOURCES
58     blackberry/Api/BackingStore.cpp
59     blackberry/Api/BlackBerryGlobal.cpp
60     blackberry/Api/WebAnimation.cpp
61     blackberry/Api/WebKitMIMETypeConverter.cpp
62     blackberry/Api/WebKitTextCodec.cpp
63     blackberry/Api/WebOverlay.cpp
64     blackberry/Api/WebOverlayOverride.cpp
65     blackberry/Api/WebPage.cpp
66     blackberry/Api/WebPageCompositor.cpp
67     blackberry/Api/WebPageGroupLoadDeferrer.cpp
68     blackberry/Api/WebSettings.cpp
69     blackberry/Api/WebString.cpp
70     blackberry/Api/WebViewportArguments.cpp
71     blackberry/WebCoreSupport/AutofillManager.cpp
72     blackberry/WebCoreSupport/CacheClientBlackBerry.cpp
73     blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
74     blackberry/WebCoreSupport/ClientExtension.cpp
75     blackberry/WebCoreSupport/ContextMenuClientBlackBerry.cpp
76     blackberry/WebCoreSupport/CredentialManager.cpp
77     blackberry/WebCoreSupport/CredentialTransformData.cpp
78     blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp
79     blackberry/WebCoreSupport/DeviceOrientationClientBlackBerry.cpp
80     blackberry/WebCoreSupport/DragClientBlackBerry.cpp
81     blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
82     blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
83     blackberry/WebCoreSupport/FrameNetworkingContextBlackBerry.cpp
84     blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp
85     blackberry/WebCoreSupport/IconDatabaseClientBlackBerry.cpp
86     blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
87     blackberry/WebCoreSupport/InspectorOverlay.cpp
88     blackberry/WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp
89     blackberry/WebCoreSupport/NotificationPresenterImpl.cpp
90     blackberry/WebCoreSupport/VibrationClientBlackBerry.cpp
91     blackberry/WebCoreSupport/PagePopupBlackBerry.cpp
92     blackberry/WebCoreSupport/SelectPopupClient.cpp
93     blackberry/WebCoreSupport/DatePickerClient.cpp
94     blackberry/WebKitSupport/AboutData.cpp
95     blackberry/WebKitSupport/BackingStoreCompositingSurface.cpp
96     blackberry/WebKitSupport/BackingStoreTile.cpp
97     blackberry/WebKitSupport/BackingStoreClient.cpp
98     blackberry/WebKitSupport/DefaultTapHighlight.cpp
99     blackberry/WebKitSupport/DOMSupport.cpp
100     blackberry/WebKitSupport/FrameLayers.cpp
101     blackberry/WebKitSupport/InPageSearchManager.cpp
102     blackberry/WebKitSupport/InputHandler.cpp
103     blackberry/WebKitSupport/RenderQueue.cpp
104     blackberry/WebKitSupport/SelectionHandler.cpp
105     blackberry/WebKitSupport/SelectionOverlay.cpp
106     blackberry/WebKitSupport/SurfacePool.cpp
107     blackberry/WebKitSupport/TouchEventHandler.cpp
108     blackberry/WebKitSupport/FatFingers.cpp
109 )
110
111 IF (ENABLE_WEBGL)
112     ADD_DEFINITIONS (-DWTF_USE_OPENGL_ES_2=1)
113     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
114         ${OPENGL_INCLUDE_DIR}
115         ${THIRDPARTY_DIR}/ANGLE/src
116         ${THIRDPARTY_DIR}/ANGLE/include/GLSLANG
117     )
118     LIST(APPEND WebKit_LIBRARIES
119         ${OPENGL_gl_LIBRARY}
120     )
121 ENDIF (ENABLE_WEBGL)
122
123 IF (NOT PUBLIC_BUILD)
124     # DumpRenderTree sources
125     LIST(APPEND WebKit_SOURCES
126         blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
127         ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp
128         ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp
129         ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTree.cpp
130         ${TOOLS_DIR}/DumpRenderTree/blackberry/EventSender.cpp
131         ${TOOLS_DIR}/DumpRenderTree/blackberry/GCControllerBlackBerry.cpp
132         ${TOOLS_DIR}/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp
133         ${TOOLS_DIR}/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp
134         ${TOOLS_DIR}/DumpRenderTree/blackberry/PNGImageEncoder.cpp
135         ${TOOLS_DIR}/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp
136         ${TOOLS_DIR}/DumpRenderTree/AccessibilityController.cpp
137         ${TOOLS_DIR}/DumpRenderTree/AccessibilityUIElement.cpp
138         ${TOOLS_DIR}/DumpRenderTree/AccessibilityTextMarker.cpp
139         ${TOOLS_DIR}/DumpRenderTree/LayoutTestController.cpp
140         ${TOOLS_DIR}/DumpRenderTree/CyclicRedundancyCheck.cpp
141         ${TOOLS_DIR}/DumpRenderTree/PixelDumpSupport.cpp
142         ${TOOLS_DIR}/DumpRenderTree/WorkQueue.cpp
143         ${TOOLS_DIR}/DumpRenderTree/GCController.cpp
144     )
145 ENDIF ()
146
147 SET(WebKit_LINK_FLAGS ${BLACKBERRY_LINK_FLAGS})
148
149 LIST(APPEND WebKit_LIBRARIES
150     ${AOI_LIBRARY}
151     ${CLIPBOARD_LIBRARY}
152     ${CURL_LIBRARY}
153     ${Crypto_LIBRARY}
154     ${FONTCONFIG_LIBRARY}
155     ${FREETYPE_LIBRARY}
156     ${HARFBUZZ_LIBRARY}
157     ${ICUData_LIBRARY}
158     ${ICUI18N_LIBRARY}
159     ${ICUUC_LIBRARY}
160     ${INTL_LIBRARY}
161     ${Iconv_LIBRARY}
162     ${JPEG_LIBRARY}
163     ${JavaScriptCore_LIBRARY_NAME}
164     ${MD_LIBRARY}
165     ${MMR_LIBRARY}
166     ${M_LIBRARY}
167     ${NBUTIL_LIBRARY}
168     ${OTS_LIBRARY}
169     ${PNG_LIBRARY}
170     ${PPSCache_LIBRARY}
171     ${SQLITE3_LIBRARY}
172     ${SSL_LIBRARY}
173     ${STRM_LIBRARY}
174     ${Screen_LIBRARY}
175     ${Skia_LIBRARY}
176     ${Skia_QNX_LIBRARY}
177     ${Socket_LIBRARY}
178     ${UUID_LIBRARY}
179     ${WebKitPlatform_LIBRARY}
180     ${XML2_LIBRARY}
181     ${XSLT_LIBRARY}
182     ${Z_LIBRARY}
183 )
184
185 IF (PROFILING)
186     LIST(APPEND WebKit_LIBRARIES
187         ${PROFILING_LIBRARY}
188     )
189 ENDIF ()
190
191 IF (WTF_USE_ACCELERATED_COMPOSITING)
192     LIST(APPEND WebKit_SOURCES
193         blackberry/WebKitSupport/GLES2Context.cpp
194     )
195     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
196         "${WEBCORE_DIR}/platform/graphics/gles2"
197     )
198     LIST(APPEND WebKit_LIBRARIES
199         ${GLESv2_LIBRARY}
200         ${EGL_LIBRARY}
201     )
202 ENDIF ()
203
204 FILE(GLOB BBWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/blackberry/Api/*.h")
205
206 INSTALL(FILES ${BBWebKit_HEADERS} DESTINATION usr/include/browser/webkit)
207
208 IF (NOT PUBLIC_BUILD)
209     INSTALL(FILES ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
210             DESTINATION usr/include/browser/webkit)
211 ENDIF ()
212
213 SET(WebKit_INSTALL_DIR "${CMAKE_SYSTEM_PROCESSOR}/usr/lib/torch-webkit")
214
215 # Get the JavaScript file names from inspector.html, in order to keep the JavaScript files
216 # generated in the correct order, and to keep the file names in-sync with the changes of inspector.html
217 FILE (STRINGS ${WEBCORE_DIR}/inspector/front-end/inspector.html SCRIPT_TAGS REGEX "<script.* src=\".*js\".*></script>")
218 FOREACH (_line IN LISTS SCRIPT_TAGS)
219     STRING (STRIP ${_line} _stripped_line)
220     STRING (REGEX REPLACE "<script.* src=\"(.*\\.js)\".*></script>" "\\1" _js_file ${_stripped_line})
221     STRING (COMPARE EQUAL ${_js_file} "InspectorBackendCommands.js" _comp_result)
222     IF ( ${_comp_result} )
223         # InspectorBackendCommands.js was generated with the build, should get it from DERIVED_SOURCES_WEBCORE_DIR.
224         SET (_js_file "${DERIVED_SOURCES_WEBCORE_DIR}/${_js_file}")
225     ELSE ()
226         SET (_js_file "${WEBCORE_DIR}/inspector/front-end/${_js_file}")
227     ENDIF ()
228     SET (JS_FILES ${JS_FILES} ${_js_file})
229 ENDFOREACH ()
230 SET (JS_FILES ${JS_FILES} ${WEBKIT_DIR}/blackberry/WebCoreSupport/inspectorBB.js)
231
232 ADD_CUSTOM_TARGET (
233     inspector ALL
234     COMMAND cat ${JS_FILES} > ${DERIVED_SOURCES_WEBCORE_DIR}/javascript.js
235     DEPENDS ${WebCore_LIBRARY_NAME}
236     COMMENT "Web Inspector resources building..."
237 )
238
239 # Generate contents for AboutData.cpp
240 ADD_CUSTOM_COMMAND(
241     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
242     MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
243     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl HAVE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
244 )
245
246 ADD_CUSTOM_COMMAND(
247     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
248     MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
249     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl ENABLE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
250 )
251
252 ADD_CUSTOM_COMMAND(
253     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
254     MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
255     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl USE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
256 )
257
258 ADD_CUSTOM_TARGET(
259     aboutFeatures ALL
260     DEPENDS ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
261 )