[CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
[WebKit-https.git] / Source / WebKit2 / PlatformEfl.cmake
1 list(APPEND WebKit2_SOURCES
2     NetworkProcess/soup/NetworkProcessSoup.cpp
3     NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp
4     NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
5
6     NetworkProcess/unix/NetworkProcessMainUnix.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/LayerTreeContextEfl.cpp
38     Shared/efl/NativeWebKeyboardEventEfl.cpp
39     Shared/efl/NativeWebMouseEventEfl.cpp
40     Shared/efl/NativeWebTouchEventEfl.cpp
41     Shared/efl/NativeWebWheelEventEfl.cpp
42     Shared/efl/ProcessExecutablePathEfl.cpp
43     Shared/efl/WebEventFactory.cpp
44
45     Shared/linux/WebMemorySamplerLinux.cpp
46
47     Shared/linux/SeccompFilters/OpenSyscall.cpp
48     Shared/linux/SeccompFilters/SeccompBroker.cpp
49     Shared/linux/SeccompFilters/SeccompFilters.cpp
50     Shared/linux/SeccompFilters/SigactionSyscall.cpp
51     Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp
52     Shared/linux/SeccompFilters/Syscall.cpp
53     Shared/linux/SeccompFilters/SyscallPolicy.cpp
54
55     Shared/soup/WebCoreArgumentCodersSoup.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/NetworkInfoProvider.cpp
146     UIProcess/efl/PageLoadClientEfl.cpp
147     UIProcess/efl/PagePolicyClientEfl.cpp
148     UIProcess/efl/PageUIClientEfl.cpp
149     UIProcess/efl/PageViewportControllerClientEfl.cpp
150     UIProcess/efl/RequestManagerClientEfl.cpp
151     UIProcess/efl/TextCheckerClientEfl.cpp
152     UIProcess/efl/TextCheckerEfl.cpp
153     UIProcess/efl/VibrationClientEfl.cpp
154     UIProcess/efl/ViewClientEfl.cpp
155     UIProcess/efl/WebColorPickerClient.cpp
156     UIProcess/efl/WebColorPickerEfl.cpp
157     UIProcess/efl/WebColorPickerResultListenerProxy.cpp
158     UIProcess/efl/WebContextEfl.cpp
159     UIProcess/efl/WebContextMenuProxyEfl.cpp
160     UIProcess/efl/WebInspectorProxyEfl.cpp
161     UIProcess/efl/WebPageProxyEfl.cpp
162     UIProcess/efl/WebPopupItemEfl.cpp
163     UIProcess/efl/WebPopupMenuListenerEfl.cpp
164     UIProcess/efl/WebPreferencesEfl.cpp
165     UIProcess/efl/WebProcessProxyEfl.cpp
166     UIProcess/efl/WebUIPopupMenuClient.cpp
167     UIProcess/efl/WebViewEfl.cpp
168
169     UIProcess/soup/WebContextSoup.cpp
170     UIProcess/soup/WebCookieManagerProxySoup.cpp
171     UIProcess/soup/WebSoupRequestManagerClient.cpp
172     UIProcess/soup/WebSoupRequestManagerProxy.cpp
173
174     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
175     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
176
177     WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp
178
179     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
180
181     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
182
183     WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp
184     WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp
185     WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp
186     WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp
187
188     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
189
190     WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp
191     WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
192     WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp
193
194     WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
195
196     WebProcess/WebPage/efl/WebInspectorEfl.cpp
197     WebProcess/WebPage/efl/WebPageEfl.cpp
198
199     WebProcess/efl/SeccompFiltersWebProcessEfl.cpp
200     WebProcess/efl/WebProcessMainEfl.cpp
201
202     WebProcess/soup/WebKitSoupRequestGeneric.cpp
203     WebProcess/soup/WebKitSoupRequestInputStream.cpp
204     WebProcess/soup/WebProcessSoup.cpp
205     WebProcess/soup/WebSoupRequestManager.cpp
206 )
207
208 list(APPEND WebKit2_MESSAGES_IN_FILES
209     UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in
210
211     UIProcess/soup/WebSoupRequestManagerProxy.messages.in
212
213     WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in
214
215     WebProcess/soup/WebSoupRequestManager.messages.in
216 )
217
218 list(APPEND WebKit2_INCLUDE_DIRECTORIES
219     "${WEBCORE_DIR}/platform/efl"
220     "${WEBCORE_DIR}/platform/graphics/cairo"
221     "${WEBCORE_DIR}/platform/graphics/efl"
222     "${WEBCORE_DIR}/platform/graphics/opentype"
223     "${WEBCORE_DIR}/platform/network/soup"
224     "${WEBCORE_DIR}/platform/text/enchant"
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}/UIProcess/API/C/cairo"
233     "${WEBKIT2_DIR}/UIProcess/API/C/CoordinatedGraphics"
234     "${WEBKIT2_DIR}/UIProcess/API/C/efl"
235     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
236     "${WEBKIT2_DIR}/UIProcess/API/cpp/efl"
237     "${WEBKIT2_DIR}/UIProcess/API/efl"
238     "${WEBKIT2_DIR}/UIProcess/CoordinatedGraphics"
239     "${WEBKIT2_DIR}/UIProcess/efl"
240     "${WEBKIT2_DIR}/UIProcess/soup"
241     "${WEBKIT2_DIR}/WebProcess/efl"
242     "${WEBKIT2_DIR}/WebProcess/soup"
243     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/efl"
244     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
245     "${WEBKIT2_DIR}/WebProcess/WebPage/CoordinatedGraphics"
246     "${WTF_DIR}/wtf/efl/"
247     "${WTF_DIR}/wtf/gobject"
248     ${CAIRO_INCLUDE_DIRS}
249     ${ECORE_EVAS_INCLUDE_DIRS}
250     ${ECORE_IMF_EVAS_INCLUDE_DIRS}
251     ${ECORE_IMF_INCLUDE_DIRS}
252     ${ECORE_INCLUDE_DIRS}
253     ${ECORE_X_INCLUDE_DIRS}
254     ${EDJE_INCLUDE_DIRS}
255     ${EFREET_INCLUDE_DIRS}
256     ${EINA_INCLUDE_DIRS}
257     ${EO_INCLUDE_DIRS}
258     ${EVAS_INCLUDE_DIRS}
259     ${HARFBUZZ_INCLUDE_DIRS}
260     ${LIBSOUP_INCLUDE_DIRS}
261     ${LIBXML2_INCLUDE_DIR}
262     ${LIBXSLT_INCLUDE_DIRS}
263     ${SQLITE_INCLUDE_DIRS}
264     ${GLIB_INCLUDE_DIRS}
265     ${LIBSOUP_INCLUDE_DIRS}
266     ${WTF_DIR}
267 )
268
269 list(APPEND WebKit2_LIBRARIES
270     ${CAIRO_LIBRARIES}
271     ${CMAKE_DL_LIBS}
272     ${ECORE_EVAS_LIBRARIES}
273     ${ECORE_IMF_EVAS_LIBRARIES}
274     ${ECORE_LIBRARIES}
275     ${EDJE_LIBRARIES}
276     ${EFREET_LIBRARIES}
277     ${EINA_LIBRARIES}
278     ${EO_LIBRARIES}
279     ${EVAS_LIBRARIES}
280     ${FONTCONFIG_LIBRARIES}
281     ${Freetype_LIBRARIES}
282     ${GLIB_GIO_LIBRARIES}
283     ${GLIB_GOBJECT_LIBRARIES}
284     ${GLIB_LIBRARIES}
285     ${HARFBUZZ_LIBRARIES}
286     ${JPEG_LIBRARIES}
287     ${LIBSOUP_LIBRARIES}
288     ${LIBXML2_LIBRARIES}
289     ${OPENGL_LIBRARIES}
290     ${PNG_LIBRARIES}
291     ${SQLITE_LIBRARIES}
292 )
293
294 list(APPEND WebProcess_SOURCES
295     efl/MainEfl.cpp
296 )
297
298 list(APPEND WebProcess_LIBRARIES
299     ${CAIRO_LIBRARIES}
300     ${ECORE_IMF_EVAS_LIBRARIES}
301     ${ECORE_IMF_LIBRARIES}
302     ${EDJE_LIBRARIES}
303     ${EFLDEPS_LIBRARIES}
304     ${EVAS_LIBRARIES}
305     ${LIBXML2_LIBRARIES}
306     ${LIBXSLT_LIBRARIES}
307     ${OPENGL_LIBRARIES}
308     ${SQLITE_LIBRARIES}
309 )
310
311 if (ENABLE_SECCOMP_FILTERS)
312     list(APPEND WebKit2_LIBRARIES
313         ${LIBSECCOMP_LIBRARIES}
314     )
315     list(APPEND WebKit2_INCLUDE_DIRECTORIES
316         ${LIBSECCOMP_INCLUDE_DIRS}
317     )
318
319     # If building with jhbuild, add the root build directory to the
320     # filesystem access policy.
321     if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies)
322         add_definitions(-DSOURCE_DIR=\"${CMAKE_SOURCE_DIR}\")
323     endif ()
324 endif ()
325
326 if (ENABLE_ECORE_X)
327     list(APPEND WebProcess_LIBRARIES
328         ${ECORE_X_LIBRARIES}
329         ${X11_Xext_LIB}
330     )
331     list(APPEND WebKit2_LIBRARIES
332         ${ECORE_X_LIBRARIES}
333     )
334 endif ()
335
336 add_custom_target(forwarding-headerEfl
337     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
338     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include CoordinatedGraphics
339 )
340
341 add_custom_target(forwarding-headerSoup
342     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
343 )
344
345 set(WEBKIT2_EXTRA_DEPENDENCIES
346      forwarding-headerEfl
347      forwarding-headerSoup
348 )
349
350 configure_file(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
351 configure_file(efl/EWebKit2Config.cmake.in ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2Config.cmake @ONLY)
352 configure_file(efl/EWebKit2ConfigVersion.cmake.in ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2ConfigVersion.cmake @ONLY)
353
354 set(EWebKit2_HEADERS
355     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/EWebKit2.h"
356     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_auth_request.h"
357     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list.h"
358     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list_item.h"
359     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_application_cache_manager.h"
360     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_color_picker.h"
361     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context.h"
362     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context_menu.h"
363     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context_menu_item.h"
364     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_cookie_manager.h"
365     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_database_manager.h"
366     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_defines.h"
367     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_download_job.h"
368     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_error.h"
369     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_favicon_database.h"
370     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_file_chooser_request.h"
371     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_form_submission_request.h"
372     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_main.h"
373     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_data.h"
374     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_policy_decision.h"
375     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_object.h"
376     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_page_group.h"
377     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu.h"
378     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu_item.h"
379     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_security_origin.h"
380     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_settings.h"
381     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_storage_manager.h"
382     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_text_checker.h"
383     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_touch.h"
384     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_request.h"
385     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_response.h"
386     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_scheme_request.h"
387     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_view.h"
388     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_window_features.h"
389 )
390
391 install(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc DESTINATION lib/pkgconfig)
392 install(FILES
393         ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2Config.cmake
394         ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2ConfigVersion.cmake
395         DESTINATION lib/cmake/EWebKit2)
396
397 install(FILES ${EWebKit2_HEADERS} DESTINATION include/${WebKit2_OUTPUT_NAME}-${PROJECT_VERSION_MAJOR})
398
399 if (ENABLE_PLUGIN_PROCESS)
400     add_definitions(-DENABLE_PLUGIN_PROCESS=1)
401
402     list(APPEND PluginProcess_INCLUDE_DIRECTORIES
403         "${WEBKIT2_DIR}/PluginProcess/unix"
404     )
405
406     include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
407
408     list(APPEND PluginProcess_SOURCES
409         ${WEBKIT2_DIR}/unix/PluginMainUnix.cpp
410     )
411
412     set(PluginProcess_LIBRARIES
413         WebKit2
414     )
415
416     if (ENABLE_ECORE_X)
417         list(APPEND PluginProcess_LIBRARIES
418             ${ECORE_X_LIBRARIES}
419         )
420     endif ()
421
422     add_executable(PluginProcess ${PluginProcess_SOURCES})
423     target_link_libraries(PluginProcess ${PluginProcess_LIBRARIES})
424     install(TARGETS PluginProcess DESTINATION "${EXEC_INSTALL_DIR}")
425 endif () # ENABLE_PLUGIN_PROCESS
426
427 include_directories(${THIRDPARTY_DIR}/gtest/include)
428
429 set(EWK2UnitTests_LIBRARIES
430     ${CAIRO_LIBRARIES}
431     ${ECORE_EVAS_LIBRARIES}
432     ${ECORE_LIBRARIES}
433     ${EVAS_LIBRARIES}
434     ${GLIB_GIO_LIBRARIES}
435     ${GLIB_GOBJECT_LIBRARIES}
436     ${GLIB_GTHREAD_LIBRARIES}
437     ${GLIB_LIBRARIES}
438     ${LIBSOUP_LIBRARIES}
439     JavaScriptCore
440     WTF
441     WebCore
442     WebKit2
443     gtest
444 )
445
446 set(WEBKIT2_EFL_TEST_DIR "${WEBKIT2_DIR}/UIProcess/API/efl/tests")
447 set(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
448 set(TEST_INJECTED_BUNDLE_DIR ${WEBKIT2_EFL_TEST_DIR}/InjectedBundle)
449 set(WEBKIT2_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI/EWebKit2)
450
451 add_definitions(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
452     -DTEST_LIB_DIR=\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\"
453     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
454     -DLIBEXECDIR=\"${CMAKE_INSTALL_PREFIX}/${EXEC_INSTALL_DIR}\"
455     -DWEBPROCESSNAME=\"WebProcess\"
456     -DPLUGINPROCESSNAME=\"PluginProcess\"
457     -DNETWORKPROCESSNAME=\"NetworkProcess\"
458 )
459
460 add_library(ewk2UnitTestUtils
461     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestBase.cpp
462     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestEnvironment.cpp
463     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestMain.cpp
464     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestServer.cpp
465 )
466
467 target_link_libraries(ewk2UnitTestUtils ${EWK2UnitTests_LIBRARIES})
468
469 # The "ewk" on the test name needs to be suffixed with "2", otherwise it
470 # will clash with tests from the WebKit 1 test suite.
471 set(EWK2UnitTests_BINARIES
472     test_ewk2_application_cache_manager
473     test_ewk2_auth_request
474     test_ewk2_back_forward_list
475     test_ewk2_color_picker
476     test_ewk2_context
477     test_ewk2_context_history_callbacks
478     test_ewk2_context_menu
479     test_ewk2_cookie_manager
480     test_ewk2_database_manager
481     test_ewk2_download_job
482     test_ewk2_eina_shared_string
483     test_ewk2_favicon_database
484     test_ewk2_file_chooser_request
485     test_ewk2_object
486     test_ewk2_page_group
487     test_ewk2_popup_menu
488     test_ewk2_refptr_evas_object
489     test_ewk2_settings
490     test_ewk2_storage_manager
491     test_ewk2_text_checker
492     test_ewk2_view
493     test_ewk2_window_features
494 )
495
496 # Skipped unit tests list:
497 #
498 # webkit.org/b/107422: test_ewk2_auth_request
499 #
500
501 if (ENABLE_API_TESTS)
502     foreach (testName ${EWK2UnitTests_BINARIES})
503         add_executable(${testName} ${WEBKIT2_EFL_TEST_DIR}/${testName}.cpp)
504         add_test(${testName} ${WEBKIT2_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY}/${testName})
505         set_tests_properties(${testName} PROPERTIES TIMEOUT 60)
506         set_target_properties(${testName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${WEBKIT2_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY})
507         target_link_libraries(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
508     endforeach ()
509
510     add_library(ewk2UnitTestInjectedBundleSample SHARED ${TEST_INJECTED_BUNDLE_DIR}/injected_bundle_sample.cpp)
511     target_link_libraries(ewk2UnitTestInjectedBundleSample WebKit2)
512 endif ()
513
514 if (ENABLE_SPELLCHECK)
515     list(APPEND WebKit2_INCLUDE_DIRECTORIES
516         ${ENCHANT_INCLUDE_DIRS}
517     )
518     list(APPEND WebKit2_LIBRARIES
519         ${ENCHANT_LIBRARIES}
520     )
521 endif ()
522
523 if (ENABLE_ACCESSIBILITY)
524     list(APPEND WebKit2_INCLUDE_DIRECTORIES
525         "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
526         ${ATK_INCLUDE_DIRS}
527     )
528     list(APPEND WebKit2_LIBRARIES
529         ${ATK_LIBRARIES}
530     )
531 endif ()