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