5b2388d0002d1cde8441a714721b6ce3d8c304e5
[WebKit.git] / Source / WebKit2 / PlatformEfl.cmake
1 list(APPEND WebKit2_SOURCES
2     Platform/efl/LoggingEfl.cpp
3     Platform/efl/ModuleEfl.cpp
4     Platform/efl/WorkQueueEfl.cpp
5     Platform/unix/SharedMemoryUnix.cpp
6
7     Platform/CoreIPC/unix/ConnectionUnix.cpp
8     Platform/CoreIPC/unix/AttachmentUnix.cpp
9
10     PluginProcess/unix/PluginControllerProxyUnix.cpp
11     PluginProcess/unix/PluginProcessMainUnix.cpp
12     PluginProcess/unix/PluginProcessUnix.cpp
13
14     Shared/API/c/cairo/WKImageCairo.cpp
15
16     Shared/cairo/ShareableBitmapCairo.cpp
17
18     Shared/efl/LayerTreeContextEfl.cpp
19     Shared/efl/NativeWebKeyboardEventEfl.cpp
20     Shared/efl/NativeWebWheelEventEfl.cpp
21     Shared/efl/NativeWebMouseEventEfl.cpp
22     Shared/efl/NativeWebTouchEventEfl.cpp
23     Shared/efl/ProcessExecutablePathEfl.cpp
24     Shared/efl/WebEventFactory.cpp
25
26     Shared/linux/WebMemorySamplerLinux.cpp
27
28     Shared/soup/PlatformCertificateInfo.cpp
29     Shared/soup/WebCoreArgumentCodersSoup.cpp
30
31     UIProcess/DefaultUndoController.cpp
32
33     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
34
35     UIProcess/API/C/efl/WKView.cpp
36
37     UIProcess/API/cpp/efl/WKEinaSharedString.cpp
38
39     UIProcess/API/C/soup/WKContextSoup.cpp
40     UIProcess/API/C/soup/WKSoupRequestManager.cpp
41
42     UIProcess/API/efl/EwkViewImpl.cpp
43     UIProcess/API/efl/EvasGLContext.cpp
44     UIProcess/API/efl/EvasGLSurface.cpp
45     UIProcess/API/efl/SnapshotImageGL.cpp
46     UIProcess/API/efl/ewk_auth_request.cpp
47     UIProcess/API/efl/ewk_back_forward_list.cpp
48     UIProcess/API/efl/ewk_back_forward_list_item.cpp
49     UIProcess/API/efl/ewk_color_picker.cpp
50     UIProcess/API/efl/ewk_context.cpp
51     UIProcess/API/efl/ewk_context_menu.cpp
52     UIProcess/API/efl/ewk_context_menu_item.cpp
53     UIProcess/API/efl/ewk_cookie_manager.cpp
54     UIProcess/API/efl/ewk_database_manager.cpp
55     UIProcess/API/efl/ewk_download_job.cpp
56     UIProcess/API/efl/ewk_error.cpp
57     UIProcess/API/efl/ewk_favicon_database.cpp
58     UIProcess/API/efl/ewk_file_chooser_request.cpp
59     UIProcess/API/efl/ewk_form_submission_request.cpp
60     UIProcess/API/efl/ewk_intent.cpp
61     UIProcess/API/efl/ewk_intent_service.cpp
62     UIProcess/API/efl/ewk_main.cpp
63     UIProcess/API/efl/ewk_navigation_data.cpp
64     UIProcess/API/efl/ewk_navigation_policy_decision.cpp
65     UIProcess/API/efl/ewk_object.cpp
66     UIProcess/API/efl/ewk_popup_menu.cpp
67     UIProcess/API/efl/ewk_popup_menu_item.cpp
68     UIProcess/API/efl/ewk_resource.cpp
69     UIProcess/API/efl/ewk_security_origin.cpp
70     UIProcess/API/efl/ewk_settings.cpp
71     UIProcess/API/efl/ewk_storage_manager.cpp
72     UIProcess/API/efl/ewk_text_checker.cpp
73     UIProcess/API/efl/ewk_url_request.cpp
74     UIProcess/API/efl/ewk_url_response.cpp
75     UIProcess/API/efl/ewk_url_scheme_request.cpp
76     UIProcess/API/efl/ewk_view.cpp
77     UIProcess/API/efl/ewk_window_features.cpp
78
79     UIProcess/cairo/BackingStoreCairo.cpp
80
81     UIProcess/efl/BatteryProvider.cpp
82     UIProcess/efl/ContextHistoryClientEfl.cpp
83     UIProcess/efl/ContextMenuClientEfl.cpp
84     UIProcess/efl/DownloadManagerEfl.cpp
85     UIProcess/efl/FindClientEfl.cpp
86     UIProcess/efl/FormClientEfl.cpp
87     UIProcess/efl/InputMethodContextEfl.cpp
88     UIProcess/efl/NetworkInfoProvider.cpp
89     UIProcess/efl/PageClientBase.cpp
90     UIProcess/efl/PageClientLegacyImpl.cpp
91     UIProcess/efl/PageClientDefaultImpl.cpp
92     UIProcess/efl/PageLoadClientEfl.cpp
93     UIProcess/efl/PagePolicyClientEfl.cpp
94     UIProcess/efl/PageUIClientEfl.cpp
95     UIProcess/efl/PageViewportControllerClientEfl.cpp
96     UIProcess/efl/RequestManagerClientEfl.cpp
97     UIProcess/efl/ResourceLoadClientEfl.cpp
98     UIProcess/efl/TextCheckerEfl.cpp
99     UIProcess/efl/VibrationClientEfl.cpp
100     UIProcess/efl/WebContextEfl.cpp
101     UIProcess/efl/WebContextMenuProxyEfl.cpp
102     UIProcess/efl/WebFullScreenManagerProxyEfl.cpp
103     UIProcess/efl/WebInspectorProxyEfl.cpp
104     UIProcess/efl/WebPageProxyEfl.cpp
105     UIProcess/efl/WebPopupMenuProxyEfl.cpp
106     UIProcess/efl/WebPreferencesEfl.cpp
107     UIProcess/efl/WebProcessProxyEfl.cpp
108
109     UIProcess/soup/WebCookieManagerProxySoup.cpp
110     UIProcess/soup/WebSoupRequestManagerClient.cpp
111     UIProcess/soup/WebSoupRequestManagerProxy.cpp
112
113     UIProcess/Launcher/efl/ProcessLauncherEfl.cpp
114
115     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
116     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
117
118     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
119     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
120
121     WebProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp
122     WebProcess/Downloads/soup/DownloadSoup.cpp
123
124     WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp
125
126     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
127
128     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
129
130     WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp
131     WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp
132     WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp
133     WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp
134
135     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
136
137     WebProcess/WebPage/efl/WebInspectorEfl.cpp
138     WebProcess/WebPage/efl/WebPageEfl.cpp
139
140     WebProcess/efl/WebProcessMainEfl.cpp
141
142     WebProcess/soup/WebProcessSoup.cpp
143     WebProcess/soup/WebSoupRequestManager.cpp
144     WebProcess/soup/WebKitSoupRequestGeneric.cpp
145     WebProcess/soup/WebKitSoupRequestInputStream.cpp
146 )
147
148 list(APPEND WebKit2_MESSAGES_IN_FILES
149     UIProcess/soup/WebSoupRequestManagerProxy.messages.in
150     WebProcess/soup/WebSoupRequestManager.messages.in
151 )
152
153 list(APPEND WebKit2_INCLUDE_DIRECTORIES
154     "${JAVASCRIPTCORE_DIR}/llint"
155     "${WEBCORE_DIR}/platform/efl"
156     "${WEBCORE_DIR}/platform/graphics/cairo"
157     "${WEBCORE_DIR}/platform/network/soup"
158     "${WEBCORE_DIR}/platform/text/enchant"
159     "${WEBCORE_DIR}/svg/graphics"
160     "${WEBKIT2_DIR}/Shared/efl"
161     "${WEBKIT2_DIR}/Shared/soup"
162     "${WEBKIT2_DIR}/UIProcess/API/C/efl"
163     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
164     "${WEBKIT2_DIR}/UIProcess/API/cpp/efl"
165     "${WEBKIT2_DIR}/UIProcess/API/efl"
166     "${WEBKIT2_DIR}/UIProcess/efl"
167     "${WEBKIT2_DIR}/UIProcess/soup"
168     "${WEBKIT2_DIR}/WebProcess/Downloads/soup"
169     "${WEBKIT2_DIR}/WebProcess/efl"
170     "${WEBKIT2_DIR}/WebProcess/soup"
171     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/efl"
172     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
173     "${WTF_DIR}/wtf/efl/"
174     "${WTF_DIR}/wtf/gobject"
175     ${CAIRO_INCLUDE_DIRS}
176     ${ECORE_INCLUDE_DIRS}
177     ${ECORE_EVAS_INCLUDE_DIRS}
178     ${EDJE_INCLUDE_DIRS}
179     ${EFREET_INCLUDE_DIRS}
180     ${EINA_INCLUDE_DIRS}
181     ${EVAS_INCLUDE_DIRS}
182     ${HARFBUZZ_INCLUDE_DIRS}
183     ${LIBSOUP_INCLUDE_DIRS}
184     ${LIBXML2_INCLUDE_DIR}
185     ${LIBXSLT_INCLUDE_DIRS}
186     ${SQLITE_INCLUDE_DIRS}
187     ${GLIB_INCLUDE_DIRS}
188     ${LIBSOUP_INCLUDE_DIRS}
189     ${WTF_DIR}
190 )
191
192 if (WTF_USE_3D_GRAPHICS)
193     list(APPEND WebKit2_INCLUDE_DIRECTORIES
194         "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
195     )
196 endif ()
197
198 list(APPEND WebKit2_LIBRARIES
199     ${CAIRO_LIBRARIES}
200     ${ECORE_LIBRARIES}
201     ${ECORE_EVAS_LIBRARIES}
202     ${EDJE_LIBRARIES}
203     ${EFREET_LIBRARIES}
204     ${EINA_LIBRARIES}
205     ${EVAS_LIBRARIES}
206     ${Freetype_LIBRARIES}
207     ${HARFBUZZ_LIBRARIES}
208     ${LIBXML2_LIBRARIES}
209     ${OPENGL_LIBRARIES}
210     ${SQLITE_LIBRARIES}
211     ${FONTCONFIG_LIBRARIES}
212     ${PNG_LIBRARIES}
213     ${JPEG_LIBRARIES}
214     ${CMAKE_DL_LIBS}
215     ${GLIB_LIBRARIES}
216     ${GLIB_GIO_LIBRARIES}
217     ${GLIB_GOBJECT_LIBRARIES}
218     ${LIBSOUP_LIBRARIES}
219 )
220
221 list(APPEND WebProcess_SOURCES
222     efl/MainEfl.cpp
223 )
224
225 list(APPEND WebProcess_LIBRARIES
226     ${CAIRO_LIBRARIES}
227     ${ECORE_IMF_LIBRARIES}
228     ${EDJE_LIBRARIES}
229     ${EFLDEPS_LIBRARIES}
230     ${EVAS_LIBRARIES}
231     ${LIBXML2_LIBRARIES}
232     ${LIBXSLT_LIBRARIES}
233     ${OPENGL_LIBRARIES}
234     ${SQLITE_LIBRARIES}
235 )
236
237 if (ENABLE_ECORE_X)
238     list(APPEND WebProcess_LIBRARIES
239         ${ECORE_X_LIBRARIES}
240         ${X11_Xext_LIB})
241 endif ()
242
243 add_custom_target(forwarding-headerEfl
244     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
245 )
246 set(ForwardingHeaders_NAME forwarding-headerEfl)
247
248 add_custom_target(forwarding-headerSoup
249     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
250 )
251 set(ForwardingNetworkHeaders_NAME forwarding-headerSoup)
252
253 configure_file(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
254 set(EWebKit2_HEADERS
255     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/EWebKit2.h"
256     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_auth_request.h"
257     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list.h"
258     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list_item.h"
259     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_color_picker.h"
260     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context.h"
261     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_cookie_manager.h"
262     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_database_manager.h"
263     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_defines.h"
264     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_download_job.h"
265     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_error.h"
266     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_favicon_database.h"
267     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_file_chooser_request.h"
268     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_form_submission_request.h"
269     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent.h"
270     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent_service.h"
271     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_main.h"
272     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_data.h"
273     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_policy_decision.h"
274     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_object.h"
275     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu.h"
276     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu_item.h"
277     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_resource.h"
278     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_security_origin.h"
279     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_settings.h"
280     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_storage_manager.h"
281     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_text_checker.h"
282     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_touch.h"
283     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_request.h"
284     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_response.h"
285     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_scheme_request.h"
286     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_view.h"
287     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_window_features.h"
288 )
289
290 install(FILES ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc DESTINATION lib/pkgconfig)
291 install(FILES ${EWebKit2_HEADERS} DESTINATION include/${WebKit2_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR})
292
293 if (ENABLE_PLUGIN_PROCESS)
294     add_definitions(-DENABLE_PLUGIN_PROCESS=1)
295
296     set(PluginProcess_EXECUTABLE_NAME PluginProcess)
297     list(APPEND PluginProcess_INCLUDE_DIRECTORIES
298         "${WEBKIT2_DIR}/PluginProcess/unix"
299     )
300
301     include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
302
303     list(APPEND PluginProcess_SOURCES
304         ${WEBKIT2_DIR}/unix/PluginMainUnix.cpp
305     )
306
307     set(PluginProcess_LIBRARIES
308         ${WebKit2_LIBRARY_NAME}
309     )
310
311     add_executable(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_SOURCES})
312     target_link_libraries(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_LIBRARIES})
313     install(TARGETS ${PluginProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
314 endif () # ENABLE_PLUGIN_PROCESS
315
316 include_directories(${THIRDPARTY_DIR}/gtest/include)
317
318 set(EWK2UnitTests_LIBRARIES
319     ${WTF_LIBRARY_NAME}
320     ${JavaScriptCore_LIBRARY_NAME}
321     ${WebCore_LIBRARY_NAME}
322     ${WebKit2_LIBRARY_NAME}
323     ${CAIRO_LIBRARIES}
324     ${ECORE_LIBRARIES}
325     ${ECORE_EVAS_LIBRARIES}
326     ${EVAS_LIBRARIES}
327     ${GLIB_LIBRARIES}
328     ${GLIB_GIO_LIBRARIES}
329     ${GLIB_GOBJECT_LIBRARIES}
330     ${GLIB_GTHREAD_LIBRARIES}
331     ${LIBSOUP_LIBRARIES}
332     gtest
333 )
334
335 set(WEBKIT2_EFL_TEST_DIR "${WEBKIT2_DIR}/UIProcess/API/efl/tests")
336 set(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
337 set(TEST_INJECTED_BUNDLE_DIR ${WEBKIT2_EFL_TEST_DIR}/InjectedBundle)
338
339 add_definitions(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
340     -DTEST_LIB_DIR=\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\"
341     -DTEST_THEME_DIR=\"${THEME_BINARY_DIR}\"
342     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
343     -DLIBEXECDIR=\"${CMAKE_INSTALL_PREFIX}/${EXEC_INSTALL_DIR}\"
344     -DWEBPROCESSNAME=\"${WebProcess_EXECUTABLE_NAME}\"
345     -DPLUGINPROCESSNAME=\"${PluginProcess_EXECUTABLE_NAME}\"
346 )
347
348 add_library(ewk2UnitTestUtils
349     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestBase.cpp
350     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestEnvironment.cpp
351     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestMain.cpp
352     ${WEBKIT2_EFL_TEST_DIR}/UnitTestUtils/EWK2UnitTestServer.cpp
353 )
354
355 target_link_libraries(ewk2UnitTestUtils ${EWK2UnitTests_LIBRARIES})
356
357 # The "ewk" on the test name needs to be suffixed with "2", otherwise it
358 # will clash with tests from the WebKit 1 test suite.
359 set(EWK2UnitTests_BINARIES
360     test_ewk2_auth_request
361     test_ewk2_back_forward_list
362     test_ewk2_color_picker
363     test_ewk2_context
364     test_ewk2_context_history_callbacks
365     test_ewk2_context_menu
366     test_ewk2_cookie_manager
367     test_ewk2_database_manager
368     test_ewk2_download_job
369     test_ewk2_eina_shared_string
370     test_ewk2_favicon_database
371     test_ewk2_file_chooser_request
372     test_ewk2_intents
373     test_ewk2_object
374     test_ewk2_popup_menu
375     test_ewk2_refptr_evas_object
376     test_ewk2_settings
377     test_ewk2_storage_manager
378     test_ewk2_text_checker
379     test_ewk2_view
380     test_ewk2_window_features
381 )
382
383 if (ENABLE_API_TESTS)
384     foreach (testName ${EWK2UnitTests_BINARIES})
385         add_executable(${testName} ${WEBKIT2_EFL_TEST_DIR}/${testName}.cpp)
386         add_test(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
387         set_tests_properties(${testName} PROPERTIES TIMEOUT 60)
388         target_link_libraries(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
389     endforeach ()
390
391     add_library(ewk2UnitTestInjectedBundleSample SHARED ${TEST_INJECTED_BUNDLE_DIR}/injected_bundle_sample.cpp)
392     target_link_libraries(ewk2UnitTestInjectedBundleSample ${WebKit2_LIBRARY_NAME})
393 endif ()
394
395 if (ENABLE_SPELLCHECK)
396     list(APPEND WebKit2_INCLUDE_DIRECTORIES
397         ${ENCHANT_INCLUDE_DIRS}
398     )
399     list(APPEND WebKit2_LIBRARIES
400         ${ENCHANT_LIBRARIES}
401     )
402 endif ()