Replace remaning CoreIPC namespace to IPC
[WebKit-https.git] / Source / WebKit2 / PlatformGTK.cmake
1 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2_DIR})
2 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR})
3 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_DIR})
4 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR})
5
6 configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h)
7 configure_file(webkit2gtk.pc.in ${CMAKE_BINARY_DIR}/Source/WebKit2/webkit2gtk-3.0.pc @ONLY)
8
9 add_definitions(-DWEBKIT2_COMPILATION)
10 add_definitions(-DLIBEXECDIR="${CMAKE_INSTALL_FULL_LIBEXECDIR}")
11 add_definitions(-DPACKAGE_LOCALE_DIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
12 add_definitions(-DLIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}")
13
14 list(APPEND WebKit2_SOURCES
15     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
16     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
17
18     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
19     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
20
21     Platform/IPC/unix/AttachmentUnix.cpp
22     Platform/IPC/unix/ConnectionUnix.cpp
23
24     Platform/gtk/LoggingGtk.cpp
25     Platform/gtk/ModuleGtk.cpp
26     Platform/gtk/WorkQueueGtk.cpp
27
28     Platform/unix/SharedMemoryUnix.cpp
29
30     PluginProcess/unix/PluginControllerProxyUnix.cpp
31     PluginProcess/unix/PluginProcessMainUnix.cpp
32     PluginProcess/unix/PluginProcessUnix.cpp
33
34     Shared/API/c/cairo/WKImageCairo.cpp
35
36     Shared/Downloads/gtk/DownloadSoupErrorsGtk.cpp
37
38     Shared/Downloads/soup/DownloadSoup.cpp
39
40     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
41
42     Shared/cairo/ShareableBitmapCairo.cpp
43
44     Shared/gtk/ArgumentCodersGtk.cpp
45     Shared/gtk/LayerTreeContextGtk.cpp
46     Shared/gtk/NativeWebKeyboardEventGtk.cpp
47     Shared/gtk/NativeWebMouseEventGtk.cpp
48     Shared/gtk/NativeWebWheelEventGtk.cpp
49     Shared/gtk/PrintInfoGtk.cpp
50     Shared/gtk/ProcessExecutablePathGtk.cpp
51     Shared/gtk/WebEventFactory.cpp
52
53     Shared/linux/WebMemorySamplerLinux.cpp
54
55     Shared/linux/SeccompFilters/OpenSyscall.cpp
56     Shared/linux/SeccompFilters/SeccompBroker.cpp
57     Shared/linux/SeccompFilters/SeccompFilters.cpp
58     Shared/linux/SeccompFilters/SigactionSyscall.cpp
59     Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp
60     Shared/linux/SeccompFilters/Syscall.cpp
61     Shared/linux/SeccompFilters/SyscallPolicy.cpp
62
63     Shared/soup/WebCoreArgumentCodersSoup.cpp
64
65     UIProcess/DefaultUndoController.cpp
66     UIProcess/DrawingAreaProxyImpl.cpp
67
68     UIProcess/API/C/CoordinatedGraphics/WKView.cpp
69
70     UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp
71
72     UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp
73     UIProcess/API/C/gtk/WKInspectorClientGtk.cpp
74     UIProcess/API/C/gtk/WKView.cpp
75
76     UIProcess/API/C/soup/WKContextSoup.cpp
77     UIProcess/API/C/soup/WKCookieManagerSoup.cpp
78     UIProcess/API/C/soup/WKSoupRequestManager.cpp
79
80     UIProcess/API/gtk/PageClientImpl.cpp
81     UIProcess/API/gtk/PageClientImpl.h
82     UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
83     UIProcess/API/gtk/WebKitAuthenticationDialog.h
84     UIProcess/API/gtk/WebKitAuthenticationRequest.cpp
85     UIProcess/API/gtk/WebKitAuthenticationRequest.h
86     UIProcess/API/gtk/WebKitBackForwardList.cpp
87     UIProcess/API/gtk/WebKitBackForwardList.h
88     UIProcess/API/gtk/WebKitBackForwardListItem.cpp
89     UIProcess/API/gtk/WebKitBackForwardListItem.h
90     UIProcess/API/gtk/WebKitBackForwardListPrivate.h
91     UIProcess/API/gtk/WebKitCertificateInfo.cpp
92     UIProcess/API/gtk/WebKitCertificateInfo.h
93     UIProcess/API/gtk/WebKitCertificateInfoPrivate.h
94     UIProcess/API/gtk/WebKitContextMenu.cpp
95     UIProcess/API/gtk/WebKitContextMenu.h
96     UIProcess/API/gtk/WebKitContextMenuActions.cpp
97     UIProcess/API/gtk/WebKitContextMenuActions.h
98     UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h
99     UIProcess/API/gtk/WebKitContextMenuClient.cpp
100     UIProcess/API/gtk/WebKitContextMenuClient.h
101     UIProcess/API/gtk/WebKitContextMenuItem.cpp
102     UIProcess/API/gtk/WebKitContextMenuItem.h
103     UIProcess/API/gtk/WebKitContextMenuItemPrivate.h
104     UIProcess/API/gtk/WebKitContextMenuPrivate.h
105     UIProcess/API/gtk/WebKitCookieManager.cpp
106     UIProcess/API/gtk/WebKitCookieManager.h
107     UIProcess/API/gtk/WebKitCookieManagerPrivate.h
108     UIProcess/API/gtk/WebKitCredential.cpp
109     UIProcess/API/gtk/WebKitCredential.h
110     UIProcess/API/gtk/WebKitDefines.h
111     UIProcess/API/gtk/WebKitDownload.cpp
112     UIProcess/API/gtk/WebKitDownload.h
113     UIProcess/API/gtk/WebKitDownloadClient.cpp
114     UIProcess/API/gtk/WebKitDownloadClient.h
115     UIProcess/API/gtk/WebKitDownloadPrivate.h
116     UIProcess/API/gtk/WebKitEditingCommands.h
117     UIProcess/API/gtk/WebKitError.cpp
118     UIProcess/API/gtk/WebKitError.h
119     UIProcess/API/gtk/WebKitFaviconDatabase.cpp
120     UIProcess/API/gtk/WebKitFaviconDatabase.h
121     UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h
122     UIProcess/API/gtk/WebKitFileChooserRequest.cpp
123     UIProcess/API/gtk/WebKitFileChooserRequest.h
124     UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h
125     UIProcess/API/gtk/WebKitFindController.cpp
126     UIProcess/API/gtk/WebKitFindController.h
127     UIProcess/API/gtk/WebKitFormClient.cpp
128     UIProcess/API/gtk/WebKitFormClient.h
129     UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp
130     UIProcess/API/gtk/WebKitFormSubmissionRequest.h
131     UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h
132     UIProcess/API/gtk/WebKitForwardDeclarations.h
133     UIProcess/API/gtk/WebKitFullscreenClient.cpp
134     UIProcess/API/gtk/WebKitFullscreenClient.h
135     UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp
136     UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
137     UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h
138     UIProcess/API/gtk/WebKitGeolocationProvider.cpp
139     UIProcess/API/gtk/WebKitGeolocationProvider.h
140     UIProcess/API/gtk/WebKitHitTestResult.cpp
141     UIProcess/API/gtk/WebKitHitTestResult.h
142     UIProcess/API/gtk/WebKitHitTestResultPrivate.h
143     UIProcess/API/gtk/WebKitInjectedBundleClient.cpp
144     UIProcess/API/gtk/WebKitInjectedBundleClient.h
145     UIProcess/API/gtk/WebKitJavascriptResult.cpp
146     UIProcess/API/gtk/WebKitJavascriptResult.h
147     UIProcess/API/gtk/WebKitJavascriptResultPrivate.h
148     UIProcess/API/gtk/WebKitLoaderClient.cpp
149     UIProcess/API/gtk/WebKitLoaderClient.h
150     UIProcess/API/gtk/WebKitMimeInfo.cpp
151     UIProcess/API/gtk/WebKitMimeInfo.h
152     UIProcess/API/gtk/WebKitMimeInfoPrivate.h
153     UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp
154     UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
155     UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h
156     UIProcess/API/gtk/WebKitPermissionRequest.cpp
157     UIProcess/API/gtk/WebKitPermissionRequest.h
158     UIProcess/API/gtk/WebKitPlugin.cpp
159     UIProcess/API/gtk/WebKitPlugin.h
160     UIProcess/API/gtk/WebKitPluginPrivate.h
161     UIProcess/API/gtk/WebKitPolicyClient.cpp
162     UIProcess/API/gtk/WebKitPolicyClient.h
163     UIProcess/API/gtk/WebKitPolicyDecision.cpp
164     UIProcess/API/gtk/WebKitPolicyDecision.h
165     UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h
166     UIProcess/API/gtk/WebKitPrintOperation.cpp
167     UIProcess/API/gtk/WebKitPrintOperation.h
168     UIProcess/API/gtk/WebKitPrintOperationPrivate.h
169     UIProcess/API/gtk/WebKitPrivate.cpp
170     UIProcess/API/gtk/WebKitPrivate.h
171     UIProcess/API/gtk/WebKitRequestManagerClient.cpp
172     UIProcess/API/gtk/WebKitRequestManagerClient.h
173     UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp
174     UIProcess/API/gtk/WebKitResponsePolicyDecision.h
175     UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h
176     UIProcess/API/gtk/WebKitScriptDialog.cpp
177     UIProcess/API/gtk/WebKitScriptDialog.h
178     UIProcess/API/gtk/WebKitScriptDialogPrivate.h
179     UIProcess/API/gtk/WebKitSecurityManager.cpp
180     UIProcess/API/gtk/WebKitSecurityManager.h
181     UIProcess/API/gtk/WebKitSecurityManagerPrivate.h
182     UIProcess/API/gtk/WebKitSettings.cpp
183     UIProcess/API/gtk/WebKitSettings.h
184     UIProcess/API/gtk/WebKitSettingsPrivate.h
185     UIProcess/API/gtk/WebKitTextChecker.cpp
186     UIProcess/API/gtk/WebKitTextChecker.h
187     UIProcess/API/gtk/WebKitUIClient.cpp
188     UIProcess/API/gtk/WebKitUIClient.h
189     UIProcess/API/gtk/WebKitURIRequest.cpp
190     UIProcess/API/gtk/WebKitURIRequest.h
191     UIProcess/API/gtk/WebKitURIRequestPrivate.h
192     UIProcess/API/gtk/WebKitURIResponse.cpp
193     UIProcess/API/gtk/WebKitURIResponse.h
194     UIProcess/API/gtk/WebKitURIResponsePrivate.h
195     UIProcess/API/gtk/WebKitURISchemeRequest.cpp
196     UIProcess/API/gtk/WebKitURISchemeRequest.h
197     UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h
198     UIProcess/API/gtk/WebKitVersion.cpp
199     UIProcess/API/gtk/WebKitVersion.h.in
200     UIProcess/API/gtk/WebKitWebContext.cpp
201     UIProcess/API/gtk/WebKitWebContext.h
202     UIProcess/API/gtk/WebKitWebContextPrivate.h
203     UIProcess/API/gtk/WebKitWebInspector.cpp
204     UIProcess/API/gtk/WebKitWebInspector.h
205     UIProcess/API/gtk/WebKitWebInspectorPrivate.h
206     UIProcess/API/gtk/WebKitWebResource.cpp
207     UIProcess/API/gtk/WebKitWebResource.h
208     UIProcess/API/gtk/WebKitWebResourcePrivate.h
209     UIProcess/API/gtk/WebKitWebView.cpp
210     UIProcess/API/gtk/WebKitWebView.h
211     UIProcess/API/gtk/WebKitWebViewBase.cpp
212     UIProcess/API/gtk/WebKitWebViewBase.h
213     UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp
214     UIProcess/API/gtk/WebKitWebViewBaseAccessible.h
215     UIProcess/API/gtk/WebKitWebViewBasePrivate.h
216     UIProcess/API/gtk/WebKitWebViewGroup.cpp
217     UIProcess/API/gtk/WebKitWebViewGroup.h
218     UIProcess/API/gtk/WebKitWebViewGroupPrivate.h
219     UIProcess/API/gtk/WebKitWebViewPrivate.h
220     UIProcess/API/gtk/WebKitWindowProperties.cpp
221     UIProcess/API/gtk/WebKitWindowProperties.h
222     UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h
223     UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp
224     UIProcess/API/gtk/WebViewBaseInputMethodFilter.h
225     UIProcess/API/gtk/webkit2.h
226
227     UIProcess/CoordinatedGraphics/WebView.cpp
228     UIProcess/CoordinatedGraphics/WebViewClient.cpp
229
230     UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp
231
232     UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp
233
234     UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
235
236     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
237     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
238
239     UIProcess/Storage/StorageManager.cpp
240
241     UIProcess/cairo/BackingStoreCairo.cpp
242
243     UIProcess/gtk/ExperimentalFeatures.cpp
244     UIProcess/gtk/TextCheckerGtk.cpp
245     UIProcess/gtk/WebContextGtk.cpp
246     UIProcess/gtk/WebContextMenuProxyGtk.cpp
247     UIProcess/gtk/WebFullScreenClientGtk.cpp
248     UIProcess/gtk/WebInspectorClientGtk.cpp
249     UIProcess/gtk/WebInspectorProxyGtk.cpp
250     UIProcess/gtk/WebPageProxyGtk.cpp
251     UIProcess/gtk/WebPopupMenuProxyGtk.cpp
252     UIProcess/gtk/WebPreferencesGtk.cpp
253     UIProcess/gtk/WebProcessProxyGtk.cpp
254
255     UIProcess/soup/WebCookieManagerProxySoup.cpp
256     UIProcess/soup/WebSoupRequestManagerClient.cpp
257     UIProcess/soup/WebSoupRequestManagerProxy.cpp
258
259     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
260     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
261
262     WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp
263     WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp
264     WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp
265     WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp
266
267     WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp
268
269     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
270
271     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
272
273     WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp
274     WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp
275     WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
276     WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp
277     WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp
278
279     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
280
281     WebProcess/WebPage/DrawingAreaImpl.cpp
282
283     WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
284
285     WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
286     WebProcess/WebPage/gtk/WebInspectorGtk.cpp
287     WebProcess/WebPage/gtk/WebPageGtk.cpp
288     WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
289
290     WebProcess/gtk/WebGtkExtensionManager.cpp
291     WebProcess/gtk/WebGtkInjectedBundleMain.cpp
292     WebProcess/gtk/WebProcessMainGtk.cpp
293
294     WebProcess/soup/WebKitSoupRequestGeneric.cpp
295     WebProcess/soup/WebKitSoupRequestInputStream.cpp
296     WebProcess/soup/WebProcessSoup.cpp
297     WebProcess/soup/WebSoupRequestManager.cpp
298 )
299
300 set(WebKit2_INSTALLED_HEADERS
301     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitAuthenticationRequest.h
302     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardList.h
303     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardListItem.h
304     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCertificateInfo.h
305     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCredential.h
306     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
307     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
308     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
309     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCookieManager.h
310     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDefines.h
311     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDownload.h
312     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEditingCommands.h
313     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitError.h
314     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFaviconDatabase.h
315     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFileChooserRequest.h
316     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFindController.h
317     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFormSubmissionRequest.h
318     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitForwardDeclarations.h
319     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
320     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
321     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitJavascriptResult.h
322     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitMimeInfo.h
323     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
324     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPermissionRequest.h
325     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPlugin.h
326     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPolicyDecision.h
327     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPrintOperation.h
328     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitResponsePolicyDecision.h
329     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitScriptDialog.h
330     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSecurityManager.h
331     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSettings.h
332     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
333     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
334     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURISchemeRequest.h
335     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebContext.h
336     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebInspector.h
337     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebResource.h
338     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebView.h
339     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewBase.h
340     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewGroup.h
341     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWindowProperties.h
342     ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2.h
343 )
344
345 set(WebKit2WebExtension_INSTALLED_HEADERS
346     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitFrame.h
347     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h
348     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h
349     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
350     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
351 )
352
353 file(GLOB InspectorFiles
354     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
355     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.css
356     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*
357     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html
358     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/*.png
359     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/*.svg
360     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.js
361 )
362
363 list(APPEND WebKit2_MESSAGES_IN_FILES
364     UIProcess/soup/WebSoupRequestManagerProxy.messages.in
365
366     WebProcess/soup/WebSoupRequestManager.messages.in
367 )
368
369 # This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore.
370 list(INSERT WebKit2_INCLUDE_DIRECTORIES 0
371     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
372     "${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}"
373     "${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}"
374     "${DERIVED_SOURCES_WEBKIT2GTK_DIR}"
375 )
376
377 list(APPEND WebKit2_INCLUDE_DIRECTORIES
378     "${WEBCORE_DIR}/platform/cairo"
379     "${WEBCORE_DIR}/platform/gtk"
380     "${WEBCORE_DIR}/platform/graphics/cairo"
381     "${WEBCORE_DIR}/platform/graphics/opentype"
382     "${WEBCORE_DIR}/platform/network/soup"
383     "${WEBCORE_DIR}/platform/text/enchant"
384     "${WEBKIT2_DIR}/Shared/API/c/gtk"
385     "${WEBKIT2_DIR}/Shared/Downloads/soup"
386     "${WEBKIT2_DIR}/Shared/gtk"
387     "${WEBKIT2_DIR}/Shared/soup"
388     "${WEBKIT2_DIR}/UIProcess/API/C/cairo"
389     "${WEBKIT2_DIR}/UIProcess/API/C/gtk"
390     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
391     "${WEBKIT2_DIR}/UIProcess/API/cpp/gtk"
392     "${WEBKIT2_DIR}/UIProcess/API/gtk"
393     "${WEBKIT2_DIR}/UIProcess/gtk"
394     "${WEBKIT2_DIR}/UIProcess/soup"
395     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk"
396     "${WEBKIT2_DIR}/WebProcess/gtk"
397     "${WEBKIT2_DIR}/WebProcess/soup"
398     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/gtk"
399     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
400     "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
401     "${WEBKIT2_DIR}/WebProcess/WebPage/gtk"
402     "${WTF_DIR}/wtf/gtk/"
403     "${WTF_DIR}/wtf/gobject"
404     ${WTF_DIR}
405     ${CAIRO_INCLUDE_DIRS}
406     ${ENCHANT_INCLUDE_DIRS}
407     ${LIBSOUP_INCLUDE_DIRS}
408 )
409
410 set(WebKit2CommonIncludeDirectories ${WebKit2_INCLUDE_DIRECTORIES})
411
412 list(APPEND WebKit2_INCLUDE_DIRECTORIES
413     ${GLIB_INCLUDE_DIRS}
414     ${GTK3_INCLUDE_DIRS}
415 )
416
417 list(APPEND WebProcess_SOURCES
418     gtk/MainGtk.cpp
419 )
420
421 set(SharedWebKit2Libraries
422     ${WebKit2_LIBRARIES}
423 )
424
425 # Since the GObjectDOMBindings convenience library exports API that is unused except
426 # in embedding applications we need to instruct the linker to link all symbols explicitly.
427 list(APPEND WebKit2_LIBRARIES
428     -Wl,--whole-archive GObjectDOMBindings -Wl,--no-whole-archive
429     WebCorePlatformGTK
430 )
431
432 set(WebKit2_MARSHAL_LIST ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2marshal.list)
433 add_custom_command(
434     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
435            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.h
436     MAIN_DEPENDENCY ${WebKit2_MARSHAL_LIST}
437
438     COMMAND echo extern \"C\" { > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
439     COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --body >> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
440     COMMAND echo } >> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
441
442     COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --header > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.h
443     VERBATIM)
444
445 add_custom_command(
446     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
447            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
448     DEPENDS ${WebKit2_INSTALLED_HEADERS}
449
450     COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.h.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
451
452     COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.cpp.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
453     VERBATIM)
454
455 add_custom_command(
456     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
457     DEPENDS ${InspectorFiles}
458             ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py
459     COMMAND ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
460     VERBATIM
461 )
462
463 add_custom_command(
464     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
465     DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
466             ${InspectorFiles}
467     COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebInspectorUI --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
468     VERBATIM
469 )
470
471 add_custom_command(
472     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
473     DEPENDS ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
474             ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
475     COMMAND glib-compile-resources --generate --sourcedir=${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
476     VERBATIM
477 )
478
479 add_custom_target(webkit2gtk-forwarding-headers
480     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} gtk
481     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} soup
482
483     # These symbolic link allows includes like #include <webkit2/WebkitWebView.h> which simulates installed headers.
484     COMMAND ln -n -s -f ${WEBKIT2_DIR}/UIProcess/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
485     COMMAND ln -n -s -f ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
486 )
487
488 set(WEBKIT2_EXTRA_DEPENDENCIES
489      webkit2gtk-forwarding-headers
490 )
491
492 if (ENABLE_PLUGIN_PROCESS)
493     set(PluginProcess_EXECUTABLE_NAME WebKitPluginProcess)
494     list(APPEND PluginProcess_INCLUDE_DIRECTORIES
495         "${WEBKIT2_DIR}/PluginProcess/unix"
496     )
497
498     include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
499
500     # FIXME: We should figure out a way to avoid compiling files that are common between the plugin
501     # process and WebKit2 only once instead of recompiling them for the plugin process.
502     list(APPEND PluginProcess_SOURCES
503         Platform/Logging.cpp
504         Platform/Module.cpp
505         Platform/WorkQueue.cpp
506
507         Platform/IPC/ArgumentCoders.cpp
508         Platform/IPC/ArgumentDecoder.cpp
509         Platform/IPC/ArgumentEncoder.cpp
510         Platform/IPC/Attachment.cpp
511         Platform/IPC/Connection.cpp
512         Platform/IPC/DataReference.cpp
513         Platform/IPC/MessageDecoder.cpp
514         Platform/IPC/MessageEncoder.cpp
515         Platform/IPC/MessageReceiverMap.cpp
516         Platform/IPC/MessageSender.cpp
517         Platform/IPC/StringReference.cpp
518
519         Platform/IPC/unix/AttachmentUnix.cpp
520         Platform/IPC/unix/ConnectionUnix.cpp
521
522         Platform/gtk/LoggingGtk.cpp
523         Platform/gtk/ModuleGtk.cpp
524         Platform/gtk/WorkQueueGtk.cpp
525
526         Platform/unix/SharedMemoryUnix.cpp
527
528         PluginProcess/PluginControllerProxy.cpp
529         PluginProcess/PluginCreationParameters.cpp
530         PluginProcess/PluginProcess.cpp
531         PluginProcess/WebProcessConnection.cpp
532
533         PluginProcess/unix/PluginControllerProxyUnix.cpp
534         PluginProcess/unix/PluginProcessMainUnix.cpp
535         PluginProcess/unix/PluginProcessUnix.cpp
536
537         Shared/ActivityAssertion.cpp
538         Shared/ChildProcess.cpp
539         Shared/ChildProcessProxy.cpp
540         Shared/ConnectionStack.cpp
541         Shared/ShareableBitmap.cpp
542         Shared/WebCoreArgumentCoders.cpp
543         Shared/WebEvent.cpp
544         Shared/WebKeyboardEvent.cpp
545         Shared/WebKit2Initialize.cpp
546         Shared/WebMouseEvent.cpp
547         Shared/WebWheelEvent.cpp
548
549         Shared/Plugins/NPIdentifierData.cpp
550         Shared/Plugins/NPObjectMessageReceiver.cpp
551         Shared/Plugins/NPObjectProxy.cpp
552         Shared/Plugins/NPRemoteObjectMap.cpp
553         Shared/Plugins/NPVariantData.cpp
554         Shared/Plugins/PluginProcessCreationParameters.cpp
555
556         Shared/Plugins/Netscape/NetscapePluginModule.cpp
557         Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp
558
559         Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
560
561         Shared/cairo/ShareableBitmapCairo.cpp
562
563         Shared/gtk/NativeWebKeyboardEventGtk.cpp
564         Shared/gtk/NativeWebMouseEventGtk.cpp
565         Shared/gtk/NativeWebWheelEventGtk.cpp
566         Shared/gtk/ProcessExecutablePathGtk.cpp
567         Shared/gtk/WebEventFactory.cpp
568
569         Shared/soup/WebCoreArgumentCodersSoup.cpp
570
571         UIProcess/Launcher/ProcessLauncher.cpp
572
573         UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
574
575         UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
576
577         WebProcess/Plugins/Plugin.cpp
578
579         WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp
580         WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
581         WebProcess/Plugins/Netscape/NetscapePlugin.cpp
582         WebProcess/Plugins/Netscape/NetscapePluginNone.cpp
583         WebProcess/Plugins/Netscape/NetscapePluginStream.cpp
584
585         WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
586
587         unix/PluginMainUnix.cpp
588     )
589
590     list(APPEND PluginProcess_MESSAGES_IN_FILES
591         PluginProcess/PluginControllerProxy.messages.in
592         PluginProcess/PluginProcess.messages.in
593         PluginProcess/WebProcessConnection.messages.in
594
595         Shared/Plugins/NPObjectMessageReceiver.messages.in
596     )
597     GENERATE_WEBKIT2_MESSAGE_SOURCES(PluginProcess_SOURCES "${PluginProcess_MESSAGES_IN_FILES}")
598
599     add_executable(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_SOURCES})
600
601     # We need ENABLE_PLUGIN_PROCESS for all targets in this directory, but
602     # we only want GTK_API_VERSION_2 for the plugin process target.
603     add_definitions(-DENABLE_PLUGIN_PROCESS=1)
604     set_property(
605         TARGET ${PluginProcess_EXECUTABLE_NAME}
606         APPEND
607         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
608     )
609     set_property(
610         TARGET ${PluginProcess_EXECUTABLE_NAME}
611         APPEND
612         PROPERTY INCLUDE_DIRECTORIES
613             ${WebKit2CommonIncludeDirectories}
614             ${GTK2_INCLUDE_DIRS}
615             ${GDK2_INCLUDE_DIRS}
616     )
617
618     target_link_libraries(${PluginProcess_EXECUTABLE_NAME}
619         ${SharedWebKit2Libraries}
620         WebCorePlatformGTK2
621         WebCore
622     )
623
624     add_dependencies(${PluginProcess_EXECUTABLE_NAME} WebKit2)
625
626     install(TARGETS ${PluginProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
627 endif () # ENABLE_PLUGIN_PROCESS
628
629 # Commands for building the built-in injected bundle.
630 include_directories(
631     "${WEBKIT2_DIR}/Platform"
632     "${WEBKIT2_DIR}/Shared"
633     "${WEBKIT2_DIR}/Shared/API/c"
634     "${WEBKIT2_DIR}/UIProcess/API/C"
635     "${WEBKIT2_DIR}/WebProcess/InjectedBundle"
636     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c"
637     "${DERIVED_SOURCES_DIR}"
638     "${DERIVED_SOURCES_DIR}/InjectedBundle"
639     "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
640     "${FORWARDING_HEADERS_DIR}"
641     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
642 )
643
644 add_library(webkit2gtkinjectedbundle MODULE
645     "${WEBKIT2_DIR}/WebProcess/gtk/WebGtkInjectedBundleMain.cpp"
646 )
647 add_dependencies(webkit2gtkinjectedbundle GObjectDOMBindings)
648
649 add_custom_command(
650     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
651     DEPENDS WebKit2
652     DEPENDS JavaScriptCore-3-gir
653     COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
654         g-ir-scanner
655         --quiet
656         --warn-all
657         --symbol-prefix=webkit
658         --identifier-prefix=WebKit
659         --namespace=WebKit2
660         --nsversion=3.0
661         --include=GObject-2.0
662         --include=Gtk-3.0
663         --include=Soup-2.4
664         --include-uninstalled=${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir
665         --library=webkit2gtk-3.0
666         --library=javascriptcoregtk-3.0
667         -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
668         --no-libtool
669         --pkg=gobject-2.0
670         --pkg=gtk+-3.0
671         --pkg=libsoup-2.4
672         --pkg-export=webkit2gtk-3.0
673         --output=${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
674         --c-include="webkit2/webkit2.h"
675         -DBUILDING_WEBKIT
676         -DWEBKIT2_COMPILATION
677         -I${CMAKE_SOURCE_DIR}/Source
678         -I${WEBKIT2_DIR}
679         -I${JAVASCRIPTCORE_DIR}/ForwardingHeaders
680         -I${DERIVED_SOURCES_DIR}
681         -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}
682         -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
683         ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
684         ${WebKit2_INSTALLED_HEADERS}
685         ${WEBKIT2_DIR}/UIProcess/API/gtk/*.cpp
686 )
687
688 add_custom_command(
689     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir
690     DEPENDS JavaScriptCore-3-gir
691     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
692     COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
693         g-ir-scanner
694         --quiet
695         --warn-all
696         --symbol-prefix=webkit
697         --identifier-prefix=WebKit
698         --namespace=WebKit2WebExtension
699         --nsversion=3.0
700         --include=GObject-2.0
701         --include=Gtk-3.0
702         --include=Soup-2.4
703         --include-uninstalled=${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir
704         --include-uninstalled=${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
705         --library=webkit2gtk-3.0
706         --library=javascriptcoregtk-3.0
707         -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
708         --no-libtool
709         --pkg=gobject-2.0
710         --pkg=gtk+-3.0
711         --pkg=libsoup-2.4
712         --pkg-export=webkit2gtk-3.0
713         --output=${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir
714         --c-include="webkit2/webkit-web-extension.h"
715         -DBUILDING_WEBKIT
716         -DWEBKIT2_COMPILATION
717         -I${CMAKE_SOURCE_DIR}/Source
718         -I${WEBKIT2_DIR}
719         -I${JAVASCRIPTCORE_DIR}/ForwardingHeaders
720         -I${DERIVED_SOURCES_DIR}
721         -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}
722         -I${FORWARDING_HEADERS_DIR}
723         -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
724         -I${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}
725         -I${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk
726         ${GObjectDOMBindings_INSTALLED_HEADERS}
727         ${WebKit2WebExtension_INSTALLED_HEADERS}
728         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/*.cpp
729 )
730
731 add_custom_command(
732     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib
733     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
734     COMMAND g-ir-compiler --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib
735 )
736
737 add_custom_command(
738     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib
739     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir
740     COMMAND g-ir-compiler --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib
741 )
742
743 ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib)
744 ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib)