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