[EFL] Expose JavaScript binding interface through ewk_extension
[WebKit-https.git] / Source / WebKit2 / PlatformEfl.cmake
1 list(APPEND WebKit2_SOURCES
2     NetworkProcess/efl/NetworkProcessMainEfl.cpp
3
4     NetworkProcess/soup/NetworkProcessSoup.cpp
5     NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp
6     NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
7
8     Platform/IPC/unix/AttachmentUnix.cpp
9     Platform/IPC/unix/ConnectionUnix.cpp
10
11     Platform/efl/LoggingEfl.cpp
12     Platform/efl/ModuleEfl.cpp
13
14     Platform/unix/SharedMemoryUnix.cpp
15
16     PluginProcess/unix/PluginControllerProxyUnix.cpp
17     PluginProcess/unix/PluginProcessMainUnix.cpp
18     PluginProcess/unix/PluginProcessUnix.cpp
19
20     Shared/API/c/cairo/WKImageCairo.cpp
21
22     Shared/API/c/efl/WKArrayEfl.cpp
23
24     Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
25     Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp
26     Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
27     Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp
28
29     Shared/Downloads/efl/DownloadSoupErrorsEfl.cpp
30
31     Shared/Downloads/soup/DownloadSoup.cpp
32
33     Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp
34     Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp
35
36     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
37
38     Shared/cairo/ShareableBitmapCairo.cpp
39
40     Shared/efl/NativeWebKeyboardEventEfl.cpp
41     Shared/efl/NativeWebTouchEventEfl.cpp
42     Shared/efl/NativeWebWheelEventEfl.cpp
43     Shared/efl/ProcessExecutablePathEfl.cpp
44     Shared/efl/WebEventFactory.cpp
45
46     Shared/linux/WebMemorySamplerLinux.cpp
47
48     Shared/linux/SeccompFilters/OpenSyscall.cpp
49     Shared/linux/SeccompFilters/SeccompBroker.cpp
50     Shared/linux/SeccompFilters/SeccompFilters.cpp
51     Shared/linux/SeccompFilters/SigactionSyscall.cpp
52     Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp
53     Shared/linux/SeccompFilters/Syscall.cpp
54     Shared/linux/SeccompFilters/SyscallPolicy.cpp
55
56     Shared/soup/WebCoreArgumentCodersSoup.cpp
57
58     Shared/unix/ChildProcessMain.cpp
59
60     UIProcess/DefaultUndoController.cpp
61
62     UIProcess/API/C/CoordinatedGraphics/WKView.cpp
63
64     UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp
65
66     UIProcess/API/C/efl/WKColorPickerResultListener.cpp
67     UIProcess/API/C/efl/WKEventEfl.cpp
68     UIProcess/API/C/efl/WKPageEfl.cpp
69     UIProcess/API/C/efl/WKPopupItem.cpp
70     UIProcess/API/C/efl/WKPopupMenuListener.cpp
71     UIProcess/API/C/efl/WKViewEfl.cpp
72
73     UIProcess/API/C/soup/WKCookieManagerSoup.cpp
74     UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp
75
76     UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp
77
78     UIProcess/API/cpp/efl/WKEinaSharedString.cpp
79
80     UIProcess/API/efl/EwkView.cpp
81     UIProcess/API/efl/GestureRecognizer.cpp
82     UIProcess/API/efl/SnapshotImageGL.cpp
83     UIProcess/API/efl/WebAccessibility.cpp
84     UIProcess/API/efl/ewk_application_cache_manager.cpp
85     UIProcess/API/efl/ewk_auth_request.cpp
86     UIProcess/API/efl/ewk_back_forward_list.cpp
87     UIProcess/API/efl/ewk_back_forward_list_item.cpp
88     UIProcess/API/efl/ewk_color_picker.cpp
89     UIProcess/API/efl/ewk_context.cpp
90     UIProcess/API/efl/ewk_context_menu.cpp
91     UIProcess/API/efl/ewk_context_menu_item.cpp
92     UIProcess/API/efl/ewk_cookie_manager.cpp
93     UIProcess/API/efl/ewk_database_manager.cpp
94     UIProcess/API/efl/ewk_download_job.cpp
95     UIProcess/API/efl/ewk_error.cpp
96     UIProcess/API/efl/ewk_favicon_database.cpp
97     UIProcess/API/efl/ewk_file_chooser_request.cpp
98     UIProcess/API/efl/ewk_form_submission_request.cpp
99     UIProcess/API/efl/ewk_main.cpp
100     UIProcess/API/efl/ewk_navigation_data.cpp
101     UIProcess/API/efl/ewk_navigation_policy_decision.cpp
102     UIProcess/API/efl/ewk_object.cpp
103     UIProcess/API/efl/ewk_page_group.cpp
104     UIProcess/API/efl/ewk_popup_menu.cpp
105     UIProcess/API/efl/ewk_popup_menu_item.cpp
106     UIProcess/API/efl/ewk_security_origin.cpp
107     UIProcess/API/efl/ewk_settings.cpp
108     UIProcess/API/efl/ewk_storage_manager.cpp
109     UIProcess/API/efl/ewk_text_checker.cpp
110     UIProcess/API/efl/ewk_url_request.cpp
111     UIProcess/API/efl/ewk_url_response.cpp
112     UIProcess/API/efl/ewk_url_scheme_request.cpp
113     UIProcess/API/efl/ewk_view.cpp
114     UIProcess/API/efl/ewk_window_features.cpp
115
116     UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp
117     UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp
118     UIProcess/CoordinatedGraphics/PageViewportController.cpp
119     UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp
120     UIProcess/CoordinatedGraphics/WebView.cpp
121     UIProcess/CoordinatedGraphics/WebViewClient.cpp
122
123     UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp
124
125     UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp
126
127     UIProcess/Launcher/efl/ProcessLauncherEfl.cpp
128
129     UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp
130     UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp
131     UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp
132
133     UIProcess/Network/soup/NetworkProcessProxySoup.cpp
134
135     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
136     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
137
138     UIProcess/Storage/StorageManager.cpp
139
140     UIProcess/cairo/BackingStoreCairo.cpp
141
142     UIProcess/efl/BatteryProvider.cpp
143     UIProcess/efl/ContextHistoryClientEfl.cpp
144     UIProcess/efl/ContextMenuClientEfl.cpp
145     UIProcess/efl/DownloadManagerEfl.cpp
146     UIProcess/efl/EasingCurves.cpp
147     UIProcess/efl/EwkTouchEvent.cpp
148     UIProcess/efl/EwkTouchPoint.cpp
149     UIProcess/efl/FindClientEfl.cpp
150     UIProcess/efl/FormClientEfl.cpp
151     UIProcess/efl/InputMethodContextEfl.cpp
152     UIProcess/efl/PageLoadClientEfl.cpp
153     UIProcess/efl/PagePolicyClientEfl.cpp
154     UIProcess/efl/PageUIClientEfl.cpp
155     UIProcess/efl/PageViewportControllerClientEfl.cpp
156     UIProcess/efl/RequestManagerClientEfl.cpp
157     UIProcess/efl/TextCheckerClientEfl.cpp
158     UIProcess/efl/TextCheckerEfl.cpp
159     UIProcess/efl/VibrationClientEfl.cpp
160     UIProcess/efl/ViewClientEfl.cpp
161     UIProcess/efl/WebColorPickerClient.cpp
162     UIProcess/efl/WebColorPickerEfl.cpp
163     UIProcess/efl/WebColorPickerResultListenerProxy.cpp
164     UIProcess/efl/WebContextMenuProxyEfl.cpp
165     UIProcess/efl/WebInspectorProxyEfl.cpp
166     UIProcess/efl/WebPageProxyEfl.cpp
167     UIProcess/efl/WebPopupItemEfl.cpp
168     UIProcess/efl/WebPopupMenuListenerEfl.cpp
169     UIProcess/efl/WebPreferencesEfl.cpp
170     UIProcess/efl/WebProcessPoolEfl.cpp
171     UIProcess/efl/WebProcessProxyEfl.cpp
172     UIProcess/efl/WebUIPopupMenuClient.cpp
173     UIProcess/efl/WebViewEfl.cpp
174
175     UIProcess/soup/WebCookieManagerProxySoup.cpp
176     UIProcess/soup/WebProcessPoolSoup.cpp
177
178     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
179     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
180
181     WebProcess/InjectedBundle/API/efl/ewk_extension.cpp
182     WebProcess/InjectedBundle/API/efl/ewk_page.cpp
183
184     WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp
185
186     WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
187
188     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
189
190     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
191
192     WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp
193     WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp
194     WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp
195     WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp
196
197     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
198
199     WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp
200     WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
201     WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp
202
203     WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
204
205     WebProcess/WebPage/efl/WebInspectorUIEfl.cpp
206     WebProcess/WebPage/efl/WebPageEfl.cpp
207
208     WebProcess/efl/ExtensionManagerEfl.cpp
209     WebProcess/efl/SeccompFiltersWebProcessEfl.cpp
210     WebProcess/efl/WebProcessMainEfl.cpp
211
212     WebProcess/soup/WebKitSoupRequestGeneric.cpp
213     WebProcess/soup/WebKitSoupRequestInputStream.cpp
214     WebProcess/soup/WebProcessSoup.cpp
215 )
216
217 list(APPEND WebKit2_MESSAGES_IN_FILES
218     UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in
219
220     WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in
221 )
222
223 list(APPEND WebKit2_INCLUDE_DIRECTORIES
224     "${WEBCORE_DIR}/platform/efl"
225     "${WEBCORE_DIR}/platform/graphics/cairo"
226     "${WEBCORE_DIR}/platform/graphics/efl"
227     "${WEBCORE_DIR}/platform/graphics/opentype"
228     "${WEBCORE_DIR}/platform/network/soup"
229     "${WEBCORE_DIR}/platform/text/enchant"
230     "${WEBKIT2_DIR}/NetworkProcess/efl"
231     "${WEBKIT2_DIR}/NetworkProcess/unix"
232     "${WEBKIT2_DIR}/Platform/efl"
233     "${WEBKIT2_DIR}/Shared/API/c/efl"
234     "${WEBKIT2_DIR}/Shared/CoordinatedGraphics"
235     "${WEBKIT2_DIR}/Shared/Downloads/soup"
236     "${WEBKIT2_DIR}/Shared/Network/CustomProtocols/soup"
237     "${WEBKIT2_DIR}/Shared/efl"
238     "${WEBKIT2_DIR}/Shared/soup"
239     "${WEBKIT2_DIR}/Shared/unix"
240     "${WEBKIT2_DIR}/UIProcess/API/C/cairo"
241     "${WEBKIT2_DIR}/UIProcess/API/C/CoordinatedGraphics"
242     "${WEBKIT2_DIR}/UIProcess/API/C/efl"
243     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
244     "${WEBKIT2_DIR}/UIProcess/API/cpp/efl"
245     "${WEBKIT2_DIR}/UIProcess/API/efl"
246     "${WEBKIT2_DIR}/UIProcess/CoordinatedGraphics"
247     "${WEBKIT2_DIR}/UIProcess/Network/CustomProtocols/soup"
248     "${WEBKIT2_DIR}/UIProcess/efl"
249     "${WEBKIT2_DIR}/UIProcess/soup"
250     "${WEBKIT2_DIR}/WebProcess/efl"
251     "${WEBKIT2_DIR}/WebProcess/soup"
252     "${WEBKIT2_DIR}/WebProcess/unix"
253     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/efl"
254     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/efl"
255     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
256     "${WEBKIT2_DIR}/WebProcess/WebPage/CoordinatedGraphics"
257     "${WTF_DIR}/wtf/efl/"
258     "${WTF_DIR}/wtf/gobject"
259     ${CAIRO_INCLUDE_DIRS}
260     ${ECORE_EVAS_INCLUDE_DIRS}
261     ${ECORE_IMF_EVAS_INCLUDE_DIRS}
262     ${ECORE_IMF_INCLUDE_DIRS}
263     ${ECORE_INCLUDE_DIRS}
264     ${ECORE_X_INCLUDE_DIRS}
265     ${EDJE_INCLUDE_DIRS}
266     ${EFREET_INCLUDE_DIRS}
267     ${EINA_INCLUDE_DIRS}
268     ${EO_INCLUDE_DIRS}
269     ${EVAS_INCLUDE_DIRS}
270     ${GLIB_INCLUDE_DIRS}
271     ${HARFBUZZ_INCLUDE_DIRS}
272     ${LIBSOUP_INCLUDE_DIRS}
273     ${LIBXML2_INCLUDE_DIR}
274     ${LIBXSLT_INCLUDE_DIRS}
275     ${SQLITE_INCLUDE_DIRS}
276 )
277
278 list(APPEND WebKit2_LIBRARIES
279     WTF
280     ${CAIRO_LIBRARIES}
281     ${CMAKE_DL_LIBS}
282     ${ECORE_EVAS_LIBRARIES}
283     ${ECORE_IMF_EVAS_LIBRARIES}
284     ${ECORE_LIBRARIES}
285     ${EDJE_LIBRARIES}
286     ${EFREET_LIBRARIES}
287     ${EINA_LIBRARIES}
288     ${EO_LIBRARIES}
289     ${EVAS_LIBRARIES}
290     ${FONTCONFIG_LIBRARIES}
291     ${FREETYPE2_LIBRARIES}
292     ${GLIB_GIO_LIBRARIES}
293     ${GLIB_GOBJECT_LIBRARIES}
294     ${GLIB_LIBRARIES}
295     ${HARFBUZZ_LIBRARIES}
296     ${JPEG_LIBRARIES}
297     ${LIBSOUP_LIBRARIES}
298     ${LIBXML2_LIBRARIES}
299     ${OPENGL_LIBRARIES}
300     ${PNG_LIBRARIES}
301     ${SQLITE_LIBRARIES}
302 )
303
304 list(APPEND WebProcess_SOURCES
305     WebProcess/EntryPoint/unix/WebProcessMain.cpp
306 )
307
308 list(APPEND NetworkProcess_SOURCES
309     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
310 )
311
312 list(APPEND WebProcess_LIBRARIES
313     ${CAIRO_LIBRARIES}
314     ${ECORE_IMF_EVAS_LIBRARIES}
315     ${ECORE_IMF_LIBRARIES}
316     ${EDJE_LIBRARIES}
317     ${EFLDEPS_LIBRARIES}
318     ${EVAS_LIBRARIES}
319     ${LIBXML2_LIBRARIES}
320     ${LIBXSLT_LIBRARIES}
321     ${OPENGL_LIBRARIES}
322     ${SQLITE_LIBRARIES}
323 )
324
325 if (ENABLE_SECCOMP_FILTERS)
326     list(APPEND WebKit2_LIBRARIES
327         ${LIBSECCOMP_LIBRARIES}
328     )
329     list(APPEND WebKit2_INCLUDE_DIRECTORIES
330         ${LIBSECCOMP_INCLUDE_DIRS}
331     )
332
333     # If building with jhbuild, add the root build directory to the
334     # filesystem access policy.
335     if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/WebKitBuild/DependenciesEFL)
336         add_definitions(-DSOURCE_DIR=\"${CMAKE_SOURCE_DIR}\")
337     endif ()
338 endif ()
339
340 if (ENABLE_ECORE_X)
341     list(APPEND WebProcess_LIBRARIES
342         ${ECORE_X_LIBRARIES}
343         ${X11_Xext_LIB}
344     )
345     list(APPEND WebKit2_LIBRARIES
346         ${ECORE_X_LIBRARIES}
347     )
348 endif ()
349
350 add_custom_target(forwarding-headerEfl
351     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
352     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include CoordinatedGraphics
353 )
354
355 add_custom_target(forwarding-headerSoup
356     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
357 )
358
359 set(WEBKIT2_EXTRA_DEPENDENCIES
360      forwarding-headerEfl
361      forwarding-headerSoup
362 )
363
364 configure_file(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
365 configure_file(efl/ewebkit2-extension.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2-extension.pc @ONLY)
366 configure_file(efl/EWebKit2Config.cmake.in ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2Config.cmake @ONLY)
367 configure_file(efl/EWebKit2ConfigVersion.cmake.in ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2ConfigVersion.cmake @ONLY)
368 configure_file(UIProcess/API/efl/EWebKit2.h.in ${DERIVED_SOURCES_WEBKIT2_DIR}/include/EWebKit2.h)
369
370 set(EWebKit2_HEADERS
371     "${DERIVED_SOURCES_WEBKIT2_DIR}/include/EWebKit2.h"
372     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_auth_request.h"
373     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list.h"
374     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list_item.h"
375     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_application_cache_manager.h"
376     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_color_picker.h"
377     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context.h"
378     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context_menu.h"
379     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context_menu_item.h"
380     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_cookie_manager.h"
381     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_database_manager.h"
382     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_download_job.h"
383     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_error.h"
384     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_favicon_database.h"
385     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_file_chooser_request.h"
386     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_form_submission_request.h"
387     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intro.h"
388     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_main.h"
389     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_data.h"
390     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_policy_decision.h"
391     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_object.h"
392     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_page_group.h"
393     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu.h"
394     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu_item.h"
395     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_security_origin.h"
396     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_settings.h"
397     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_storage_manager.h"
398     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_text_checker.h"
399     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_touch.h"
400     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_request.h"
401     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_response.h"
402     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_scheme_request.h"
403     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_view.h"
404     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_window_features.h"
405 )
406
407 set(EWebKit2_Extension_HEADERS
408     "${CMAKE_CURRENT_SOURCE_DIR}/WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h"
409     "${CMAKE_CURRENT_SOURCE_DIR}/WebProcess/InjectedBundle/API/efl/ewk_extension.h"
410     "${CMAKE_CURRENT_SOURCE_DIR}/WebProcess/InjectedBundle/API/efl/ewk_page.h"
411 )
412
413 install(FILES ${EWebKit2_HEADERS} DESTINATION ${HEADER_INSTALL_DIR})
414 install(FILES ${EWebKit2_Extension_HEADERS} DESTINATION ${HEADER_INSTALL_DIR}/extension)
415
416 install(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc DESTINATION lib/pkgconfig)
417 install(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2-extension.pc DESTINATION lib/pkgconfig)
418 install(FILES
419         ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2Config.cmake
420         ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2ConfigVersion.cmake
421         DESTINATION lib/cmake/EWebKit2)
422
423 set(EWEBKIT_EXTENSION_MANAGER_INSTALL_DIR "${LIB_INSTALL_DIR}/${WebKit2_OUTPUT_NAME}-${PROJECT_VERSION_MAJOR}/" CACHE PATH "Absolute path to install injected bundle which controls the extension library")
424
425 add_library(ewebkit_extension_manager SHARED "${WEBKIT2_DIR}/WebProcess/efl/WebInjectedBundleMainEfl.cpp")
426 target_link_libraries(ewebkit_extension_manager WebKit2)
427
428 install(TARGETS ewebkit_extension_manager DESTINATION "${EWEBKIT_EXTENSION_MANAGER_INSTALL_DIR}")
429
430 if (ENABLE_PLUGIN_PROCESS)
431     list(APPEND PluginProcess_INCLUDE_DIRECTORIES
432         "${WEBKIT2_DIR}/PluginProcess/unix"
433     )
434
435     include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
436
437     list(APPEND PluginProcess_SOURCES
438         ${WEBKIT2_DIR}/PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
439     )
440
441     if (ENABLE_ECORE_X)
442         list(APPEND PluginProcess_LIBRARIES
443             ${ECORE_X_LIBRARIES}
444         )
445     endif ()
446 endif () # ENABLE_PLUGIN_PROCESS
447
448 include_directories(${THIRDPARTY_DIR}/gtest/include)
449
450 set(EWK2UnitTests_LIBRARIES
451     ${CAIRO_LIBRARIES}
452     ${ECORE_EVAS_LIBRARIES}
453     ${ECORE_LIBRARIES}
454     ${EVAS_LIBRARIES}
455     ${GLIB_GIO_LIBRARIES}
456     ${GLIB_GOBJECT_LIBRARIES}
457     ${GLIB_GTHREAD_LIBRARIES}
458     ${GLIB_LIBRARIES}
459     ${LIBSOUP_LIBRARIES}
460     JavaScriptCore
461     WTF
462     WebCore
463     WebKit2
464     gtest
465 )
466
467 if (ENABLE_ECORE_X)
468     list(APPEND EWK2UnitTests_LIBRARIES
469         ${ECORE_X_LIBRARIES}
470     )
471 endif ()
472
473 set(WEBKIT2_EFL_TEST_DIR "${WEBKIT2_DIR}/UIProcess/API/efl/tests")
474 set(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
475 set(TEST_EXTENSIONS_DIR ${WEBKIT2_EFL_TEST_DIR}/extensions)
476 set(WEBKIT2_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI/EWebKit2)
477
478 add_definitions(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
479     -DTEST_LIB_DIR=\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\"
480     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
481     -DLIBEXECDIR=\"${EXEC_INSTALL_DIR}\"
482     -DEXTENSIONMANAGERDIR=\"${CMAKE_INSTALL_PREFIX}/${EWEBKIT_EXTENSION_MANAGER_INSTALL_DIR}\"
483     -DWEBPROCESSNAME=\"WebProcess\"
484     -DPLUGINPROCESSNAME=\"PluginProcess\"
485     -DNETWORKPROCESSNAME=\"NetworkProcess\"
486     -DEXTENSIONMANAGERNAME=\"libewebkit_extension_manager.so\"
487     -DGTEST_HAS_RTTI=0
488 )
489
490 add_library(ewk2UnitTestUtils
491     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestBase.cpp
492     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestEnvironment.cpp
493     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestMain.cpp
494     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestServer.cpp
495 )
496
497 target_link_libraries(ewk2UnitTestUtils ${EWK2UnitTests_LIBRARIES})
498
499 # The "ewk" on the test name needs to be suffixed with "2", otherwise it
500 # will clash with tests from the WebKit 1 test suite.
501 set(EWK2UnitTests_BINARIES
502     test_ewk2_accessibility
503     test_ewk2_application_cache_manager
504     test_ewk2_auth_request
505     test_ewk2_back_forward_list
506     test_ewk2_color_picker
507     test_ewk2_context
508     test_ewk2_context_history_callbacks
509     test_ewk2_cookie_manager
510     test_ewk2_database_manager
511     test_ewk2_download_job
512     test_ewk2_eina_shared_string
513     test_ewk2_favicon_database
514     test_ewk2_file_chooser_request
515     test_ewk2_javascript_binding
516     test_ewk2_object
517     test_ewk2_page_group
518     test_ewk2_popup_menu
519     test_ewk2_settings
520     test_ewk2_ssl
521     test_ewk2_storage_manager
522     test_ewk2_text_checker
523     test_ewk2_view
524     test_ewk2_window_features
525 )
526
527 # Skipped unit tests list:
528 #
529 # webkit.org/b/107422: test_ewk2_auth_request
530 # webkit.org/b/132980: test_ewk2_context_menu
531
532 if (ENABLE_API_TESTS)
533     foreach (testName ${EWK2UnitTests_BINARIES})
534         add_executable(${testName} ${WEBKIT2_EFL_TEST_DIR}/${testName}.cpp)
535         add_test(${testName} ${WEBKIT2_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY}/${testName})
536         set_tests_properties(${testName} PROPERTIES TIMEOUT 60)
537         set_target_properties(${testName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${WEBKIT2_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY})
538         target_link_libraries(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
539     endforeach ()
540
541     add_library(ewk2UnitTestExtensionSample SHARED ${TEST_EXTENSIONS_DIR}/extension_sample.cpp)
542     target_link_libraries(ewk2UnitTestExtensionSample ${EINA_LIBRARIES} WebKit2)
543 endif ()
544
545 if (ENABLE_SPELLCHECK)
546     list(APPEND WebKit2_INCLUDE_DIRECTORIES
547         ${ENCHANT_INCLUDE_DIRS}
548     )
549     list(APPEND WebKit2_LIBRARIES
550         ${ENCHANT_LIBRARIES}
551     )
552 endif ()
553
554 if (ENABLE_ACCESSIBILITY)
555     list(APPEND WebKit2_INCLUDE_DIRECTORIES
556         "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
557         ${ATK_INCLUDE_DIRS}
558     )
559     list(APPEND WebKit2_LIBRARIES
560         ${ATK_LIBRARIES}
561     )
562 endif ()
563
564 if (ENABLE_BATTERY_STATUS)
565     list(APPEND WebKit2_LIBRARIES
566         ${ELDBUS_LIBRARIES}
567     )
568 endif ()