PlatformBlackBerry.cmake 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. list(INSERT WebKit_INCLUDE_DIRECTORIES 0
  2. "${BLACKBERRY_THIRD_PARTY_DIR}" # For <unicode.h>, which is included from <sys/keycodes.h>.
  3. )
  4. list(APPEND WebKit_INCLUDE_DIRECTORIES
  5. "${JAVASCRIPTCORE_DIR}/dfg"
  6. "${WEBCORE_DIR}/bindings/cpp"
  7. "${WEBCORE_DIR}/fileapi"
  8. "${WEBCORE_DIR}/history/blackberry"
  9. "${WEBCORE_DIR}/html/parser" # For HTMLParserIdioms.h
  10. "${WEBCORE_DIR}/loader/appcache"
  11. "${WEBCORE_DIR}/platform/blackberry"
  12. "${WEBCORE_DIR}/platform/graphics/gpu"
  13. "${WEBCORE_DIR}/platform/graphics/blackberry"
  14. "${WEBCORE_DIR}/platform/image-encoders"
  15. "${WEBCORE_DIR}/platform/network/blackberry"
  16. "${WEBCORE_DIR}/testing/js"
  17. "${WEBCORE_DIR}/Modules/geolocation"
  18. "${WEBCORE_DIR}/Modules/indexeddb"
  19. "${WEBCORE_DIR}/Modules/vibration"
  20. "${WEBCORE_DIR}/Modules/websockets"
  21. "${WEBKIT_DIR}/blackberry/Api"
  22. "${WEBKIT_DIR}/blackberry/WebCoreSupport"
  23. "${WEBKIT_DIR}/blackberry/WebKitSupport"
  24. "${CMAKE_SOURCE_DIR}"
  25. )
  26. if (ENABLE_NOTIFICATIONS)
  27. list(APPEND WebKit_INCLUDE_DIRECTORIES
  28. "${WEBCORE_DIR}/Modules/notifications"
  29. )
  30. endif ()
  31. if (NOT PUBLIC_BUILD)
  32. list(APPEND WebKit_INCLUDE_DIRECTORIES
  33. # needed for DRT for now
  34. "${WEBCORE_DIR}/platform/mock"
  35. "${WEBCORE_DIR}/svg/animation"
  36. "${WEBCORE_DIR}/workers"
  37. "${TOOLS_DIR}"
  38. "${TOOLS_DIR}/DumpRenderTree"
  39. "${TOOLS_DIR}/DumpRenderTree/blackberry"
  40. )
  41. endif ()
  42. if (ENABLE_BATTERY_STATUS)
  43. list(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
  44. list(APPEND WebKit_SOURCES blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp)
  45. endif ()
  46. if (ENABLE_NAVIGATOR_CONTENT_UTILS)
  47. list(APPEND WebKit_INCLUDE_DIRECTORIES
  48. "${WEBCORE_DIR}/Modules/navigatorcontentutils"
  49. )
  50. endif ()
  51. if (ENABLE_MEDIA_STREAM)
  52. list(APPEND WebKit_INCLUDE_DIRECTORIES
  53. "${WEBCORE_DIR}/Modules/mediastream"
  54. "${WEBCORE_DIR}/platform/mediastream"
  55. )
  56. list(APPEND WebKit_SOURCES
  57. blackberry/WebCoreSupport/UserMediaClientImpl.cpp
  58. )
  59. endif ()
  60. add_definitions(-DUSER_PROCESSES)
  61. list(APPEND WebKit_SOURCES
  62. blackberry/Api/BackingStore.cpp
  63. blackberry/Api/BlackBerryGlobal.cpp
  64. blackberry/Api/InRegionScroller.cpp
  65. blackberry/Api/WebAnimation.cpp
  66. blackberry/Api/WebCookieJar.cpp
  67. blackberry/Api/WebKitMIMETypeConverter.cpp
  68. blackberry/Api/WebKitTextCodec.cpp
  69. blackberry/Api/WebOverlay.cpp
  70. blackberry/Api/WebOverlayOverride.cpp
  71. blackberry/Api/WebPage.cpp
  72. blackberry/Api/WebPageCompositor.cpp
  73. blackberry/Api/WebPageGroupLoadDeferrer.cpp
  74. blackberry/Api/WebSettings.cpp
  75. blackberry/Api/WebViewportArguments.cpp
  76. blackberry/Api/JavaScriptVariant.cpp
  77. blackberry/WebCoreSupport/AutofillManager.cpp
  78. blackberry/WebCoreSupport/BackForwardListBlackBerry.cpp
  79. blackberry/WebCoreSupport/CacheClientBlackBerry.cpp
  80. blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
  81. blackberry/WebCoreSupport/CredentialManager.cpp
  82. blackberry/WebCoreSupport/CredentialTransformData.cpp
  83. blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp
  84. blackberry/WebCoreSupport/DeviceOrientationClientBlackBerry.cpp
  85. blackberry/WebCoreSupport/DragClientBlackBerry.cpp
  86. blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
  87. blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
  88. blackberry/WebCoreSupport/FrameNetworkingContextBlackBerry.cpp
  89. blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp
  90. blackberry/WebCoreSupport/IconDatabaseClientBlackBerry.cpp
  91. blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
  92. blackberry/WebCoreSupport/NetworkInfoClientBlackBerry.cpp
  93. blackberry/WebCoreSupport/NotificationClientBlackBerry.cpp
  94. blackberry/WebCoreSupport/PlatformStrategiesBlackBerry.cpp
  95. blackberry/WebCoreSupport/NavigatorContentUtilsClientBlackBerry.cpp
  96. blackberry/WebCoreSupport/SuggestionBoxHandler.cpp
  97. blackberry/WebCoreSupport/SuggestionBoxElement.cpp
  98. blackberry/WebCoreSupport/VibrationClientBlackBerry.cpp
  99. blackberry/WebKitSupport/AboutData.cpp
  100. blackberry/WebKitSupport/BackingStoreTile.cpp
  101. blackberry/WebKitSupport/BackingStoreClient.cpp
  102. blackberry/WebKitSupport/BackingStoreVisualizationViewportAccessor.cpp
  103. blackberry/WebKitSupport/ColorPickerClient.cpp
  104. blackberry/WebKitSupport/DatePickerClient.cpp
  105. blackberry/WebKitSupport/DefaultTapHighlight.cpp
  106. blackberry/WebKitSupport/DOMSupport.cpp
  107. blackberry/WebKitSupport/FrameLayers.cpp
  108. blackberry/WebKitSupport/InPageSearchManager.cpp
  109. blackberry/WebKitSupport/InputHandler.cpp
  110. blackberry/WebKitSupport/InRegionScrollableArea.cpp
  111. blackberry/WebKitSupport/InspectorOverlayBlackBerry.cpp
  112. blackberry/WebKitSupport/NotificationManager.cpp
  113. blackberry/WebKitSupport/PagePopup.cpp
  114. blackberry/WebKitSupport/PagePopupClient.cpp
  115. blackberry/WebKitSupport/ProximityDetector.cpp
  116. blackberry/WebKitSupport/RenderQueue.cpp
  117. blackberry/WebKitSupport/SelectPopupClient.cpp
  118. blackberry/WebKitSupport/SelectionHandler.cpp
  119. blackberry/WebKitSupport/SelectionOverlay.cpp
  120. blackberry/WebKitSupport/SpellingHandler.cpp
  121. blackberry/WebKitSupport/SurfacePool.cpp
  122. blackberry/WebKitSupport/TouchEventHandler.cpp
  123. blackberry/WebKitSupport/FatFingers.cpp
  124. blackberry/WebKitSupport/WebKitThreadViewportAccessor.cpp
  125. )
  126. if (ENABLE_WEBGL)
  127. add_definitions(-DWTF_USE_OPENGL_ES_2=1)
  128. list(APPEND WebKit_INCLUDE_DIRECTORIES
  129. ${OPENGL_INCLUDE_DIR}
  130. ${THIRDPARTY_DIR}/ANGLE/src
  131. ${THIRDPARTY_DIR}/ANGLE/include/GLSLANG
  132. )
  133. list(APPEND WebKit_LIBRARIES
  134. ${OPENGL_gl_LIBRARY}
  135. )
  136. endif (ENABLE_WEBGL)
  137. if (NOT PUBLIC_BUILD)
  138. # DumpRenderTree sources
  139. list(APPEND WebKit_SOURCES
  140. blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
  141. ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp
  142. ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp
  143. ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTree.cpp
  144. ${TOOLS_DIR}/DumpRenderTree/blackberry/EventSender.cpp
  145. ${TOOLS_DIR}/DumpRenderTree/blackberry/GCControllerBlackBerry.cpp
  146. ${TOOLS_DIR}/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
  147. ${TOOLS_DIR}/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp
  148. ${TOOLS_DIR}/DumpRenderTree/blackberry/PNGImageEncoder.cpp
  149. ${TOOLS_DIR}/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp
  150. ${TOOLS_DIR}/DumpRenderTree/AccessibilityController.cpp
  151. ${TOOLS_DIR}/DumpRenderTree/AccessibilityUIElement.cpp
  152. ${TOOLS_DIR}/DumpRenderTree/AccessibilityTextMarker.cpp
  153. ${TOOLS_DIR}/DumpRenderTree/TestRunner.cpp
  154. ${TOOLS_DIR}/DumpRenderTree/CyclicRedundancyCheck.cpp
  155. ${TOOLS_DIR}/DumpRenderTree/PixelDumpSupport.cpp
  156. ${TOOLS_DIR}/DumpRenderTree/WorkQueue.cpp
  157. ${TOOLS_DIR}/DumpRenderTree/GCController.cpp
  158. ${WTF_DIR}/wtf/MD5.cpp
  159. )
  160. endif ()
  161. set(WebKit_LINK_FLAGS ${BLACKBERRY_LINK_FLAGS})
  162. list(APPEND WebKit_LIBRARIES
  163. ${CURL_LIBRARY}
  164. ${FONTCONFIG_LIBRARY}
  165. ${ICUData_LIBRARY}
  166. ${ICUI18N_LIBRARY}
  167. ${ICUUC_LIBRARY}
  168. ${INTL_LIBRARY}
  169. ${ITYPE_LIBRARY}
  170. ${JPEG_LIBRARY}
  171. JavaScriptCore
  172. ${LEVELDB_LIBRARY}
  173. ${MMR_LIBRARY}
  174. ${M_LIBRARY}
  175. ${OTS_LIBRARY}
  176. ${PNG_LIBRARY}
  177. ${SQLITE3_LIBRARY}
  178. ${WTLE_LIBRARY}
  179. ${WebKitPlatform_LIBRARY}
  180. ${XML2_LIBRARY}
  181. ${XSLT_LIBRARY}
  182. ${Z_LIBRARY}
  183. )
  184. if (PROFILING)
  185. list(APPEND WebKit_LIBRARIES
  186. ${PROFILING_LIBRARY}
  187. )
  188. endif ()
  189. if (WTF_USE_ACCELERATED_COMPOSITING)
  190. list(APPEND WebKit_SOURCES
  191. blackberry/WebKitSupport/GLES2Context.cpp
  192. )
  193. list(APPEND WebKit_INCLUDE_DIRECTORIES
  194. "${WEBCORE_DIR}/platform/graphics/gles2"
  195. )
  196. list(APPEND WebKit_LIBRARIES
  197. ${GLESv2_LIBRARY}
  198. ${EGL_LIBRARY}
  199. )
  200. endif ()
  201. file(GLOB BBWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/blackberry/Api/*.h")
  202. install(FILES ${BBWebKit_HEADERS}
  203. DESTINATION ../../usr/include/browser/webkit)
  204. if (NOT PUBLIC_BUILD)
  205. install(FILES ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
  206. DESTINATION ../../usr/include/browser/webkit)
  207. endif ()
  208. if (ENABLE_VIDEO_TRACK)
  209. list(APPEND WebKit_INCLUDE_DIRECTORIES
  210. "${WEBCORE_DIR}/html/track"
  211. )
  212. endif ()
  213. install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
  214. DESTINATION ../../usr/share/webkit/inspector/
  215. FILES_MATCHING PATTERN "*.js")
  216. install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
  217. DESTINATION ../../usr/share/webkit/inspector/
  218. FILES_MATCHING PATTERN "*.css")
  219. install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
  220. DESTINATION ../../usr/share/webkit/inspector/
  221. FILES_MATCHING PATTERN "*.png")
  222. install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
  223. DESTINATION ../../usr/share/webkit/inspector/
  224. FILES_MATCHING PATTERN "*.jpg")
  225. install(DIRECTORY ${WEBCORE_DIR}/inspector/front-end/
  226. DESTINATION ../../usr/share/webkit/inspector/
  227. FILES_MATCHING PATTERN "*.gif")
  228. install(FILES ${DERIVED_SOURCES_WEBCORE_DIR}/inspectorBB.html
  229. ${WEBKIT_DIR}/blackberry/WebCoreSupport/inspectorBB.js
  230. ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendCommands.js
  231. DESTINATION ../../usr/share/webkit/inspector/)
  232. if (NOT PUBLIC_BUILD)
  233. # Add the custom target to build the host-side ImageDiff binary.
  234. # Reuse the Qt version.
  235. add_custom_target(
  236. ImageDiff ALL
  237. WORKING_DIRECTORY ${TOOLS_DIR}/DumpRenderTree/blackberry/
  238. COMMAND ./build
  239. DEPENDS ${TOOLS_DIR}/DumpRenderTree/qt/ImageDiff.cpp
  240. COMMENT "ImageDiff building..."
  241. )
  242. endif ()
  243. add_custom_target(
  244. inspector ALL
  245. command cp ${WEBCORE_DIR}/inspector/front-end/inspector.html ${DERIVED_SOURCES_WEBCORE_DIR}/inspectorBB.html && echo '<script src="inspectorBB.js"></script>' >> ${DERIVED_SOURCES_WEBCORE_DIR}/inspectorBB.html
  246. DEPENDS WebCore
  247. COMMENT "Web Inspector resources building..."
  248. )
  249. # Generate contents for AboutData.cpp
  250. add_custom_command(
  251. OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
  252. MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in
  253. DEPENDS ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
  254. COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl HAVE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
  255. )
  256. add_custom_command(
  257. OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
  258. MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in
  259. DEPENDS ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
  260. COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl ENABLE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
  261. )
  262. add_custom_command(
  263. OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
  264. MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in
  265. DEPENDS ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
  266. COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl USE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
  267. )
  268. add_custom_target(
  269. aboutFeatures ALL
  270. DEPENDS ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
  271. )