tizen beta release
[profile/ivi/webkit-efl.git] / Source / WebKit / blackberry / CMakeListsBlackBerry.txt
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}/websockets"
20     "${WEBKIT_DIR}/blackberry/Api"
21     "${WEBKIT_DIR}/blackberry/WebCoreSupport"
22     "${WEBKIT_DIR}/blackberry/WebKitSupport"
23     "${CMAKE_SOURCE_DIR}/Source" # For JavaScriptCore API headers
24 )
25 IF (ENABLE_DRT)
26     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
27         # needed for DRT for now
28         "${JAVASCRIPTCORE_DIR}/wtf"
29         "${WEBCORE_DIR}/platform/mock"
30         "${WEBCORE_DIR}/svg/animation"
31         "${WEBCORE_DIR}/workers"
32         "${TOOLS_DIR}"
33         "${TOOLS_DIR}/DumpRenderTree"
34         "${TOOLS_DIR}/DumpRenderTree/blackberry"
35     )
36 ENDIF ()
37
38 ADD_DEFINITIONS(-DUSER_PROCESSES)
39
40 LIST(APPEND WebKit_SOURCES
41     blackberry/Api/BackingStore.cpp
42     blackberry/Api/BlackBerryGlobal.cpp
43     blackberry/Api/WebString.cpp
44     blackberry/Api/ResourceHolderImpl.cpp
45     blackberry/Api/WebKitTextCodec.cpp
46     blackberry/Api/WebPage.cpp
47     blackberry/Api/WebPageGroupLoadDeferrer.cpp
48     blackberry/Api/WebSettings.cpp
49     blackberry/WebCoreSupport/CacheClientBlackBerry.cpp
50     blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
51     blackberry/WebCoreSupport/ClientExtension.cpp
52     blackberry/WebCoreSupport/ContextMenuClientBlackBerry.cpp
53     blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp
54     blackberry/WebCoreSupport/DeviceOrientationClientBlackBerry.cpp
55     blackberry/WebCoreSupport/DragClientBlackBerry.cpp
56     blackberry/WebCoreSupport/EditCommandBlackBerry.cpp
57     blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
58     blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
59     blackberry/WebCoreSupport/FrameNetworkingContextBlackBerry.cpp
60     blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp
61     blackberry/WebCoreSupport/IconDatabaseClientBlackBerry.cpp
62     blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
63     blackberry/WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp
64     blackberry/WebCoreSupport/NotificationPresenterImpl.cpp
65     blackberry/WebKitSupport/BackingStoreCompositingSurface.cpp
66     blackberry/WebKitSupport/BackingStoreTile.cpp
67     blackberry/WebKitSupport/BackingStoreClient.cpp
68     blackberry/WebKitSupport/DOMSupport.cpp
69     blackberry/WebKitSupport/FrameLayers.cpp
70     blackberry/WebKitSupport/InputHandler.cpp
71     blackberry/WebKitSupport/OutOfMemoryHandler.cpp
72     blackberry/WebKitSupport/RenderQueue.cpp
73     blackberry/WebKitSupport/SelectionHandler.cpp
74     blackberry/WebKitSupport/SurfacePool.cpp
75     blackberry/WebKitSupport/TouchEventHandler.cpp
76     blackberry/WebKitSupport/FatFingers.cpp
77     blackberry/WebKitSupport/WebPageCompositor.cpp
78 )
79
80 IF (ENABLE_DRT)
81     # DumpRenderTree sources
82     LIST(APPEND WebKit_SOURCES
83         blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
84         ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp
85         ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp
86         ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTree.cpp
87         ${TOOLS_DIR}/DumpRenderTree/blackberry/EventSender.cpp
88         ${TOOLS_DIR}/DumpRenderTree/blackberry/GCControllerBlackBerry.cpp
89         ${TOOLS_DIR}/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp
90         ${TOOLS_DIR}/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp
91         ${TOOLS_DIR}/DumpRenderTree/blackberry/PNGImageEncoder.cpp
92         ${TOOLS_DIR}/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp
93         ${TOOLS_DIR}/DumpRenderTree/AccessibilityController.cpp
94         ${TOOLS_DIR}/DumpRenderTree/AccessibilityUIElement.cpp
95         ${TOOLS_DIR}/DumpRenderTree/AccessibilityTextMarker.cpp
96         ${TOOLS_DIR}/DumpRenderTree/LayoutTestController.cpp
97         ${TOOLS_DIR}/DumpRenderTree/CyclicRedundancyCheck.cpp
98         ${TOOLS_DIR}/DumpRenderTree/PixelDumpSupport.cpp
99         ${TOOLS_DIR}/DumpRenderTree/WorkQueue.cpp
100         ${TOOLS_DIR}/DumpRenderTree/GCController.cpp
101     )
102 ENDIF ()
103
104 SET(WebKit_LINK_FLAGS ${BLACKBERRY_LINK_FLAGS})
105
106 LIST(APPEND WebKit_LIBRARIES
107     ${AOI_LIBRARY}
108     ${CLIPBOARD_LIBRARY}
109     ${CURL_LIBRARY}
110     ${Crypto_LIBRARY}
111     ${FONTCONFIG_LIBRARY}
112     ${FREETYPE_LIBRARY}
113     ${HARFBUZZ_LIBRARY}
114     ${ICUData_LIBRARY}
115     ${ICUI18N_LIBRARY}
116     ${ICUUC_LIBRARY}
117     ${IMG_LIBRARY}
118     ${INTL_LIBRARY}
119     ${Iconv_LIBRARY}
120     ${JavaScriptCore_LIBRARY_NAME}
121     ${MD_LIBRARY}
122     ${MMR_LIBRARY}
123     ${M_LIBRARY}
124     ${NBUTIL_LIBRARY}
125     ${PNG_LIBRARY}
126     ${PPSCache_LIBRARY}
127     ${SQLITE3_LIBRARY}
128     ${SSL_LIBRARY}
129     ${STRM_LIBRARY}
130     ${Screen_LIBRARY}
131     ${Skia_LIBRARY}
132     ${Skia_QNX_LIBRARY}
133     ${Socket_LIBRARY}
134     ${UUID_LIBRARY}
135     ${WebKitPlatform_LIBRARY}
136     ${XML2_LIBRARY}
137     ${XSLT_LIBRARY}
138     ${Z_LIBRARY}
139 )
140
141 IF (PROFILING)
142     LIST(APPEND WebKit_LIBRARIES
143         ${PROFILING_LIBRARY}
144     )
145 ENDIF ()
146
147 IF (WTF_USE_ACCELERATED_COMPOSITING)
148     LIST(APPEND WebKit_SOURCES
149         blackberry/WebCoreSupport/GLES2Context.cpp
150     )
151     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
152         "${WEBCORE_DIR}/platform/graphics/gles2"
153     )
154     LIST(APPEND WebKit_LIBRARIES
155         ${GLESv2_LIBRARY}
156         ${EGL_LIBRARY}
157     )
158 ENDIF ()
159
160 FILE(GLOB BBWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/blackberry/Api/*.h")
161
162 INSTALL(FILES ${BBWebKit_HEADERS} DESTINATION usr/include/browser/webkit)
163
164 IF (ENABLE_DRT)
165     INSTALL(FILES ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
166             DESTINATION usr/include/browser/webkit)
167 ENDIF ()
168
169 SET(WebKit_INSTALL_DIR "${CMAKE_SYSTEM_PROCESSOR}/usr/lib/torch-webkit")
170
171 # Get the JavaScript file names from inspector.html, in order to keep the JavaScript files
172 # generated in the correct order, and to keep the file names in-sync with the changes of inspector.html
173 FILE (STRINGS ${WEBCORE_DIR}/inspector/front-end/inspector.html SCRIPT_TAGS REGEX "<script.* src=\".*js\".*></script>")
174 FOREACH (_line IN LISTS SCRIPT_TAGS)
175     STRING (STRIP ${_line} _stripped_line)
176     STRING (REGEX REPLACE "<script.* src=\"(.*\\.js)\".*></script>" "\\1" _js_file ${_stripped_line})
177     STRING (COMPARE EQUAL ${_js_file} "InspectorBackendStub.js" _comp_result)
178     IF ( ${_comp_result} )
179         # InspectorBackendStub.js was generated with the build, should get it from DERIVED_SOURCES_WEBCORE_DIR.
180         SET (_js_file "${DERIVED_SOURCES_WEBCORE_DIR}/${_js_file}")
181     ELSE ()
182         SET (_js_file "${WEBCORE_DIR}/inspector/front-end/${_js_file}")
183     ENDIF ()
184     SET (JS_FILES ${JS_FILES} ${_js_file})
185 ENDFOREACH ()
186 SET (JS_FILES ${JS_FILES} ${WEBKIT_DIR}/blackberry/WebCoreSupport/inspectorBB.js)
187
188 ADD_CUSTOM_TARGET (
189     inspector ALL
190     COMMAND cat ${JS_FILES} > ${DERIVED_SOURCES_WEBCORE_DIR}/javascript.js
191     DEPENDS ${WebCore_LIBRARY_NAME}
192     COMMENT "Web Inspector resources building..."
193 )