Compile and link with 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/WebsiteData/unix/WebsiteDataStoreUnix.cpp
149
150     UIProcess/cairo/BackingStoreCairo.cpp
151
152     UIProcess/efl/BatteryProvider.cpp
153     UIProcess/efl/ContextHistoryClientEfl.cpp
154     UIProcess/efl/ContextMenuClientEfl.cpp
155     UIProcess/efl/DownloadManagerEfl.cpp
156     UIProcess/efl/EasingCurves.cpp
157     UIProcess/efl/EwkTouchEvent.cpp
158     UIProcess/efl/EwkTouchPoint.cpp
159     UIProcess/efl/FindClientEfl.cpp
160     UIProcess/efl/FormClientEfl.cpp
161     UIProcess/efl/InputMethodContextEfl.cpp
162     UIProcess/efl/PageLoadClientEfl.cpp
163     UIProcess/efl/PagePolicyClientEfl.cpp
164     UIProcess/efl/PageUIClientEfl.cpp
165     UIProcess/efl/PageViewportControllerClientEfl.cpp
166     UIProcess/efl/RequestManagerClientEfl.cpp
167     UIProcess/efl/TextCheckerClientEfl.cpp
168     UIProcess/efl/TextCheckerEfl.cpp
169     UIProcess/efl/VibrationClientEfl.cpp
170     UIProcess/efl/ViewClientEfl.cpp
171     UIProcess/efl/WebColorPickerClient.cpp
172     UIProcess/efl/WebColorPickerEfl.cpp
173     UIProcess/efl/WebColorPickerResultListenerProxy.cpp
174     UIProcess/efl/WebContextMenuProxyEfl.cpp
175     UIProcess/efl/WebInspectorProxyEfl.cpp
176     UIProcess/efl/WebPageProxyEfl.cpp
177     UIProcess/efl/WebPopupItemEfl.cpp
178     UIProcess/efl/WebPopupMenuListenerEfl.cpp
179     UIProcess/efl/WebPreferencesEfl.cpp
180     UIProcess/efl/WebProcessPoolEfl.cpp
181     UIProcess/efl/WebProcessProxyEfl.cpp
182     UIProcess/efl/WebUIPopupMenuClient.cpp
183     UIProcess/efl/WebViewEfl.cpp
184
185     UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp
186     UIProcess/gstreamer/WebPageProxyGStreamer.cpp
187
188     UIProcess/soup/WebCookieManagerProxySoup.cpp
189     UIProcess/soup/WebProcessPoolSoup.cpp
190
191     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
192     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
193
194     WebProcess/InjectedBundle/API/efl/ewk_extension.cpp
195     WebProcess/InjectedBundle/API/efl/ewk_page.cpp
196
197     WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp
198
199     WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
200
201     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
202
203     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
204
205     WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp
206     WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp
207     WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp
208     WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp
209
210     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
211
212     WebProcess/WebPage/DrawingAreaImpl.cpp
213
214     WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp
215     WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
216     WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp
217
218     WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
219
220     WebProcess/WebPage/efl/WebInspectorUIEfl.cpp
221     WebProcess/WebPage/efl/WebPageEfl.cpp
222
223     WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp
224
225     WebProcess/efl/ExtensionManagerEfl.cpp
226     WebProcess/efl/SeccompFiltersWebProcessEfl.cpp
227     WebProcess/efl/WebProcessMainEfl.cpp
228
229     WebProcess/soup/WebKitSoupRequestInputStream.cpp
230     WebProcess/soup/WebProcessSoup.cpp
231 )
232
233 list(APPEND WebKit2_MESSAGES_IN_FILES
234     UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in
235
236     WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in
237 )
238
239 list(APPEND WebKit2_INCLUDE_DIRECTORIES
240     "${WEBCORE_DIR}/platform/efl"
241     "${WEBCORE_DIR}/platform/graphics/cairo"
242     "${WEBCORE_DIR}/platform/graphics/efl"
243     "${WEBCORE_DIR}/platform/graphics/opentype"
244     "${WEBCORE_DIR}/platform/graphics/x11"
245     "${WEBCORE_DIR}/platform/network/soup"
246     "${WEBCORE_DIR}/platform/text/enchant"
247     "${WEBKIT2_DIR}/DatabaseProcess/unix"
248     "${WEBKIT2_DIR}/NetworkProcess/efl"
249     "${WEBKIT2_DIR}/NetworkProcess/unix"
250     "${WEBKIT2_DIR}/Platform/efl"
251     "${WEBKIT2_DIR}/Shared/API/c/efl"
252     "${WEBKIT2_DIR}/Shared/CoordinatedGraphics"
253     "${WEBKIT2_DIR}/Shared/Downloads/soup"
254     "${WEBKIT2_DIR}/Shared/Network/CustomProtocols/soup"
255     "${WEBKIT2_DIR}/Shared/Plugins/unix"
256     "${WEBKIT2_DIR}/Shared/glib"
257     "${WEBKIT2_DIR}/Shared/efl"
258     "${WEBKIT2_DIR}/Shared/soup"
259     "${WEBKIT2_DIR}/Shared/unix"
260     "${WEBKIT2_DIR}/UIProcess/API/C/cairo"
261     "${WEBKIT2_DIR}/UIProcess/API/C/CoordinatedGraphics"
262     "${WEBKIT2_DIR}/UIProcess/API/C/efl"
263     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
264     "${WEBKIT2_DIR}/UIProcess/API/cpp/efl"
265     "${WEBKIT2_DIR}/UIProcess/API/efl"
266     "${WEBKIT2_DIR}/UIProcess/CoordinatedGraphics"
267     "${WEBKIT2_DIR}/UIProcess/Network/CustomProtocols/soup"
268     "${WEBKIT2_DIR}/UIProcess/efl"
269     "${WEBKIT2_DIR}/UIProcess/soup"
270     "${WEBKIT2_DIR}/WebProcess/efl"
271     "${WEBKIT2_DIR}/WebProcess/soup"
272     "${WEBKIT2_DIR}/WebProcess/unix"
273     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/efl"
274     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/efl"
275     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
276     "${WEBKIT2_DIR}/WebProcess/WebPage/CoordinatedGraphics"
277     "${WTF_DIR}/wtf/efl"
278     "${WTF_DIR}/wtf/glib"
279     "${WTF_DIR}"
280     "${WEBKIT2_DIR}"
281 )
282
283 list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
284     ${CAIRO_INCLUDE_DIRS}
285     ${ECORE_EVAS_INCLUDE_DIRS}
286     ${ECORE_IMF_EVAS_INCLUDE_DIRS}
287     ${ECORE_IMF_INCLUDE_DIRS}
288     ${ECORE_INCLUDE_DIRS}
289     ${ECORE_X_INCLUDE_DIRS}
290     ${EDJE_INCLUDE_DIRS}
291     ${EFREET_INCLUDE_DIRS}
292     ${EINA_INCLUDE_DIRS}
293     ${EO_INCLUDE_DIRS}
294     ${EVAS_INCLUDE_DIRS}
295     ${GLIB_INCLUDE_DIRS}
296     ${GSTREAMER_INCLUDE_DIRS}
297     ${HARFBUZZ_INCLUDE_DIRS}
298     ${LIBSOUP_INCLUDE_DIRS}
299     ${LIBXML2_INCLUDE_DIR}
300     ${LIBXSLT_INCLUDE_DIRS}
301     ${SQLITE_INCLUDE_DIRS}
302 )
303
304 list(APPEND WebKit2_LIBRARIES
305     WTF
306     ${CAIRO_LIBRARIES}
307     ${CMAKE_DL_LIBS}
308     ${ECORE_EVAS_LIBRARIES}
309     ${ECORE_IMF_EVAS_LIBRARIES}
310     ${ECORE_LIBRARIES}
311     ${EDJE_LIBRARIES}
312     ${EFREET_LIBRARIES}
313     ${EINA_LIBRARIES}
314     ${EO_LIBRARIES}
315     ${EVAS_LIBRARIES}
316     ${FONTCONFIG_LIBRARIES}
317     ${FREETYPE2_LIBRARIES}
318     ${GLIB_GIO_LIBRARIES}
319     ${GLIB_GOBJECT_LIBRARIES}
320     ${GLIB_LIBRARIES}
321     ${HARFBUZZ_LIBRARIES}
322     ${JPEG_LIBRARIES}
323     ${LIBSOUP_LIBRARIES}
324     ${LIBXML2_LIBRARIES}
325     ${OPENGL_LIBRARIES}
326     ${PNG_LIBRARIES}
327     ${SQLITE_LIBRARIES}
328 )
329
330 list(APPEND WebProcess_SOURCES
331     WebProcess/EntryPoint/unix/WebProcessMain.cpp
332 )
333
334 list(APPEND NetworkProcess_SOURCES
335     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
336 )
337
338 list(APPEND DatabaseProcess_SOURCES
339     DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp
340 )
341
342 list(APPEND WebProcess_LIBRARIES
343     ${CAIRO_LIBRARIES}
344     ${ECORE_IMF_EVAS_LIBRARIES}
345     ${ECORE_IMF_LIBRARIES}
346     ${EDJE_LIBRARIES}
347     ${EFLDEPS_LIBRARIES}
348     ${EVAS_LIBRARIES}
349     ${LIBXML2_LIBRARIES}
350     ${LIBXSLT_LIBRARIES}
351     ${OPENGL_LIBRARIES}
352     ${SQLITE_LIBRARIES}
353 )
354
355 if (ENABLE_SECCOMP_FILTERS)
356     list(APPEND WebKit2_LIBRARIES
357         ${LIBSECCOMP_LIBRARIES}
358     )
359     list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
360         ${LIBSECCOMP_INCLUDE_DIRS}
361     )
362
363     # If building with jhbuild, add the root build directory to the
364     # filesystem access policy.
365     if (DEVELOPER_MODE AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/WebKitBuild/DependenciesEFL)
366         add_definitions(-DSOURCE_DIR=\"${CMAKE_SOURCE_DIR}\")
367     endif ()
368 endif ()
369
370 if (ENABLE_ECORE_X)
371     list(APPEND WebProcess_LIBRARIES
372         ${ECORE_X_LIBRARIES}
373     )
374     list(APPEND WebKit2_LIBRARIES
375         ${ECORE_X_LIBRARIES}
376         ${X11_Xext_LIB}
377     )
378 endif ()
379
380 add_custom_target(forwarding-headersEflForWebKit2
381     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
382 )
383
384 set(WEBKIT2_EXTRA_DEPENDENCIES
385      forwarding-headersEflForWebKit2
386 )
387
388 configure_file(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
389 configure_file(efl/ewebkit2-extension.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2-extension.pc @ONLY)
390 configure_file(efl/EWebKit2Config.cmake.in ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2Config.cmake @ONLY)
391 configure_file(efl/EWebKit2ConfigVersion.cmake.in ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2ConfigVersion.cmake @ONLY)
392 configure_file(UIProcess/API/efl/EWebKit2.h.in ${DERIVED_SOURCES_WEBKIT2_DIR}/include/EWebKit2.h)
393
394 set(EWebKit2_HEADERS
395     "${DERIVED_SOURCES_WEBKIT2_DIR}/include/EWebKit2.h"
396     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_auth_request.h"
397     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list.h"
398     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list_item.h"
399     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_application_cache_manager.h"
400     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_color_picker.h"
401     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context.h"
402     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context_menu.h"
403     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context_menu_item.h"
404     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_cookie_manager.h"
405     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_database_manager.h"
406     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_download_job.h"
407     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_error.h"
408     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_favicon_database.h"
409     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_file_chooser_request.h"
410     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_form_submission_request.h"
411     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intro.h"
412     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_main.h"
413     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_data.h"
414     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_policy_decision.h"
415     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_object.h"
416     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_page_group.h"
417     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu.h"
418     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu_item.h"
419     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_security_origin.h"
420     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_settings.h"
421     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_storage_manager.h"
422     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_text_checker.h"
423     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_touch.h"
424     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_request.h"
425     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_response.h"
426     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_scheme_request.h"
427     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_view.h"
428     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_window_features.h"
429 )
430
431 set(EWebKit2_Extension_HEADERS
432     "${CMAKE_CURRENT_SOURCE_DIR}/WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h"
433     "${CMAKE_CURRENT_SOURCE_DIR}/WebProcess/InjectedBundle/API/efl/ewk_extension.h"
434     "${CMAKE_CURRENT_SOURCE_DIR}/WebProcess/InjectedBundle/API/efl/ewk_page.h"
435 )
436
437 install(FILES ${EWebKit2_HEADERS} DESTINATION ${HEADER_INSTALL_DIR})
438 install(FILES ${EWebKit2_Extension_HEADERS} DESTINATION ${HEADER_INSTALL_DIR}/extension)
439
440 install(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc DESTINATION lib/pkgconfig)
441 install(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2-extension.pc DESTINATION lib/pkgconfig)
442 install(FILES
443         ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2Config.cmake
444         ${CMAKE_BINARY_DIR}/WebKit2/efl/EWebKit2ConfigVersion.cmake
445         DESTINATION lib/cmake/EWebKit2)
446
447 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")
448
449 add_library(ewebkit_extension_manager SHARED "${WEBKIT2_DIR}/WebProcess/efl/WebInjectedBundleMainEfl.cpp")
450 target_link_libraries(ewebkit_extension_manager WebKit2)
451
452 install(TARGETS ewebkit_extension_manager DESTINATION "${EWEBKIT_EXTENSION_MANAGER_INSTALL_DIR}")
453
454 if (ENABLE_PLUGIN_PROCESS)
455     list(APPEND PluginProcess_INCLUDE_DIRECTORIES
456         "${WEBKIT2_DIR}/PluginProcess/unix"
457     )
458
459     include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
460
461     list(APPEND PluginProcess_SOURCES
462         ${WEBKIT2_DIR}/PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
463     )
464
465     if (ENABLE_ECORE_X)
466         list(APPEND PluginProcess_LIBRARIES
467             ${ECORE_X_LIBRARIES}
468         )
469     endif ()
470 endif () # ENABLE_PLUGIN_PROCESS
471
472 include_directories(${THIRDPARTY_DIR}/gtest/include)
473
474 set(EWK2UnitTests_LIBRARIES
475     ${CAIRO_LIBRARIES}
476     ${ECORE_EVAS_LIBRARIES}
477     ${ECORE_LIBRARIES}
478     ${EVAS_LIBRARIES}
479     ${GLIB_GIO_LIBRARIES}
480     ${GLIB_GOBJECT_LIBRARIES}
481     ${GLIB_GTHREAD_LIBRARIES}
482     ${GLIB_LIBRARIES}
483     ${LIBSOUP_LIBRARIES}
484     JavaScriptCore
485     WTF
486     WebCore
487     WebKit2
488     gtest
489 )
490
491 if (ENABLE_ECORE_X)
492     list(APPEND EWK2UnitTests_LIBRARIES
493         ${ECORE_X_LIBRARIES}
494     )
495 endif ()
496
497 set(WEBKIT2_EFL_TEST_DIR "${WEBKIT2_DIR}/UIProcess/API/efl/tests")
498 set(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
499 set(TEST_EXTENSIONS_DIR ${WEBKIT2_EFL_TEST_DIR}/extensions)
500 set(WEBKIT2_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI/EWebKit2)
501
502 add_definitions(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
503     -DTEST_LIB_DIR=\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\"
504     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
505     -DLIBDIR=\"${LIB_INSTALL_DIR}\"
506     -DLIBEXECDIR=\"${EXEC_INSTALL_DIR}\"
507     -DDATADIR=\"${CMAKE_INSTALL_PREFIX}/share\"
508     -DEXTENSIONMANAGERDIR=\"${CMAKE_INSTALL_PREFIX}/${EWEBKIT_EXTENSION_MANAGER_INSTALL_DIR}\"
509     -DWEBPROCESSNAME=\"WebProcess\"
510     -DPLUGINPROCESSNAME=\"PluginProcess\"
511     -DNETWORKPROCESSNAME=\"NetworkProcess\"
512     -DDATABASEPROCESSNAME=\"DatabaseProcess\"
513     -DEXTENSIONMANAGERNAME=\"libewebkit_extension_manager.so\"
514     -DGTEST_HAS_RTTI=0
515 )
516
517 add_library(ewk2UnitTestUtils
518     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestBase.cpp
519     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestEnvironment.cpp
520     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestMain.cpp
521     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestServer.cpp
522 )
523
524 target_link_libraries(ewk2UnitTestUtils ${EWK2UnitTests_LIBRARIES})
525
526 # The "ewk" on the test name needs to be suffixed with "2", otherwise it
527 # will clash with tests from the WebKit 1 test suite.
528 set(EWK2UnitTests_BINARIES
529     test_ewk2_accessibility
530     test_ewk2_application_cache_manager
531     test_ewk2_auth_request
532     test_ewk2_back_forward_list
533     test_ewk2_color_picker
534     test_ewk2_context
535     test_ewk2_context_history_callbacks
536     test_ewk2_context_menu
537     test_ewk2_cookie_manager
538     test_ewk2_database_manager
539     test_ewk2_download_job
540     test_ewk2_eina_shared_string
541     test_ewk2_favicon_database
542     test_ewk2_file_chooser_request
543     test_ewk2_javascript_binding
544     test_ewk2_object
545     test_ewk2_page
546     test_ewk2_page_group
547     test_ewk2_popup_menu
548     test_ewk2_settings
549     test_ewk2_ssl
550     test_ewk2_storage_manager
551     test_ewk2_text_checker
552     test_ewk2_view
553     test_ewk2_window_features
554 )
555
556 # Skipped unit tests list:
557 #
558 # webkit.org/b/107422: test_ewk2_auth_request
559
560 if (ENABLE_API_TESTS)
561     foreach (testName ${EWK2UnitTests_BINARIES})
562         add_executable(${testName} ${WEBKIT2_EFL_TEST_DIR}/${testName}.cpp)
563         add_test(${testName} ${WEBKIT2_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY}/${testName})
564         set_tests_properties(${testName} PROPERTIES TIMEOUT 60)
565         set_target_properties(${testName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${WEBKIT2_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY})
566         target_link_libraries(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
567     endforeach ()
568
569     add_library(ewk2UnitTestExtensionSample SHARED ${TEST_EXTENSIONS_DIR}/extension_sample.cpp)
570     target_link_libraries(ewk2UnitTestExtensionSample ${EINA_LIBRARIES} WebKit2)
571 endif ()
572
573 if (ENABLE_SPELLCHECK)
574     list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
575         ${ENCHANT_INCLUDE_DIRS}
576     )
577     list(APPEND WebKit2_LIBRARIES
578         ${ENCHANT_LIBRARIES}
579     )
580 endif ()
581
582 if (ENABLE_ACCESSIBILITY)
583     list(APPEND WebKit2_INCLUDE_DIRECTORIES
584         "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
585     )
586     list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
587         ${ATK_INCLUDE_DIRS}
588     )
589     list(APPEND WebKit2_LIBRARIES
590         ${ATK_LIBRARIES}
591     )
592 endif ()
593
594 if (ENABLE_BATTERY_STATUS)
595     list(APPEND WebKit2_LIBRARIES
596         ${ELDBUS_LIBRARIES}
597     )
598     list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
599         ${ELDBUS_INCLUDE_DIRS}
600     )
601 endif ()