[EFL][WK2] Add Remote Web Inspector
[WebKit.git] / Source / WebKit2 / PlatformEfl.cmake
1 list(APPEND WebKit2_SOURCES
2     Platform/efl/LoggingEfl.cpp
3     Platform/efl/ModuleEfl.cpp
4     Platform/efl/WorkQueueEfl.cpp
5     Platform/unix/SharedMemoryUnix.cpp
6
7     Platform/CoreIPC/unix/ConnectionUnix.cpp
8     Platform/CoreIPC/unix/AttachmentUnix.cpp
9
10     PluginProcess/unix/PluginControllerProxyUnix.cpp
11     PluginProcess/unix/PluginProcessMainUnix.cpp
12     PluginProcess/unix/PluginProcessUnix.cpp
13
14     Shared/API/c/cairo/WKImageCairo.cpp
15
16     Shared/cairo/ShareableBitmapCairo.cpp
17
18     Shared/efl/LayerTreeContextEfl.cpp
19     Shared/efl/NativeWebKeyboardEventEfl.cpp
20     Shared/efl/NativeWebWheelEventEfl.cpp
21     Shared/efl/NativeWebMouseEventEfl.cpp
22     Shared/efl/NativeWebTouchEventEfl.cpp
23     Shared/efl/ProcessExecutablePathEfl.cpp
24     Shared/efl/WebEventFactory.cpp
25
26     Shared/linux/WebMemorySamplerLinux.cpp
27
28     Shared/soup/PlatformCertificateInfo.cpp
29     Shared/soup/WebCoreArgumentCodersSoup.cpp
30
31     UIProcess/DefaultUndoController.cpp
32
33     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
34
35     UIProcess/API/C/efl/WKView.cpp
36
37     UIProcess/API/cpp/efl/WKEinaSharedString.cpp
38
39     UIProcess/API/C/soup/WKContextSoup.cpp
40     UIProcess/API/C/soup/WKSoupRequestManager.cpp
41
42     UIProcess/API/efl/EwkViewImpl.cpp
43     UIProcess/API/efl/EvasGLContext.cpp
44     UIProcess/API/efl/EvasGLSurface.cpp
45     UIProcess/API/efl/SnapshotImageGL.cpp
46     UIProcess/API/efl/ewk_auth_request.cpp
47     UIProcess/API/efl/ewk_back_forward_list.cpp
48     UIProcess/API/efl/ewk_back_forward_list_item.cpp
49     UIProcess/API/efl/ewk_color_picker.cpp
50     UIProcess/API/efl/ewk_context.cpp
51     UIProcess/API/efl/ewk_context_menu.cpp
52     UIProcess/API/efl/ewk_context_menu_item.cpp
53     UIProcess/API/efl/ewk_cookie_manager.cpp
54     UIProcess/API/efl/ewk_database_manager.cpp
55     UIProcess/API/efl/ewk_download_job.cpp
56     UIProcess/API/efl/ewk_error.cpp
57     UIProcess/API/efl/ewk_favicon_database.cpp
58     UIProcess/API/efl/ewk_file_chooser_request.cpp
59     UIProcess/API/efl/ewk_form_submission_request.cpp
60     UIProcess/API/efl/ewk_intent.cpp
61     UIProcess/API/efl/ewk_intent_service.cpp
62     UIProcess/API/efl/ewk_main.cpp
63     UIProcess/API/efl/ewk_navigation_data.cpp
64     UIProcess/API/efl/ewk_navigation_policy_decision.cpp
65     UIProcess/API/efl/ewk_object.cpp
66     UIProcess/API/efl/ewk_popup_menu.cpp
67     UIProcess/API/efl/ewk_popup_menu_item.cpp
68     UIProcess/API/efl/ewk_resource.cpp
69     UIProcess/API/efl/ewk_security_origin.cpp
70     UIProcess/API/efl/ewk_settings.cpp
71     UIProcess/API/efl/ewk_storage_manager.cpp
72     UIProcess/API/efl/ewk_text_checker.cpp
73     UIProcess/API/efl/ewk_url_request.cpp
74     UIProcess/API/efl/ewk_url_response.cpp
75     UIProcess/API/efl/ewk_url_scheme_request.cpp
76     UIProcess/API/efl/ewk_view.cpp
77     UIProcess/API/efl/ewk_window_features.cpp
78
79     UIProcess/cairo/BackingStoreCairo.cpp
80
81     UIProcess/efl/BatteryProvider.cpp
82     UIProcess/efl/ContextHistoryClientEfl.cpp
83     UIProcess/efl/ContextMenuClientEfl.cpp
84     UIProcess/efl/DownloadManagerEfl.cpp
85     UIProcess/efl/FindClientEfl.cpp
86     UIProcess/efl/FormClientEfl.cpp
87     UIProcess/efl/InputMethodContextEfl.cpp
88     UIProcess/efl/NetworkInfoProvider.cpp
89     UIProcess/efl/PageClientBase.cpp
90     UIProcess/efl/PageClientLegacyImpl.cpp
91     UIProcess/efl/PageClientDefaultImpl.cpp
92     UIProcess/efl/PageLoadClientEfl.cpp
93     UIProcess/efl/PagePolicyClientEfl.cpp
94     UIProcess/efl/PageUIClientEfl.cpp
95     UIProcess/efl/PageViewportControllerClientEfl.cpp
96     UIProcess/efl/RequestManagerClientEfl.cpp
97     UIProcess/efl/ResourceLoadClientEfl.cpp
98     UIProcess/efl/TextCheckerEfl.cpp
99     UIProcess/efl/VibrationClientEfl.cpp
100     UIProcess/efl/WebContextEfl.cpp
101     UIProcess/efl/WebContextMenuProxyEfl.cpp
102     UIProcess/efl/WebFullScreenManagerProxyEfl.cpp
103     UIProcess/efl/WebInspectorProxyEfl.cpp
104     UIProcess/efl/WebPageProxyEfl.cpp
105     UIProcess/efl/WebPopupMenuProxyEfl.cpp
106     UIProcess/efl/WebPreferencesEfl.cpp
107     UIProcess/efl/WebProcessProxyEfl.cpp
108
109     UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp
110     UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp
111
112     UIProcess/soup/WebCookieManagerProxySoup.cpp
113     UIProcess/soup/WebSoupRequestManagerClient.cpp
114     UIProcess/soup/WebSoupRequestManagerProxy.cpp
115
116     UIProcess/Launcher/efl/ProcessLauncherEfl.cpp
117
118     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
119     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
120
121     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
122     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
123
124     WebProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp
125     WebProcess/Downloads/soup/DownloadSoup.cpp
126
127     WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp
128
129     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
130
131     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
132
133     WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp
134     WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp
135     WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp
136     WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp
137
138     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
139
140     WebProcess/WebPage/efl/WebInspectorEfl.cpp
141     WebProcess/WebPage/efl/WebPageEfl.cpp
142
143     WebProcess/efl/WebProcessMainEfl.cpp
144
145     WebProcess/soup/WebProcessSoup.cpp
146     WebProcess/soup/WebSoupRequestManager.cpp
147     WebProcess/soup/WebKitSoupRequestGeneric.cpp
148     WebProcess/soup/WebKitSoupRequestInputStream.cpp
149 )
150
151 list(APPEND WebKit2_MESSAGES_IN_FILES
152     UIProcess/soup/WebSoupRequestManagerProxy.messages.in
153     WebProcess/soup/WebSoupRequestManager.messages.in
154 )
155
156 list(APPEND WebKit2_INCLUDE_DIRECTORIES
157     "${JAVASCRIPTCORE_DIR}/llint"
158     "${WEBCORE_DIR}/platform/efl"
159     "${WEBCORE_DIR}/platform/graphics/cairo"
160     "${WEBCORE_DIR}/platform/network/soup"
161     "${WEBCORE_DIR}/platform/text/enchant"
162     "${WEBCORE_DIR}/svg/graphics"
163     "${WEBKIT2_DIR}/Shared/efl"
164     "${WEBKIT2_DIR}/Shared/soup"
165     "${WEBKIT2_DIR}/UIProcess/API/C/efl"
166     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
167     "${WEBKIT2_DIR}/UIProcess/API/cpp/efl"
168     "${WEBKIT2_DIR}/UIProcess/API/efl"
169     "${WEBKIT2_DIR}/UIProcess/efl"
170     "${WEBKIT2_DIR}/UIProcess/soup"
171     "${WEBKIT2_DIR}/WebProcess/Downloads/soup"
172     "${WEBKIT2_DIR}/WebProcess/efl"
173     "${WEBKIT2_DIR}/WebProcess/soup"
174     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/efl"
175     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
176     "${WTF_DIR}/wtf/efl/"
177     "${WTF_DIR}/wtf/gobject"
178     ${CAIRO_INCLUDE_DIRS}
179     ${ECORE_INCLUDE_DIRS}
180     ${ECORE_EVAS_INCLUDE_DIRS}
181     ${EDJE_INCLUDE_DIRS}
182     ${EFREET_INCLUDE_DIRS}
183     ${EINA_INCLUDE_DIRS}
184     ${EVAS_INCLUDE_DIRS}
185     ${HARFBUZZ_INCLUDE_DIRS}
186     ${LIBSOUP_INCLUDE_DIRS}
187     ${LIBXML2_INCLUDE_DIR}
188     ${LIBXSLT_INCLUDE_DIRS}
189     ${SQLITE_INCLUDE_DIRS}
190     ${GLIB_INCLUDE_DIRS}
191     ${LIBSOUP_INCLUDE_DIRS}
192     ${WTF_DIR}
193 )
194
195 if (WTF_USE_3D_GRAPHICS)
196     list(APPEND WebKit2_INCLUDE_DIRECTORIES
197         "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
198     )
199 endif ()
200
201 list(APPEND WebKit2_LIBRARIES
202     ${CAIRO_LIBRARIES}
203     ${ECORE_LIBRARIES}
204     ${ECORE_EVAS_LIBRARIES}
205     ${EDJE_LIBRARIES}
206     ${EFREET_LIBRARIES}
207     ${EINA_LIBRARIES}
208     ${EVAS_LIBRARIES}
209     ${Freetype_LIBRARIES}
210     ${HARFBUZZ_LIBRARIES}
211     ${LIBXML2_LIBRARIES}
212     ${OPENGL_LIBRARIES}
213     ${SQLITE_LIBRARIES}
214     ${FONTCONFIG_LIBRARIES}
215     ${PNG_LIBRARIES}
216     ${JPEG_LIBRARIES}
217     ${CMAKE_DL_LIBS}
218     ${GLIB_LIBRARIES}
219     ${GLIB_GIO_LIBRARIES}
220     ${GLIB_GOBJECT_LIBRARIES}
221     ${LIBSOUP_LIBRARIES}
222 )
223
224 list(APPEND WebProcess_SOURCES
225     efl/MainEfl.cpp
226 )
227
228 list(APPEND WebProcess_LIBRARIES
229     ${CAIRO_LIBRARIES}
230     ${ECORE_IMF_LIBRARIES}
231     ${EDJE_LIBRARIES}
232     ${EFLDEPS_LIBRARIES}
233     ${EVAS_LIBRARIES}
234     ${LIBXML2_LIBRARIES}
235     ${LIBXSLT_LIBRARIES}
236     ${OPENGL_LIBRARIES}
237     ${SQLITE_LIBRARIES}
238 )
239
240 if (ENABLE_ECORE_X)
241     list(APPEND WebProcess_LIBRARIES
242         ${ECORE_X_LIBRARIES}
243         ${X11_Xext_LIB})
244 endif ()
245
246 add_custom_target(forwarding-headerEfl
247     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
248 )
249 set(ForwardingHeaders_NAME forwarding-headerEfl)
250
251 add_custom_target(forwarding-headerSoup
252     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
253 )
254 set(ForwardingNetworkHeaders_NAME forwarding-headerSoup)
255
256 configure_file(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
257 set(EWebKit2_HEADERS
258     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/EWebKit2.h"
259     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_auth_request.h"
260     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list.h"
261     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list_item.h"
262     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_color_picker.h"
263     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context.h"
264     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_cookie_manager.h"
265     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_database_manager.h"
266     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_defines.h"
267     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_download_job.h"
268     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_error.h"
269     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_favicon_database.h"
270     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_file_chooser_request.h"
271     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_form_submission_request.h"
272     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent.h"
273     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent_service.h"
274     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_main.h"
275     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_data.h"
276     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_policy_decision.h"
277     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_object.h"
278     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu.h"
279     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu_item.h"
280     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_resource.h"
281     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_security_origin.h"
282     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_settings.h"
283     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_storage_manager.h"
284     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_text_checker.h"
285     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_touch.h"
286     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_request.h"
287     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_response.h"
288     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_scheme_request.h"
289     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_view.h"
290     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_window_features.h"
291 )
292
293 install(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc DESTINATION lib/pkgconfig)
294 install(FILES ${EWebKit2_HEADERS} DESTINATION include/${WebKit2_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR})
295
296 if (ENABLE_PLUGIN_PROCESS)
297     add_definitions(-DENABLE_PLUGIN_PROCESS=1)
298
299     set(PluginProcess_EXECUTABLE_NAME PluginProcess)
300     list(APPEND PluginProcess_INCLUDE_DIRECTORIES
301         "${WEBKIT2_DIR}/PluginProcess/unix"
302     )
303
304     include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
305
306     list(APPEND PluginProcess_SOURCES
307         ${WEBKIT2_DIR}/unix/PluginMainUnix.cpp
308     )
309
310     set(PluginProcess_LIBRARIES
311         ${WebKit2_LIBRARY_NAME}
312     )
313
314     add_executable(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_SOURCES})
315     target_link_libraries(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_LIBRARIES})
316     install(TARGETS ${PluginProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
317 endif () # ENABLE_PLUGIN_PROCESS
318
319 include_directories(${THIRDPARTY_DIR}/gtest/include)
320
321 set(EWK2UnitTests_LIBRARIES
322     ${WTF_LIBRARY_NAME}
323     ${JavaScriptCore_LIBRARY_NAME}
324     ${WebCore_LIBRARY_NAME}
325     ${WebKit2_LIBRARY_NAME}
326     ${CAIRO_LIBRARIES}
327     ${ECORE_LIBRARIES}
328     ${ECORE_EVAS_LIBRARIES}
329     ${EVAS_LIBRARIES}
330     ${GLIB_LIBRARIES}
331     ${GLIB_GIO_LIBRARIES}
332     ${GLIB_GOBJECT_LIBRARIES}
333     ${GLIB_GTHREAD_LIBRARIES}
334     ${LIBSOUP_LIBRARIES}
335     gtest
336 )
337
338 set(WEBKIT2_EFL_TEST_DIR "${WEBKIT2_DIR}/UIProcess/API/efl/tests")
339 set(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
340 set(TEST_INJECTED_BUNDLE_DIR ${WEBKIT2_EFL_TEST_DIR}/InjectedBundle)
341
342 add_definitions(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
343     -DTEST_LIB_DIR=\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\"
344     -DTEST_THEME_DIR=\"${THEME_BINARY_DIR}\"
345     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
346     -DLIBEXECDIR=\"${CMAKE_INSTALL_PREFIX}/${EXEC_INSTALL_DIR}\"
347     -DWEBPROCESSNAME=\"${WebProcess_EXECUTABLE_NAME}\"
348     -DPLUGINPROCESSNAME=\"${PluginProcess_EXECUTABLE_NAME}\"
349 )
350
351 add_library(ewk2UnitTestUtils
352     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestBase.cpp
353     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestEnvironment.cpp
354     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestMain.cpp
355     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestServer.cpp
356 )
357
358 target_link_libraries(ewk2UnitTestUtils ${EWK2UnitTests_LIBRARIES})
359
360 # The "ewk" on the test name needs to be suffixed with "2", otherwise it
361 # will clash with tests from the WebKit 1 test suite.
362 set(EWK2UnitTests_BINARIES
363     test_ewk2_auth_request
364     test_ewk2_back_forward_list
365     test_ewk2_color_picker
366     test_ewk2_context
367     test_ewk2_context_history_callbacks
368     test_ewk2_context_menu
369     test_ewk2_cookie_manager
370     test_ewk2_database_manager
371     test_ewk2_download_job
372     test_ewk2_eina_shared_string
373     test_ewk2_favicon_database
374     test_ewk2_file_chooser_request
375     test_ewk2_intents
376     test_ewk2_object
377     test_ewk2_popup_menu
378     test_ewk2_refptr_evas_object
379     test_ewk2_settings
380     test_ewk2_storage_manager
381     test_ewk2_text_checker
382     test_ewk2_view
383     test_ewk2_window_features
384 )
385
386 if (ENABLE_API_TESTS)
387     foreach (testName ${EWK2UnitTests_BINARIES})
388         add_executable(${testName} ${WEBKIT2_EFL_TEST_DIR}/${testName}.cpp)
389         add_test(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
390         set_tests_properties(${testName} PROPERTIES TIMEOUT 60)
391         target_link_libraries(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
392     endforeach ()
393
394     add_library(ewk2UnitTestInjectedBundleSample SHARED ${TEST_INJECTED_BUNDLE_DIR}/injected_bundle_sample.cpp)
395     target_link_libraries(ewk2UnitTestInjectedBundleSample ${WebKit2_LIBRARY_NAME})
396 endif ()
397
398 if (ENABLE_SPELLCHECK)
399     list(APPEND WebKit2_INCLUDE_DIRECTORIES
400         ${ENCHANT_INCLUDE_DIRS}
401     )
402     list(APPEND WebKit2_LIBRARIES
403         ${ENCHANT_LIBRARIES}
404     )
405 endif ()