Merge "Use EwkView's variables instead of drawingScaleFactor and drawingScrollPositio...
[framework/web/webkit-efl.git] / Source / WebKit2 / PlatformEfl.cmake
1 LIST(APPEND WebKit2_LINK_FLAGS
2     ${CAIRO_LDFLAGS}
3     ${ECORE_X_LDFLAGS}
4     ${EDJE_LDFLAGS}
5     ${EFLDEPS_LDFLAGS}
6     ${EVAS_LDFLAGS}
7     ${LIBSOUP24_LDFLAGS}
8 )
9
10 LIST(APPEND WebKit2StaticForDebug_SOURCES
11     Platform/efl/LoggingEfl.cpp
12     Platform/efl/ModuleEfl.cpp
13     Platform/efl/WorkQueueEfl.cpp
14     Platform/unix/SharedMemoryUnix.cpp
15
16     Platform/CoreIPC/unix/ConnectionUnix.cpp
17     Platform/CoreIPC/unix/AttachmentUnix.cpp
18
19     PluginProcess/efl/PluginProcessEfl.cpp
20     PluginProcess/efl/PluginProcessMainEfl.cpp
21
22     Shared/API/c/cairo/WKImageCairo.cpp
23
24     Shared/API/c/gtk/WKGraphicsContextGtk.cpp
25
26     Shared/cairo/ShareableBitmapCairo.cpp
27
28     Shared/efl/LayerTreeContextEfl.cpp
29     Shared/efl/NativeWebKeyboardEventEfl.cpp
30     Shared/efl/NativeWebWheelEventEfl.cpp
31     Shared/efl/NativeWebMouseEventEfl.cpp
32     Shared/efl/NativeWebTouchEventEfl.cpp
33     Shared/efl/ProcessExecutablePathEfl.cpp
34     Shared/efl/WebEventFactory.cpp
35
36     Shared/soup/PlatformCertificateInfo.cpp
37     Shared/soup/WebCoreArgumentCodersSoup.cpp
38
39     UIProcess/API/C/efl/WKView.cpp
40
41     UIProcess/API/C/soup/WKContextSoup.cpp
42     UIProcess/API/C/soup/WKSoupRequestManager.cpp
43
44     UIProcess/API/efl/BatteryProvider.cpp
45     UIProcess/API/efl/EwkViewImpl.cpp
46     UIProcess/API/efl/NetworkInfoProvider.cpp
47     UIProcess/API/efl/PageClientImpl.cpp
48     UIProcess/API/efl/VibrationProvider.cpp
49     UIProcess/API/efl/ewk_context.cpp
50     UIProcess/API/efl/ewk_context_download_client.cpp
51     UIProcess/API/efl/ewk_context_request_manager_client.cpp
52     UIProcess/API/efl/ewk_cookie_manager.cpp
53     UIProcess/API/efl/ewk_download_job.cpp
54     UIProcess/API/efl/ewk_form_submission_request.cpp
55     UIProcess/API/efl/ewk_intent.cpp
56     UIProcess/API/efl/ewk_intent_service.cpp
57     UIProcess/API/efl/ewk_main.cpp
58     UIProcess/API/efl/ewk_navigation_policy_decision.cpp
59     UIProcess/API/efl/ewk_popup_menu_item.cpp
60     UIProcess/API/efl/ewk_settings.cpp
61     UIProcess/API/efl/ewk_text_checker.cpp
62     UIProcess/API/efl/ewk_url_request.cpp
63     UIProcess/API/efl/ewk_url_response.cpp
64     UIProcess/API/efl/ewk_url_scheme_request.cpp
65     UIProcess/API/efl/ewk_view.cpp
66     UIProcess/API/efl/ewk_view_form_client.cpp
67     UIProcess/API/efl/ewk_view_loader_client.cpp
68     UIProcess/API/efl/ewk_view_policy_client.cpp
69     UIProcess/API/efl/ewk_view_resource_load_client.cpp
70     UIProcess/API/efl/ewk_web_error.cpp
71     UIProcess/API/efl/ewk_web_resource.cpp
72
73     UIProcess/cairo/BackingStoreCairo.cpp
74
75     UIProcess/efl/TextCheckerEfl.cpp
76     UIProcess/efl/WebContextEfl.cpp
77     UIProcess/efl/WebFullScreenManagerProxyEfl.cpp
78     UIProcess/efl/WebInspectorProxyEfl.cpp
79     UIProcess/efl/WebPageProxyEfl.cpp
80     UIProcess/efl/WebPopupMenuProxyEfl.cpp
81     UIProcess/efl/WebPreferencesEfl.cpp
82
83     UIProcess/soup/WebCookieManagerProxySoup.cpp
84     UIProcess/soup/WebSoupRequestManagerClient.cpp
85     UIProcess/soup/WebSoupRequestManagerProxy.cpp
86
87     UIProcess/Launcher/efl/ProcessLauncherEfl.cpp
88     UIProcess/Launcher/efl/ThreadLauncherEfl.cpp
89
90     UIProcess/Plugins/efl/PluginProcessProxyEfl.cpp
91
92     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
93
94     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
95     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
96
97     WebProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp
98     WebProcess/Downloads/soup/DownloadSoup.cpp
99
100     WebProcess/efl/WebProcessEfl.cpp
101     WebProcess/efl/WebProcessMainEfl.cpp
102
103     WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp
104
105     WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp
106     WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp
107     WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp
108     WebProcess/WebCoreSupport/efl/WebInspectorServerEfl.cpp
109     WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp
110     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
111
112     WebProcess/WebPage/efl/WebInspectorEfl.cpp
113     WebProcess/WebPage/efl/WebPageEfl.cpp
114
115     WebProcess/soup/WebSoupRequestManager.cpp
116     WebProcess/soup/WebKitSoupRequestGeneric.cpp
117     WebProcess/soup/WebKitSoupRequestInputStream.cpp
118 )
119
120 LIST(APPEND WebKit2StaticForDebug_MESSAGES_IN_FILES
121     UIProcess/soup/WebSoupRequestManagerProxy.messages.in
122     WebProcess/soup/WebSoupRequestManager.messages.in
123 )
124
125 LIST(APPEND WebKit2StaticForDebug_INCLUDE_DIRECTORIES
126     "${JAVASCRIPTCORE_DIR}/llint"
127     "${WEBCORE_DIR}/platform/efl"
128     "${WEBCORE_DIR}/platform/graphics/cairo"
129     "${WEBCORE_DIR}/platform/graphics/surfaces"
130     "${WEBCORE_DIR}/platform/network/soup"
131     "${WEBCORE_DIR}/platform/text/enchant"
132     "${WEBCORE_DIR}/svg/graphics"
133     "${WEBKIT2_DIR}/Shared/efl"
134     "${WEBKIT2_DIR}/Shared/soup"
135     "${WEBKIT2_DIR}/UIProcess/API/C/efl"
136     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
137     "${WEBKIT2_DIR}/UIProcess/API/efl"
138     "${WEBKIT2_DIR}/UIProcess/soup"
139     "${WEBKIT2_DIR}/WebProcess/Downloads/soup"
140     "${WEBKIT2_DIR}/WebProcess/efl"
141     "${WEBKIT2_DIR}/WebProcess/soup"
142     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/efl"
143     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
144     "${WTF_DIR}/wtf/gobject"
145     ${CAIRO_INCLUDE_DIRS}
146     ${ECORE_X_INCLUDE_DIRS}
147     ${EDJE_INCLUDE_DIRS}
148     ${EFLDEPS_INCLUDE_DIRS}
149     ${EVAS_INCLUDE_DIRS}
150     ${HARFBUZZ_INCLUDE_DIRS}
151     ${LIBXML2_INCLUDE_DIR}
152     ${LIBXSLT_INCLUDE_DIRS}
153     ${SQLITE_INCLUDE_DIRS}
154     ${Glib_INCLUDE_DIRS}
155     ${LIBSOUP24_INCLUDE_DIRS}
156     ${WTF_DIR}
157     ${CAPI_INCLUDE_DIRS}
158 )
159
160 LIST(APPEND WebKit2_LIBRARIES
161     ${CAIRO_LIBRARIES}
162     ${ECORE_X_LIBRARIES}
163     ${EFLDEPS_LIBRARIES}
164     ${Freetype_LIBRARIES}
165     ${LIBXML2_LIBRARIES}
166     ${SQLITE_LIBRARIES}
167     ${FONTCONFIG_LIBRARIES}
168     ${PNG_LIBRARY}
169     ${JPEG_LIBRARY}
170     ${CMAKE_DL_LIBS}
171     ${Glib_LIBRARIES}
172     ${LIBSOUP24_LIBRARIES}
173     ${CAPI_LIBRARIES}
174 )
175
176 LIST (APPEND WebKit2_FORWARDING_HEADERS_DIRECTORIES
177     Shared/API/c/efl
178     Shared/API/c/soup
179     UIProcess/API/C/efl
180     UIProcess/API/C/soup
181 )
182
183 LIST (APPEND WebProcess_SOURCES
184     efl/MainEfl.cpp
185 )
186
187 LIST (APPEND WebProcess_LIBRARIES
188     ${CAIRO_LIBRARIES}
189     ${ECORE_X_LIBRARIES}
190     ${EDJE_LIBRARIES}
191     ${EFLDEPS_LIBRARIES}
192     ${EVAS_LIBRARIES}
193     ${LIBXML2_LIBRARIES}
194     ${LIBXSLT_LIBRARIES}
195     ${SQLITE_LIBRARIES}
196 )
197
198 ADD_DEFINITIONS(-DDEFAULT_THEME_PATH=\"${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/themes\")
199
200 ADD_CUSTOM_TARGET(forwarding-headerEfl
201     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
202 )
203 SET(ForwardingHeaders_NAME forwarding-headerEfl)
204
205 ADD_CUSTOM_TARGET(forwarding-headerSoup
206     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
207 )
208 SET(ForwardingNetworkHeaders_NAME forwarding-headerSoup)
209
210 IF (ENABLE_GLIB_SUPPORT)
211     LIST(APPEND WebKit2StaticForDebug_INCLUDE_DIRECTORIES
212         ${Glib_INCLUDE_DIRS}
213         ${JAVASCRIPTCORE_DIR}/wtf/gobject
214     )
215     LIST(APPEND WebKit2_LIBRARIES
216         ${Glib_LIBRARIES}
217     )
218 ENDIF ()
219
220 IF (ENABLE_BATTERY_STATUS)
221     LIST(APPEND WebKit2StaticForDebug_INCLUDE_DIRECTORIES $(WEBCORE_DIR)/Modules/battery)
222 ENDIF ()
223
224 IF (ENABLE_TIZEN_SUPPORT)
225     INCLUDE_IF_EXISTS(${WEBKIT2_DIR}/PlatformTizen.cmake)
226 ENDIF ()
227
228 CONFIGURE_FILE(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
229 SET (EWebKit2_HEADERS
230     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/EWebKit2.h"
231     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_auth_challenge.h"
232     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_certificate.h"
233     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context.h"
234     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_cookie_manager.h"
235     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_download_job.h"
236     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_form_submission_request.h"
237     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent.h"
238     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent_service.h"
239     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_main.h"
240     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_policy_decision.h"
241     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_text_checker.h"
242     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_touch.h"
243     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_request.h"
244     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_response.h"
245     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_scheme_request.h"
246     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_view.h"
247     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_web_error.h"
248     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_web_resource.h"
249
250     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context_menu.h"
251     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_custom_handlers.h"
252     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_enums.h"
253     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_error.h"
254     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_form_data.h"
255     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_frame.h"
256     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_history.h"
257     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_hit_test.h"
258     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_geolocation.h"
259     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_notification.h"
260     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_policy_decision.h"
261     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu_item.h"
262     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_search_provider.h"
263     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_security_origin.h"
264     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_settings.h"
265     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_text_style.h"
266     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_user_media.h"
267 )
268
269 INSTALL(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc DESTINATION lib/pkgconfig)
270 INSTALL(FILES ${EWebKit2_HEADERS} DESTINATION include/${WebKit2_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR})
271
272 INCLUDE_DIRECTORIES(${THIRDPARTY_DIR}/gtest/include)
273
274 SET(EWK2UnitTests_LIBRARIES
275     ${WTF_LIBRARY_NAME}
276     ${JavaScriptCore_LIBRARY_NAME}
277     ${WebCore_LIBRARY_NAME}
278     ${WebKit2_LIBRARY_NAME}
279     ${CAIRO_LIBRARIES}
280     ${ECORE_LIBRARIES}
281     ${ECORE_EVAS_LIBRARIES}
282     ${EVAS_LIBRARIES}
283     ${LIBSOUP24_LIBRARIES}
284     gtest
285 )
286
287 IF (ENABLE_GLIB_SUPPORT)
288     LIST(APPEND EWK2UnitTests_LIBRARIES
289         ${Glib_LIBRARIES}
290         ${Gthread_LIBRARIES}
291     )
292 ENDIF()
293
294 SET(WEBKIT2_EFL_TEST_DIR "${WEBKIT2_DIR}/UIProcess/API/efl/tests")
295 SET(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
296
297 ADD_DEFINITIONS(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
298     -DTEST_THEME_DIR=\"${THEME_BINARY_DIR}\"
299     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
300     -DLIBEXECDIR=\"${CMAKE_INSTALL_PREFIX}/${EXEC_INSTALL_DIR}\"
301     -DWEBPROCESSNAME=\"${WebProcess_EXECUTABLE_NAME}\"
302     -DPLUGINPROCESSNAME=\"${PluginProcess_EXECUTABLE_NAME}\"
303 )
304
305 ADD_LIBRARY(ewk2UnitTestUtils
306     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestBase.cpp
307     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestEnvironment.cpp
308     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestMain.cpp
309     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestServer.cpp
310 )
311
312 TARGET_LINK_LIBRARIES(ewk2UnitTestUtils ${EWK2UnitTests_LIBRARIES})
313
314 # The "ewk" on the test name needs to be suffixed with "2", otherwise it
315 # will clash with tests from the WebKit 1 test suite.
316 SET(EWK2UnitTests_BINARIES
317     test_ewk2_context
318     test_ewk2_cookie_manager
319     test_ewk2_download_job
320     test_ewk2_settings
321     test_ewk2_view
322 )
323
324 IF (ENABLE_API_TESTS)
325     FOREACH (testName ${EWK2UnitTests_BINARIES})
326         ADD_EXECUTABLE(${testName} ${WEBKIT2_EFL_TEST_DIR}/${testName}.cpp)
327         ADD_TEST(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
328         SET_TESTS_PROPERTIES(${testName} PROPERTIES TIMEOUT 60)
329         TARGET_LINK_LIBRARIES(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
330     ENDFOREACH ()
331 ENDIF ()
332
333 IF (ENABLE_SPELLCHECK)
334     LIST(APPEND WebKit2StaticForDebug_INCLUDE_DIRECTORIES
335         ${ENCHANT_INCLUDE_DIRS}
336     )
337     LIST(APPEND WebKit2_LIBRARIES
338         ${ENCHANT_LIBRARIES}
339     )
340 ENDIF()
341
342 IF (ENABLE_INSPECTOR)
343     SET(WK2_WEB_INSPECTOR_DIR ${CMAKE_BINARY_DIR}/WebKit2/efl/webinspector)
344     SET(WK2_WEB_INSPECTOR_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/${WebKit2_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR})
345     ADD_DEFINITIONS(-DWK2_WEB_INSPECTOR_DIR="${WK2_WEB_INSPECTOR_DIR}")
346     ADD_DEFINITIONS(-DWK2_WEB_INSPECTOR_INSTALL_DIR="${WK2_WEB_INSPECTOR_INSTALL_DIR}/webinspector")
347     ADD_CUSTOM_TARGET(
348         wk2-web-inspector-resources ALL
349         COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBCORE_DIR}/inspector/front-end ${WK2_WEB_INSPECTOR_DIR}
350         COMMAND ${CMAKE_COMMAND} -E copy ${WEBCORE_DIR}/English.lproj/localizedStrings.js ${WK2_WEB_INSPECTOR_DIR}
351         COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendCommands.js ${WK2_WEB_INSPECTOR_DIR}/InspectorBackendCommands.js
352         DEPENDS ${WebCore_LIBRARY_NAME}
353     )
354     INSTALL(DIRECTORY ${WK2_WEB_INSPECTOR_DIR}
355         DESTINATION ${WK2_WEB_INSPECTOR_INSTALL_DIR}
356         FILES_MATCHING PATTERN "*.js"
357                        PATTERN "*.html"
358                        PATTERN "*.css"
359                        PATTERN "*.gif"
360                        PATTERN "*.png")
361 ENDIF ()
362