1 SET(PROJECT_VERSION_MAJOR 0)
2 SET(PROJECT_VERSION_MINOR 6)
3 SET(PROJECT_VERSION_PATCH 20)
4 SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
6 # -----------------------------------------------------------------------------
7 # We mention Safari version because many sites check for it.
8 # Sync with Source/WebCore/Configurations/Version.xcconfig whenever Safari is
10 # -----------------------------------------------------------------------------
11 SET(WEBKIT_USER_AGENT_MAJOR_VERSION 534)
12 SET(WEBKIT_USER_AGENT_MINOR_VERSION 16)
14 ADD_DEFINITIONS(-DBUILDING_EFL__=1)
15 ADD_DEFINITIONS(-DWTF_PLATFORM_EFL=1)
16 SET(WTF_PLATFORM_EFL 1)
18 # -----------------------------------------------------------------------------
19 # Determine which network backend will be used
20 # -----------------------------------------------------------------------------
21 SET(ALL_NETWORK_BACKENDS soup curl)
22 SET(NETWORK_BACKEND "soup" CACHE STRING "choose which network backend to use (one of ${ALL_NETWORK_BACKENDS})")
24 # -----------------------------------------------------------------------------
25 # Determine which font backend will be used
26 # -----------------------------------------------------------------------------
27 SET(ALL_FONT_BACKENDS freetype pango)
28 SET(FONT_BACKEND "freetype" CACHE STRING "choose which font backend to use (one of ${ALL_FONT_BACKENDS})")
30 FIND_PACKAGE(Cairo 1.10 REQUIRED)
31 FIND_PACKAGE(EFL REQUIRED)
32 FIND_PACKAGE(Fontconfig 2.8.0 REQUIRED)
33 FIND_PACKAGE(Sqlite REQUIRED)
34 FIND_PACKAGE(LibXml2 2.6 REQUIRED)
35 FIND_PACKAGE(LibXslt 1.1.7 REQUIRED)
36 FIND_PACKAGE(ICU REQUIRED)
37 FIND_PACKAGE(Threads REQUIRED)
38 FIND_PACKAGE(JPEG REQUIRED)
39 FIND_PACKAGE(PNG REQUIRED)
41 ADD_DEFINITIONS(-DENABLE_CONTEXT_MENUS=1)
43 SET(WTF_USE_PTHREADS 1)
44 ADD_DEFINITIONS(-DWTF_USE_PTHREADS=1)
46 SET(WTF_USE_ICU_UNICODE 1)
47 ADD_DEFINITIONS(-DWTF_USE_ICU_UNICODE=1)
50 ADD_DEFINITIONS(-DWTF_USE_CAIRO=1)
52 SET(JSC_EXECUTABLE_NAME jsc_efl)
53 SET(WTF_LIBRARY_NAME wtf_efl)
54 SET(JavaScriptCore_LIBRARY_NAME javascriptcore_efl)
55 SET(WebCore_LIBRARY_NAME webcore_efl)
56 SET(WebKit_LIBRARY_NAME ewebkit)
57 SET(WebKit2_LIBRARY_NAME ewebkit2)
59 SET(DATA_INSTALL_DIR "share/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR}" CACHE PATH "Installation path for theme data")
60 SET(THEME_BINARY_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme)
62 SET(VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/eflsymbols.filter")
65 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_3D_RENDERING ON)
66 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BATTERY_STATUS OFF)
67 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BLOB ON)
68 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_FILTERS ON)
69 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DATALIST ON)
70 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DEVICE_ORIENTATION ON)
71 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILE_SYSTEM ON)
72 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS ON)
73 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API ON)
74 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION ON)
75 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GLIB_SUPPORT ON)
76 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE ON)
77 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_DATE ON)
78 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_DATETIME ON)
79 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_DATETIMELOCAL ON)
80 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_MONTH ON)
81 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_TIME ON)
82 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_WEEK ON)
83 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR ON)
84 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_WEBKIT_BLOB_BUILDER ON)
85 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CAPTURE ON)
86 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MICRODATA ON)
87 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PAGE_VISIBILITY_API ON)
88 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REGISTER_PROTOCOL_HANDLER ON)
89 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REQUEST_ANIMATION_FRAME OFF)
90 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHARED_WORKERS ON)
91 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS ON)
92 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_ICON_LOADING ON)
93 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIBRATION ON)
94 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO ON)
95 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO_TRACK ON)
96 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_AUDIO ON)
97 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WORKERS ON)
98 WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC ON)
100 WEBKIT_OPTION_DEFINE(ENABLE_AS_IMAGE "Enable SVG as image" ON)
101 WEBKIT_OPTION_DEFINE(ENABLE_CDOM_BINDINGS "C DOM Bindings" OFF)
102 WEBKIT_OPTION_DEFINE(ENABLE_DFG_JIT "Enable DFG JIT" OFF)
103 WEBKIT_OPTION_DEFINE(ENABLE_FAST_MALLOC "Enable fastMalloc" OFF)
104 WEBKIT_OPTION_DEFINE(ENABLE_MEMORY_SAMPLER "Enable Memory Sampler for WebKit2" ON)
105 WEBKIT_OPTION_DEFINE(ENABLE_OFFLINE_WEB_APPLICATIONS "Enable offline web applications" ON)
106 WEBKIT_OPTION_DEFINE(ENABLE_OVERFLOW_SCROLLING "Enable css overflow scrolling property" ON)
107 WEBKIT_OPTION_DEFINE(ENABLE_PLUGIN_PROCESS "Enable PluginProcess for WebKit2" ON)
109 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ORIENTATION_EVENTS ON)
111 #--------------------------------------------------------------------------------------
112 # Enabled WebKit Features for Tizen or Tizen Specific Features.
113 #--------------------------------------------------------------------------------------
114 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_DBSPACE_PATH "Enable Tizen application's directory path" ON)
115 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_INTERNATIONAL_TEXT_SUPPORT "Enable International text support for tizen webkit" ON)
116 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_REGISTER_CONTENT_HANDLER "Enable the register content handler for Tizen" ON)
117 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_SEARCH_PROVIDER "Enable Tizen search provider for Tizen" OFF)
118 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_SUPPORT "Enable Tizen Support" ON)
119 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_SUPPORT_WEBAPP_META_TAG "Enable apple meta tag" ON)
120 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_WEBKIT_EFL_DRT "Enable DumpRenderTree for Tizen WebKit" ON)
122 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SCREEN_ORIENTATION_SUPPORT ON)
123 ADD_DEFINITIONS(-DENABLE_TIZEN_SCREEN_ORIENTATION_SUPPORT=1)
126 WEBKIT_OPTION_DEFINE(ENABLE_NOTIFICATIONS "notification" ON)
127 WEBKIT_OPTION_DEFINE(ENABLE_LEGACY_NOTIFICATIONS "legacy notification" ON)
128 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_MM_PLAYER "Use Tizen Multimedia Framework for Tizen" OFF)
129 WEBKIT_OPTION_DEFINE(ENABLE_MEDIA_STREAM "Enable Media Stream" ON)
130 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_WEBKIT2_SPELLCHECKING "Enable spellchecking in WebKit 2" OFF)
131 WEBKIT_OPTION_DEFINE(ENABLE_TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP "Enable rotation while showing javascript popup for WebKit 2" ON)
136 OPTION(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
139 MESSAGE(STATUS "Using Ecore-X to provide extended support.")
140 ADD_DEFINITIONS(-DHAVE_ECORE_X)
142 MESSAGE(ERROR "Requested Ecore-X but it was not found!")
146 IF (NETWORK_BACKEND STREQUAL "soup")
147 IF (NOT ENABLE_GLIB_SUPPORT)
148 SET(ENABLE_GLIB_SUPPORT 1)
149 MESSAGE("Forcing Glib support")
151 FIND_PACKAGE(LibSoup2 2.33.4 REQUIRED)
153 ADD_DEFINITIONS(-DWTF_USE_SOUP=1)
155 FIND_PACKAGE(CURL REQUIRED)
156 FIND_PACKAGE(ZLIB REQUIRED)
158 ADD_DEFINITIONS(-DWTF_USE_CURL=1)
161 IF (FONT_BACKEND STREQUAL "freetype")
163 FIND_PACKAGE(Freetype REQUIRED)
164 FIND_PACKAGE(ZLIB REQUIRED)
165 SET(WTF_USE_FREETYPE 1)
166 ADD_DEFINITIONS(-DWTF_USE_FREETYPE=1)
168 FIND_PACKAGE(Pango REQUIRED)
170 ADD_DEFINITIONS(-DWTF_USE_PANGO=1)
172 IF (NOT ENABLE_GLIB_SUPPORT)
173 SET(ENABLE_GLIB_SUPPORT 1)
174 MESSAGE("Forcing Glib support")
179 SET(ENABLE_GLIB_SUPPORT 1)
180 MESSAGE("Forcing Glib support")
183 IF (ENABLE_GLIB_SUPPORT)
184 FIND_PACKAGE(Glib REQUIRED)
185 FIND_PACKAGE(Gthread REQUIRED)
188 SET(CPACK_SOURCE_GENERATOR TBZ2)
190 # -----------------------------------------------------------------------------
191 # Determine which Samsung model will be defined
192 # -----------------------------------------------------------------------------
193 IF (ENABLE_TIZEN_SUPPORT)
194 ADD_DEFINITIONS(-DWTF_OS_TIZEN=1)
197 ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2=1)
200 SET(ENABLE_TOUCH_ICON_LOADING 1)
202 IF (ENABLE_BATTERY_STATUS)
203 ADD_DEFINITIONS(-DENABLE_TIZEN_BATTERY_STATUS=1)
204 SET(ENABLE_TIZEN_BATTERY_STATUS 1)
205 FIND_PACKAGE(Pmapi REQUIRED)
209 # SET(ENABLE_NOTIFICATIONS 1)
210 # LIST(APPEND FEATURE_DEFINES ENABLE_NOTIFICATIONS)
211 # SET(ENABLE_LEGACY_NOTIFICATIONS 1)
212 # LIST(APPEND FEATURE_DEFINES ENABLE_LEGACY_NOTIFICATIONS)
214 SET(ENABLE_PAGE_VISIBILITY_API 1)
215 SET(ENABLE_TIZEN_KEYGEN 1)
216 LIST(APPEND FEATURE_DEFINES ENABLE_TIZEN_KEYGEN)
217 #FIXME SET(ENABLE_WEBGL 1)
219 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TIZEN_MM_PLAYER "Use Tizen Multimedia Framework for Tizen" DEFAULT ON)
220 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM "Enable Media Stream" DEFAULT OFF)
223 IF (ENABLE_REGISTER_PROTOCOL_HANDLER)
224 SET(ENABLE_TIZEN_REGISTER_PROTOCOL_HANDLER 1)
227 # -----------------------------------------------------------------------------
228 # Checking Tizen dependencies.
229 # -----------------------------------------------------------------------------
230 MESSAGE("Checking Tizen dependencies...")
232 FIND_PACKAGE(ELEMENTARY REQUIRED)
233 FIND_PACKAGE(UIGadget REQUIRED)
237 ADD_DEFINITIONS(-DENABLE_TIZEN_DLOG_SUPPORT=1)
240 FIND_PACKAGE(Media-Utils 0.1.35 REQUIRED)
241 FIND_PACKAGE(VConf REQUIRED)
243 IF (ENABLE_DEVICE_ORIENTATION)
244 FIND_PACKAGE(Tizen-Sensor REQUIRED)
245 SET(ENABLE_TIZEN_DEVICE_ORIENTATION 1)
248 IF(ENABLE_GEOLOCATION)
249 FIND_PACKAGE(Tizen-Location-Manager REQUIRED)
250 ADD_DEFINITIONS(-DENABLE_TIZEN_GEOLOCATION=1)
251 SET(ENABLE_TIZEN_GEOLOCATION 1)
254 IF (ENABLE_TIZEN_KEYGEN)
255 FIND_PACKAGE(SSL REQUIRED)
259 FIND_PACKAGE(Skia REQUIRED)
260 FIND_PACKAGE(Harfbuzz REQUIRED)
262 ADD_DEFINITIONS(-UWTF_USE_CAIRO)
263 ADD_DEFINITIONS(-DWTF_USE_SKIA=1)
264 ADD_DEFINITIONS(-DENABLE_TIZEN_SKIA_FOR_PROFILE=1)
267 IF (ENABLE_TIZEN_RENDERING_PROFILE)
268 ADD_DEFINITIONS(-DENABLE_TIZEN_RENDERING_PROFILE_TEST=1)
271 FIND_PACKAGE(GLES REQUIRED)
272 IF (ENABLE_WEBKIT2 OR NOT WTF_USE_CAIRO)
273 IF ("${EFL_TARGET}" STREQUAL "i386")
274 SET(WTF_USE_ACCELERATED_COMPOSITING 1)
275 SET(WTF_USE_TEXTURE_MAPPER 1)
277 ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING=0)
278 SET(ENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING 0)
280 SET(WTF_USE_ACCELERATED_COMPOSITING 1)
281 SET(WTF_USE_TEXTURE_MAPPER 1)
283 ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING=1)
284 SET(ENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING 1)
287 SET(WTF_USE_ACCELERATED_COMPOSITING 1)
288 SET(WTF_USE_TEXTURE_MAPPER 0)
291 MESSAGE("EGL Image Extensions ON")
292 ADD_DEFINITIONS(-DWTF_USE_EGL_IMAGE_EXT=1)
293 SET(WTF_USE_EGL_IMAGE_EXT 1)
295 MESSAGE("EGL Image Extensions OFF")
296 ADD_DEFINITIONS(-DWTF_USE_EGL_IMAGE_EXT=0)
297 SET(WTF_USE_EGL_IMAGE_EXT 0)
300 IF (WTF_USE_TEXTURE_MAPPER)
307 ADD_DEFINITIONS(-DWTF_USE_ACCELERATED_COMPOSITING=${WTF_USE_ACCELERATED_COMPOSITING})
308 REMOVE_DEFINITIONS(-DWTF_USE_TEXTURE_MAPPER=1) # FIXME: Is it necessary?
309 ADD_DEFINITIONS(-DWTF_USE_TEXTURE_MAPPER=${WTF_USE_TEXTURE_MAPPER})
311 IF (ENABLE_FILE_SYSTEM)
312 SET(ENABLE_TIZEN_FILE_SYSTEM 1)
315 IF (ENABLE_INDEXED_DATABASE)
316 FIND_PACKAGE(LevelDB REQUIRED)
317 FIND_PACKAGE(LevelDB-MemEnv REQUIRED)
318 SET(WTF_USE_LEVELDB 1)
319 ADD_DEFINITIONS(-DWTF_USE_LEVELDB=1)
320 SET(ENABLE_TIZEN_INDEXED_DATABASE 1)
323 IF (ENABLE_NOTIFICATIONS)
324 SET(ENABLE_TIZEN_NOTIFICATION 1)
327 IF (ENABLE_WEB_AUDIO)
328 MESSAGE("WEB AUDIO is enabled...")
329 SET(ENABLE_TIZEN_WEB_AUDIO 1)
330 LIST(APPEND FEATURE_DEFINES ENABLE_TIZEN_WEB_AUDIO)
332 SET(GSTREAMER_COMPONENTS app interfaces pbutils)
333 SET(WTF_USE_GSTREAMER 1)
334 ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)
336 LIST(APPEND GSTREAMER_COMPONENTS audio fft)
337 SET(WTF_USE_WEBAUDIO_GSTREAMER 1)
338 ADD_DEFINITIONS(-DWTF_USE_WEBAUDIO_GSTREAMER=1)
340 FIND_PACKAGE(GStreamer REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
343 share/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR}/webaudio)
344 ADD_DEFINITIONS(-DWEB_AUDIO_DIR="/usr/${WEB_AUDIO_DIR}")
346 IF (NOT ENABLE_WEBKIT2)
347 # FIXME: It should be moved to proper position.
348 FILE(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav")
349 INSTALL(FILES ${WEB_AUDIO_DATA} DESTINATION ${WEB_AUDIO_DIR})
354 IF (ENABLE_TIZEN_DBSPACE_PATH)
355 FIND_PACKAGE(CAPI REQUIRED)
358 IF (ENABLE_MEDIA_STREAM)
359 SET(ENABLE_TIZEN_MEDIA_STREAM 1)
360 LIST(APPEND FEATURE_DEFINES ENABLE_TIZEN_MEDIA_STREAM)
363 IF (ENABLE_TIZEN_MM_PLAYER)
364 FIND_PACKAGE(ELEMENTARY REQUIRED)
365 FIND_PACKAGE(EFREET REQUIRED)
366 FIND_PACKAGE(ETHUMB REQUIRED)
367 FIND_PACKAGE(EDBUS REQUIRED)
368 FIND_PACKAGE(DBUS-1 REQUIRED)
369 FIND_PACKAGE(MM-Player REQUIRED)
372 SET(GSTREAMER_COMPONENTS app interfaces pbutils video)
373 FIND_PACKAGE(GStreamer REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
375 SET(WTF_USE_GSTREAMER 1)
376 ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)
380 IF (ENABLE_TIZEN_WEBKIT2_SPELLCHECKING)
381 FIND_PACKAGE(Enchant REQUIRED)
382 ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_SPELLCHECKING=1)
385 MESSAGE("Finish to check Tizen dependencies")