.:
[WebKit-https.git] / Source / WebKit2 / PlatformGTK.cmake
1 set(WebKit2_OUTPUT_NAME webkit2gtk-${WEBKITGTK_API_VERSION})
2 set(WebKit2_WebProcess_OUTPUT_NAME WebKitWebProcess)
3 set(WebKit2_NetworkProcess_OUTPUT_NAME WebKitNetworkProcess)
4 set(WebKit2_PluginProcess_OUTPUT_NAME WebKitPluginProcess)
5 set(WebKit2_DatabaseProcess_OUTPUT_NAME WebKitDatabaseProcess)
6
7 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2_DIR})
8 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR})
9 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_DIR})
10 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR})
11
12 configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h)
13 configure_file(webkit2gtk.pc.in ${WebKit2_PKGCONFIG_FILE} @ONLY)
14 configure_file(webkit2gtk-web-extension.pc.in ${WebKit2WebExtension_PKGCONFIG_FILE} @ONLY)
15
16 add_definitions(-DBUILDING_WEBKIT)
17 add_definitions(-DWEBKIT2_COMPILATION)
18
19 add_definitions(-DLIBEXECDIR="${CMAKE_INSTALL_FULL_LIBEXECDIR}")
20 add_definitions(-DPKGLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
21 add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
22 add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
23 add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
24
25 set(WebKit2_USE_PREFIX_HEADER ON)
26
27 list(APPEND WebKit2_SOURCES
28     DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp
29
30     NetworkProcess/CustomProtocols/soup/CustomProtocolManagerImpl.cpp
31     NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp
32
33     NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp
34
35     NetworkProcess/Downloads/soup/DownloadSoup.cpp
36
37     NetworkProcess/cache/NetworkCacheDataSoup.cpp
38     NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp
39
40     NetworkProcess/gtk/NetworkProcessMainGtk.cpp
41
42     NetworkProcess/soup/NetworkProcessSoup.cpp
43     NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
44
45     Platform/IPC/glib/GSocketMonitor.cpp
46     Platform/IPC/unix/AttachmentUnix.cpp
47     Platform/IPC/unix/ConnectionUnix.cpp
48
49     Platform/gtk/LoggingGtk.cpp
50     Platform/gtk/ModuleGtk.cpp
51
52     Platform/unix/SharedMemoryUnix.cpp
53
54     PluginProcess/unix/PluginControllerProxyUnix.cpp
55     PluginProcess/unix/PluginProcessMainUnix.cpp
56     PluginProcess/unix/PluginProcessUnix.cpp
57
58     Shared/API/c/cairo/WKImageCairo.cpp
59
60     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
61
62     Shared/Plugins/unix/PluginSearchPath.cpp
63
64     Shared/cairo/ShareableBitmapCairo.cpp
65
66     Shared/gtk/ArgumentCodersGtk.cpp
67     Shared/gtk/NativeWebKeyboardEventGtk.cpp
68     Shared/gtk/NativeWebMouseEventGtk.cpp
69     Shared/gtk/NativeWebTouchEventGtk.cpp
70     Shared/gtk/NativeWebWheelEventGtk.cpp
71     Shared/gtk/PrintInfoGtk.cpp
72     Shared/gtk/ProcessExecutablePathGtk.cpp
73     Shared/gtk/WebContextMenuItemGtk.cpp
74     Shared/gtk/WebEventFactory.cpp
75
76     Shared/linux/WebMemorySamplerLinux.cpp
77
78     Shared/linux/SeccompFilters/OpenSyscall.cpp
79     Shared/linux/SeccompFilters/SeccompBroker.cpp
80     Shared/linux/SeccompFilters/SeccompFilters.cpp
81     Shared/linux/SeccompFilters/SigactionSyscall.cpp
82     Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp
83     Shared/linux/SeccompFilters/Syscall.cpp
84     Shared/linux/SeccompFilters/SyscallPolicy.cpp
85     Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp
86
87     Shared/soup/WebCoreArgumentCodersSoup.cpp
88
89     Shared/unix/ChildProcessMain.cpp
90
91     UIProcess/BackingStore.cpp
92     UIProcess/DefaultUndoController.cpp
93     UIProcess/DrawingAreaProxyImpl.cpp
94     UIProcess/LegacySessionStateCodingNone.cpp
95
96     UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp
97
98     UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp
99     UIProcess/API/C/gtk/WKInspectorClientGtk.cpp
100     UIProcess/API/C/gtk/WKTextCheckerGtk.cpp
101     UIProcess/API/C/gtk/WKView.cpp
102
103     UIProcess/API/C/soup/WKCookieManagerSoup.cpp
104     UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp
105
106     UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp
107     UIProcess/API/gtk/PageClientImpl.cpp
108     UIProcess/API/gtk/PageClientImpl.h
109     UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
110     UIProcess/API/gtk/WebKitAuthenticationDialog.h
111     UIProcess/API/gtk/WebKitAuthenticationRequest.cpp
112     UIProcess/API/gtk/WebKitAuthenticationRequest.h
113     UIProcess/API/gtk/WebKitAutocleanups.h
114     UIProcess/API/gtk/WebKitBackForwardList.cpp
115     UIProcess/API/gtk/WebKitBackForwardList.h
116     UIProcess/API/gtk/WebKitBackForwardListItem.cpp
117     UIProcess/API/gtk/WebKitBackForwardListItem.h
118     UIProcess/API/gtk/WebKitBackForwardListPrivate.h
119     UIProcess/API/gtk/WebKitColorChooser.cpp
120     UIProcess/API/gtk/WebKitColorChooserRequest.cpp
121     UIProcess/API/gtk/WebKitContextMenu.cpp
122     UIProcess/API/gtk/WebKitContextMenu.h
123     UIProcess/API/gtk/WebKitContextMenuActions.cpp
124     UIProcess/API/gtk/WebKitContextMenuActions.h
125     UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h
126     UIProcess/API/gtk/WebKitContextMenuClient.cpp
127     UIProcess/API/gtk/WebKitContextMenuClient.h
128     UIProcess/API/gtk/WebKitContextMenuItem.cpp
129     UIProcess/API/gtk/WebKitContextMenuItem.h
130     UIProcess/API/gtk/WebKitContextMenuItemPrivate.h
131     UIProcess/API/gtk/WebKitContextMenuPrivate.h
132     UIProcess/API/gtk/WebKitCookieManager.cpp
133     UIProcess/API/gtk/WebKitCookieManager.h
134     UIProcess/API/gtk/WebKitCookieManagerPrivate.h
135     UIProcess/API/gtk/WebKitCredential.cpp
136     UIProcess/API/gtk/WebKitCredential.h
137     UIProcess/API/gtk/WebKitDefines.h
138     UIProcess/API/gtk/WebKitDownload.cpp
139     UIProcess/API/gtk/WebKitDownload.h
140     UIProcess/API/gtk/WebKitDownloadClient.cpp
141     UIProcess/API/gtk/WebKitDownloadClient.h
142     UIProcess/API/gtk/WebKitDownloadPrivate.h
143     UIProcess/API/gtk/WebKitEditingCommands.h
144     UIProcess/API/gtk/WebKitEditorState.cpp
145     UIProcess/API/gtk/WebKitError.cpp
146     UIProcess/API/gtk/WebKitError.h
147     UIProcess/API/gtk/WebKitFaviconDatabase.cpp
148     UIProcess/API/gtk/WebKitFaviconDatabase.h
149     UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h
150     UIProcess/API/gtk/WebKitFileChooserRequest.cpp
151     UIProcess/API/gtk/WebKitFileChooserRequest.h
152     UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h
153     UIProcess/API/gtk/WebKitFindController.cpp
154     UIProcess/API/gtk/WebKitFindController.h
155     UIProcess/API/gtk/WebKitFormClient.cpp
156     UIProcess/API/gtk/WebKitFormClient.h
157     UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp
158     UIProcess/API/gtk/WebKitFormSubmissionRequest.h
159     UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h
160     UIProcess/API/gtk/WebKitForwardDeclarations.h
161     UIProcess/API/gtk/WebKitFullscreenClient.cpp
162     UIProcess/API/gtk/WebKitFullscreenClient.h
163     UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp
164     UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
165     UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h
166     UIProcess/API/gtk/WebKitGeolocationProvider.cpp
167     UIProcess/API/gtk/WebKitGeolocationProvider.h
168     UIProcess/API/gtk/WebKitHitTestResult.cpp
169     UIProcess/API/gtk/WebKitHitTestResult.h
170     UIProcess/API/gtk/WebKitHitTestResultPrivate.h
171     UIProcess/API/gtk/WebKitInjectedBundleClient.cpp
172     UIProcess/API/gtk/WebKitInjectedBundleClient.h
173     UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp
174     UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.h
175     UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h
176     UIProcess/API/gtk/WebKitJavascriptResult.cpp
177     UIProcess/API/gtk/WebKitJavascriptResult.h
178     UIProcess/API/gtk/WebKitJavascriptResultPrivate.h
179     UIProcess/API/gtk/WebKitLoaderClient.cpp
180     UIProcess/API/gtk/WebKitLoaderClient.h
181     UIProcess/API/gtk/WebKitMimeInfo.cpp
182     UIProcess/API/gtk/WebKitMimeInfo.h
183     UIProcess/API/gtk/WebKitMimeInfoPrivate.h
184     UIProcess/API/gtk/WebKitNavigationAction.cpp
185     UIProcess/API/gtk/WebKitNavigationAction.h
186     UIProcess/API/gtk/WebKitNavigationActionPrivate.h
187     UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp
188     UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
189     UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h
190     UIProcess/API/gtk/WebKitNotification.cpp
191     UIProcess/API/gtk/WebKitNotification.h
192     UIProcess/API/gtk/WebKitNotificationPermissionRequest.cpp
193     UIProcess/API/gtk/WebKitNotificationPermissionRequest.h
194     UIProcess/API/gtk/WebKitNotificationPermissionRequestPrivate.h
195     UIProcess/API/gtk/WebKitNotificationPrivate.h
196     UIProcess/API/gtk/WebKitNotificationProvider.cpp
197     UIProcess/API/gtk/WebKitNotificationProvider.h
198     UIProcess/API/gtk/WebKitPermissionRequest.cpp
199     UIProcess/API/gtk/WebKitPermissionRequest.h
200     UIProcess/API/gtk/WebKitPlugin.cpp
201     UIProcess/API/gtk/WebKitPlugin.h
202     UIProcess/API/gtk/WebKitPluginPrivate.h
203     UIProcess/API/gtk/WebKitPolicyClient.cpp
204     UIProcess/API/gtk/WebKitPolicyClient.h
205     UIProcess/API/gtk/WebKitPolicyDecision.cpp
206     UIProcess/API/gtk/WebKitPolicyDecision.h
207     UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h
208     UIProcess/API/gtk/WebKitPrintOperation.cpp
209     UIProcess/API/gtk/WebKitPrintOperation.h
210     UIProcess/API/gtk/WebKitPrintOperationPrivate.h
211     UIProcess/API/gtk/WebKitPrivate.cpp
212     UIProcess/API/gtk/WebKitPrivate.h
213     UIProcess/API/gtk/WebKitRequestManagerClient.cpp
214     UIProcess/API/gtk/WebKitRequestManagerClient.h
215     UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp
216     UIProcess/API/gtk/WebKitResponsePolicyDecision.h
217     UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h
218     UIProcess/API/gtk/WebKitScriptDialog.cpp
219     UIProcess/API/gtk/WebKitScriptDialog.h
220     UIProcess/API/gtk/WebKitScriptDialogPrivate.h
221     UIProcess/API/gtk/WebKitSecurityManager.cpp
222     UIProcess/API/gtk/WebKitSecurityManager.h
223     UIProcess/API/gtk/WebKitSecurityManagerPrivate.h
224     UIProcess/API/gtk/WebKitSettings.cpp
225     UIProcess/API/gtk/WebKitSettings.h
226     UIProcess/API/gtk/WebKitSettingsPrivate.h
227     UIProcess/API/gtk/WebKitUIClient.cpp
228     UIProcess/API/gtk/WebKitUIClient.h
229     UIProcess/API/gtk/WebKitURIRequest.cpp
230     UIProcess/API/gtk/WebKitURIRequest.h
231     UIProcess/API/gtk/WebKitURIRequestPrivate.h
232     UIProcess/API/gtk/WebKitURIResponse.cpp
233     UIProcess/API/gtk/WebKitURIResponse.h
234     UIProcess/API/gtk/WebKitURIResponsePrivate.h
235     UIProcess/API/gtk/WebKitURISchemeRequest.cpp
236     UIProcess/API/gtk/WebKitURISchemeRequest.h
237     UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h
238     UIProcess/API/gtk/WebKitUserContent.cpp
239     UIProcess/API/gtk/WebKitUserContent.h
240     UIProcess/API/gtk/WebKitUserContentManager.cpp
241     UIProcess/API/gtk/WebKitUserContentManager.h
242     UIProcess/API/gtk/WebKitUserContentManagerPrivate.h
243     UIProcess/API/gtk/WebKitUserContentPrivate.h
244     UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp
245     UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h
246     UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h
247     UIProcess/API/gtk/WebKitVersion.cpp
248     UIProcess/API/gtk/WebKitVersion.h.in
249     UIProcess/API/gtk/WebKitWebContext.cpp
250     UIProcess/API/gtk/WebKitWebContext.h
251     UIProcess/API/gtk/WebKitWebContextPrivate.h
252     UIProcess/API/gtk/WebKitWebInspector.cpp
253     UIProcess/API/gtk/WebKitWebInspector.h
254     UIProcess/API/gtk/WebKitWebInspectorPrivate.h
255     UIProcess/API/gtk/WebKitWebResource.cpp
256     UIProcess/API/gtk/WebKitWebResource.h
257     UIProcess/API/gtk/WebKitWebResourcePrivate.h
258     UIProcess/API/gtk/WebKitWebView.cpp
259     UIProcess/API/gtk/WebKitWebView.h
260     UIProcess/API/gtk/WebKitWebViewBase.cpp
261     UIProcess/API/gtk/WebKitWebViewBase.h
262     UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp
263     UIProcess/API/gtk/WebKitWebViewBaseAccessible.h
264     UIProcess/API/gtk/WebKitWebViewBasePrivate.h
265     UIProcess/API/gtk/WebKitWebViewPrivate.h
266     UIProcess/API/gtk/WebKitWebViewSessionState.cpp
267     UIProcess/API/gtk/WebKitWebViewSessionState.h
268     UIProcess/API/gtk/WebKitWebViewSessionStatePrivate.h
269     UIProcess/API/gtk/WebKitWebsiteDataManager.cpp
270     UIProcess/API/gtk/WebKitWebsiteDataManager.h
271     UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h
272     UIProcess/API/gtk/WebKitWindowProperties.cpp
273     UIProcess/API/gtk/WebKitWindowProperties.h
274     UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h
275     UIProcess/API/gtk/webkit2.h
276
277     UIProcess/Databases/gtk/DatabaseProcessProxyGtk.cpp
278
279     UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp
280
281     UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp
282
283     UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
284
285     UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp
286     UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp
287     UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp
288
289     UIProcess/Network/soup/NetworkProcessProxySoup.cpp
290
291     UIProcess/Plugins/gtk/PluginInfoCache.cpp
292
293     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
294     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
295
296     UIProcess/Storage/StorageManager.cpp
297
298     UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp
299
300     UIProcess/cairo/BackingStoreCairo.cpp
301
302     UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp
303     UIProcess/gstreamer/WebPageProxyGStreamer.cpp
304
305     UIProcess/gtk/DragAndDropHandler.cpp
306     UIProcess/gtk/ExperimentalFeatures.cpp
307     UIProcess/gtk/GestureController.cpp
308     UIProcess/gtk/InputMethodFilter.cpp
309     UIProcess/gtk/KeyBindingTranslator.cpp
310     UIProcess/gtk/RedirectedXCompositeWindow.cpp
311     UIProcess/gtk/TextCheckerGtk.cpp
312     UIProcess/gtk/WebColorPickerGtk.cpp
313     UIProcess/gtk/WebContextMenuProxyGtk.cpp
314     UIProcess/gtk/WebFullScreenClientGtk.cpp
315     UIProcess/gtk/WebInspectorClientGtk.cpp
316     UIProcess/gtk/WebInspectorProxyGtk.cpp
317     UIProcess/gtk/WebPageProxyGtk.cpp
318     UIProcess/gtk/WebPopupMenuProxyGtk.cpp
319     UIProcess/gtk/WebPreferencesGtk.cpp
320     UIProcess/gtk/WebProcessPoolGtk.cpp
321     UIProcess/gtk/WebProcessProxyGtk.cpp
322
323     UIProcess/soup/WebCookieManagerProxySoup.cpp
324     UIProcess/soup/WebProcessPoolSoup.cpp
325
326     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
327     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
328
329     WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.cpp
330     WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp
331     WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp
332     WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp
333     WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp
334     WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp
335     WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp
336
337     WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp
338
339     WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
340
341     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
342
343     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
344
345     WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp
346     WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp
347     WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
348     WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp
349     WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp
350
351     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
352
353     WebProcess/WebPage/DrawingAreaImpl.cpp
354
355     WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
356
357     WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp
358
359     WebProcess/WebPage/gtk/PrinterListGtk.cpp
360     WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp
361     WebProcess/WebPage/gtk/WebPageGtk.cpp
362     WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
363
364     WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp
365     WebProcess/gtk/SeccompFiltersWebProcessGtk.h
366     WebProcess/gtk/WebGtkExtensionManager.cpp
367     WebProcess/gtk/WebGtkInjectedBundleMain.cpp
368     WebProcess/gtk/WebProcessMainGtk.cpp
369
370     WebProcess/soup/WebKitSoupRequestInputStream.cpp
371     WebProcess/soup/WebProcessSoup.cpp
372 )
373
374 list(APPEND WebKit2_DERIVED_SOURCES
375     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
376     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
377     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.c
378
379     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
380     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
381 )
382
383 set(WebKit2GTK_INSTALLED_HEADERS
384     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
385     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h
386     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitAuthenticationRequest.h
387     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitAutocleanups.h
388     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardList.h
389     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardListItem.h
390     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitColorChooserRequest.h
391     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCredential.h
392     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
393     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
394     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
395     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCookieManager.h
396     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDefines.h
397     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDownload.h
398     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEditingCommands.h
399     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEditorState.h
400     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitError.h
401     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFaviconDatabase.h
402     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFileChooserRequest.h
403     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFindController.h
404     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFormSubmissionRequest.h
405     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitForwardDeclarations.h
406     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
407     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
408     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.h
409     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitJavascriptResult.h
410     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitMimeInfo.h
411     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNavigationAction.h
412     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
413     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNotificationPermissionRequest.h
414     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNotification.h
415     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPermissionRequest.h
416     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPlugin.h
417     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPolicyDecision.h
418     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPrintOperation.h
419     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitResponsePolicyDecision.h
420     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitScriptDialog.h
421     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSecurityManager.h
422     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSettings.h
423     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
424     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
425     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURISchemeRequest.h
426     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitUserContent.h
427     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitUserContentManager.h
428     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h
429     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebContext.h
430     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebInspector.h
431     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebResource.h
432     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebView.h
433     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewBase.h
434     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewSessionState.h
435     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebsiteDataManager.h
436     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWindowProperties.h
437     ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2.h
438 )
439
440 set(WebKit2WebExtension_INSTALLED_HEADERS
441     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.h
442     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitFrame.h
443     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h
444     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.h
445     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h
446     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionAutocleanups.h
447     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.h
448     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
449     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
450 )
451
452 set(InspectorFiles
453     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html
454     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Base/*.js
455     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.css
456     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.js
457     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Debug/*.css
458     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Debug/*.js
459     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.css
460     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.js
461     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/ESLint/*.js
462     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/Esprima/*.js
463     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Models/*.js
464     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Protocol/*.js
465     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Test/*.js
466     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.css
467     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.js
468     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.png
469     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.svg
470     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
471 )
472
473 file(GLOB InspectorFilesDependencies
474     ${InspectorFiles}
475 )
476
477 # DerivedSources/JavaScriptCore/inspector/InspectorBackendCommands.js is
478 # expected in DerivedSources/WebInspectorUI/UserInterface/Protocol/.
479 add_custom_command(
480     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
481     DEPENDS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js
482     COMMAND cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
483 )
484
485 # This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore.
486 list(INSERT WebKit2_INCLUDE_DIRECTORIES 0
487     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
488     "${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}"
489     "${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}"
490     "${DERIVED_SOURCES_WEBKIT2GTK_DIR}"
491 )
492
493 list(APPEND WebKit2_INCLUDE_DIRECTORIES
494     "${WEBKIT2_DIR}/PluginProcess/unix"
495     "${WEBCORE_DIR}/platform/cairo"
496     "${WEBCORE_DIR}/platform/gtk"
497     "${WEBCORE_DIR}/platform/graphics/cairo"
498     "${WEBCORE_DIR}/platform/graphics/opentype"
499     "${WEBCORE_DIR}/platform/graphics/x11"
500     "${WEBCORE_DIR}/platform/network/soup"
501     "${WEBCORE_DIR}/platform/text/enchant"
502     "${WEBKIT2_DIR}/DatabaseProcess/unix"
503     "${WEBKIT2_DIR}/NetworkProcess/CustomProtocols/soup"
504     "${WEBKIT2_DIR}/NetworkProcess/Downloads/soup"
505     "${WEBKIT2_DIR}/NetworkProcess/gtk"
506     "${WEBKIT2_DIR}/NetworkProcess/unix"
507     "${WEBKIT2_DIR}/Platform/IPC/glib"
508     "${WEBKIT2_DIR}/Shared/API/c/gtk"
509     "${WEBKIT2_DIR}/Shared/Plugins/unix"
510     "${WEBKIT2_DIR}/Shared/glib"
511     "${WEBKIT2_DIR}/Shared/gtk"
512     "${WEBKIT2_DIR}/Shared/linux"
513     "${WEBKIT2_DIR}/Shared/linux/SeccompFilters"
514     "${WEBKIT2_DIR}/Shared/soup"
515     "${WEBKIT2_DIR}/Shared/unix"
516     "${WEBKIT2_DIR}/UIProcess/API/C/cairo"
517     "${WEBKIT2_DIR}/UIProcess/API/C/gtk"
518     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
519     "${WEBKIT2_DIR}/UIProcess/API/cpp/gtk"
520     "${WEBKIT2_DIR}/UIProcess/API/gtk"
521     "${WEBKIT2_DIR}/UIProcess/Network/CustomProtocols/soup"
522     "${WEBKIT2_DIR}/UIProcess/Plugins/gtk"
523     "${WEBKIT2_DIR}/UIProcess/gstreamer"
524     "${WEBKIT2_DIR}/UIProcess/gtk"
525     "${WEBKIT2_DIR}/UIProcess/soup"
526     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk"
527     "${WEBKIT2_DIR}/WebProcess/gtk"
528     "${WEBKIT2_DIR}/WebProcess/soup"
529     "${WEBKIT2_DIR}/WebProcess/unix"
530     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/gtk"
531     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
532     "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
533     "${WEBKIT2_DIR}/WebProcess/WebPage/gtk"
534     "${WTF_DIR}/wtf/gtk"
535     "${WTF_DIR}/wtf/glib"
536     "${WTF_DIR}"
537 )
538
539 list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
540     ${CAIRO_INCLUDE_DIRS}
541     ${ENCHANT_INCLUDE_DIRS}
542     ${GEOCLUE_INCLUDE_DIRS}
543     ${GSTREAMER_INCLUDE_DIRS}
544     ${HARFBUZZ_INCLUDE_DIRS}
545     ${LIBSOUP_INCLUDE_DIRS}
546 )
547
548 if (USE_LIBNOTIFY)
549 list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
550     ${LIBNOTIFY_INCLUDE_DIRS}
551 )
552 endif ()
553
554 set(WebKit2CommonIncludeDirectories ${WebKit2_INCLUDE_DIRECTORIES})
555 set(WebKit2CommonSystemIncludeDirectories ${WebKit2_SYSTEM_INCLUDE_DIRECTORIES})
556
557 list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
558     ${GLIB_INCLUDE_DIRS}
559     ${GTK_INCLUDE_DIRS}
560     ${GTK_UNIX_PRINT_INCLUDE_DIRS}
561 )
562
563 list(APPEND WebProcess_SOURCES
564     WebProcess/EntryPoint/unix/WebProcessMain.cpp
565 )
566
567 list(APPEND NetworkProcess_SOURCES
568     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
569 )
570
571 list(APPEND DatabaseProcess_SOURCES
572     DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp
573 )
574
575 file(WRITE ${CMAKE_BINARY_DIR}/test_atomic.cpp
576      "#include <atomic>\n"
577      "int main() { std::atomic<int64_t> i(0); i++; return 0; }\n")
578 try_compile(ATOMIC_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomic.cpp)
579 if (NOT ATOMIC_BUILD_SUCCEEDED)
580     list(APPEND WebKit2_LIBRARIES atomic)
581 endif ()
582 file(REMOVE ${CMAKE_BINARY_DIR}/test_atomic.cpp)
583
584 set(SharedWebKit2Libraries
585     ${WebKit2_LIBRARIES}
586 )
587
588 list(APPEND WebKit2_LIBRARIES
589     GObjectDOMBindings
590     WebCorePlatformGTK
591     ${GTK_UNIX_PRINT_LIBRARIES}
592 )
593
594 if (LIBNOTIFY_FOUND)
595 list(APPEND WebKit2_LIBRARIES
596     ${LIBNOTIFY_LIBRARIES}
597 )
598 endif ()
599
600 if (ENABLE_SECCOMP_FILTERS)
601     list(APPEND WebKit2_LIBRARIES
602         ${LIBSECCOMP_LIBRARIES}
603     )
604     list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
605         ${LIBSECCOMP_INCLUDE_DIRS}
606     )
607
608     # If building with WebKit jhbuild (not GNOME jhbuild), add the root build
609     # directory to the filesystem access policy.
610     if (DEVELOPER_MODE AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/WebKitBuild/DependenciesGTK)
611         add_definitions(-DSOURCE_DIR=\"${CMAKE_SOURCE_DIR}\")
612     endif ()
613 endif ()
614
615 ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES)
616
617 set(WebKit2_MARSHAL_LIST ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2marshal.list)
618 add_custom_command(
619     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
620            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.h
621     MAIN_DEPENDENCY ${WebKit2_MARSHAL_LIST}
622
623     COMMAND echo extern \"C\" { > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
624     COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --body >> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
625     COMMAND echo } >> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
626
627     COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --header > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.h
628     VERBATIM)
629
630 # To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
631 set(WebKit2GTK_ENUM_GENERATION_HEADERS ${WebKit2GTK_INSTALLED_HEADERS})
632 list(REMOVE_ITEM WebKit2GTK_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h)
633 add_custom_command(
634     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
635            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
636     DEPENDS ${WebKit2GTK_ENUM_GENERATION_HEADERS}
637
638     COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.h.template ${WebKit2GTK_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
639
640     COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.cpp.template ${WebKit2GTK_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
641     VERBATIM)
642
643 add_custom_command(
644     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
645     DEPENDS ${InspectorFilesDependencies}
646             ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
647             ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py
648     COMMAND ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py --output=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml ${InspectorFiles} ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
649     VERBATIM
650 )
651
652 add_custom_command(
653     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
654     DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
655     COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebInspectorUI --sourcedir=${DERIVED_SOURCES_WEBINSPECTORUI_DIR} --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
656     VERBATIM
657 )
658
659 add_custom_command(
660     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
661     DEPENDS ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
662             ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
663     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
664     VERBATIM
665 )
666
667 set(WebKit2Resources
668     "        <file alias=\"images/missingImage\">missingImage.png</file>\n"
669     "        <file alias=\"images/missingImage@2x\">missingImage@2x.png</file>\n"
670     "        <file alias=\"images/panIcon\">panIcon.png</file>\n"
671     "        <file alias=\"images/textAreaResizeCorner\">textAreaResizeCorner.png</file>\n"
672     "        <file alias=\"images/textAreaResizeCorner@2x\">textAreaResizeCorner@2x.png</file>\n"
673 )
674
675 if (ENABLE_ICONDATABASE)
676     list(APPEND WebKit2Resources
677         "        <file alias=\"images/urlIcon\">urlIcon.png</file>\n"
678     )
679 endif ()
680
681 if (ENABLE_WEB_AUDIO)
682     list(APPEND WebKit2Resources
683         "        <file alias=\"audio/Composite\">Composite.wav</file>\n"
684     )
685 endif ()
686
687 file(WRITE ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml
688     "<?xml version=1.0 encoding=UTF-8?>\n"
689     "<gresources>\n"
690     "    <gresource prefix=\"/org/webkitgtk/resources\">\n"
691     ${WebKit2Resources}
692     "    </gresource>\n"
693     "</gresources>\n"
694 )
695
696 add_custom_command(
697     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.c
698     DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml
699     COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml
700     VERBATIM
701 )
702
703 if (ENABLE_PLUGIN_PROCESS_GTK2)
704     set(PluginProcessGTK2_EXECUTABLE_NAME WebKitPluginProcess2)
705
706     # FIXME: We should figure out a way to avoid compiling files that are common between the plugin
707     # process and WebKit2 only once instead of recompiling them for the plugin process.
708     list(APPEND PluginProcessGTK2_SOURCES
709         Platform/Logging.cpp
710         Platform/Module.cpp
711
712         Platform/IPC/ArgumentCoders.cpp
713         Platform/IPC/ArgumentDecoder.cpp
714         Platform/IPC/ArgumentEncoder.cpp
715         Platform/IPC/Attachment.cpp
716         Platform/IPC/Connection.cpp
717         Platform/IPC/DataReference.cpp
718         Platform/IPC/MessageDecoder.cpp
719         Platform/IPC/MessageEncoder.cpp
720         Platform/IPC/MessageReceiverMap.cpp
721         Platform/IPC/MessageSender.cpp
722         Platform/IPC/StringReference.cpp
723
724         Platform/IPC/glib/GSocketMonitor.cpp
725         Platform/IPC/unix/AttachmentUnix.cpp
726         Platform/IPC/unix/ConnectionUnix.cpp
727
728         Platform/gtk/LoggingGtk.cpp
729         Platform/gtk/ModuleGtk.cpp
730
731         Platform/unix/SharedMemoryUnix.cpp
732
733         PluginProcess/PluginControllerProxy.cpp
734         PluginProcess/PluginCreationParameters.cpp
735         PluginProcess/PluginProcess.cpp
736         PluginProcess/WebProcessConnection.cpp
737
738         PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
739
740         PluginProcess/unix/PluginControllerProxyUnix.cpp
741         PluginProcess/unix/PluginProcessMainUnix.cpp
742         PluginProcess/unix/PluginProcessUnix.cpp
743
744         Shared/ActivityAssertion.cpp
745         Shared/BlobDataFileReferenceWithSandboxExtension.cpp
746         Shared/ChildProcess.cpp
747         Shared/ShareableBitmap.cpp
748         Shared/WebCoreArgumentCoders.cpp
749         Shared/WebEvent.cpp
750         Shared/WebKeyboardEvent.cpp
751         Shared/WebKit2Initialize.cpp
752         Shared/WebMouseEvent.cpp
753         Shared/WebPlatformTouchPoint.cpp
754         Shared/WebTouchEvent.cpp
755         Shared/WebWheelEvent.cpp
756
757         Shared/Plugins/NPIdentifierData.cpp
758         Shared/Plugins/NPObjectMessageReceiver.cpp
759         Shared/Plugins/NPObjectProxy.cpp
760         Shared/Plugins/NPRemoteObjectMap.cpp
761         Shared/Plugins/NPVariantData.cpp
762         Shared/Plugins/PluginProcessCreationParameters.cpp
763
764         Shared/Plugins/Netscape/NetscapePluginModule.cpp
765         Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp
766
767         Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
768
769         Shared/cairo/ShareableBitmapCairo.cpp
770
771         Shared/gtk/NativeWebKeyboardEventGtk.cpp
772         Shared/gtk/NativeWebMouseEventGtk.cpp
773         Shared/gtk/NativeWebTouchEventGtk.cpp
774         Shared/gtk/NativeWebWheelEventGtk.cpp
775         Shared/gtk/ProcessExecutablePathGtk.cpp
776         Shared/gtk/WebEventFactory.cpp
777
778         Shared/soup/WebCoreArgumentCodersSoup.cpp
779
780         Shared/unix/ChildProcessMain.cpp
781
782         UIProcess/Launcher/ProcessLauncher.cpp
783
784         UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
785
786         UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
787
788         WebProcess/Plugins/Plugin.cpp
789
790         WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp
791         WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
792         WebProcess/Plugins/Netscape/NetscapePlugin.cpp
793         WebProcess/Plugins/Netscape/NetscapePluginNone.cpp
794         WebProcess/Plugins/Netscape/NetscapePluginStream.cpp
795
796         WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
797
798         ${DERIVED_SOURCES_WEBKIT2_DIR}/PluginControllerProxyMessageReceiver.cpp
799         ${DERIVED_SOURCES_WEBKIT2_DIR}/PluginProcessMessageReceiver.cpp
800         ${DERIVED_SOURCES_WEBKIT2_DIR}/WebProcessConnectionMessageReceiver.cpp
801         ${DERIVED_SOURCES_WEBKIT2_DIR}/NPObjectMessageReceiverMessageReceiver.cpp
802         ${DERIVED_SOURCES_WEBKIT2_DIR}/ChildProcessMessageReceiver.cpp
803     )
804
805     add_executable(WebKitPluginProcess2 ${PluginProcessGTK2_SOURCES})
806     add_webkit2_prefix_header(WebKitPluginProcess2)
807
808     # We need ENABLE_PLUGIN_PROCESS for all targets in this directory, but
809     # we only want GTK_API_VERSION_2 for the plugin process target.
810     set_property(
811         TARGET WebKitPluginProcess2
812         APPEND
813         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
814     )
815     target_include_directories(WebKitPluginProcess2 PRIVATE
816         ${WebKit2CommonIncludeDirectories}
817     )
818     target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE
819          ${WebKit2CommonSystemIncludeDirectories}
820          ${GTK2_INCLUDE_DIRS}
821          ${GDK2_INCLUDE_DIRS}
822     )
823
824     set(WebKitPluginProcess2_LIBRARIES
825         ${SharedWebKit2Libraries}
826         WebCorePlatformGTK2
827     )
828     ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKitPluginProcess2_LIBRARIES)
829     target_link_libraries(WebKitPluginProcess2 ${WebKitPluginProcess2_LIBRARIES})
830
831     add_dependencies(WebKitPluginProcess2 WebKit2)
832
833     install(TARGETS WebKitPluginProcess2 DESTINATION "${LIBEXEC_INSTALL_DIR}")
834 endif () # ENABLE_PLUGIN_PROCESS_GTK2
835
836 # GTK3 PluginProcess
837 list(APPEND PluginProcess_SOURCES
838     PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
839 )
840
841 if (ENABLE_THREADED_COMPOSITOR)
842     list(APPEND WebKit2_SOURCES
843         Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
844         Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
845         Shared/CoordinatedGraphics/SimpleViewportController.cpp
846
847         Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp
848         Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
849
850         WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp
851     )
852     list(APPEND WebKit2_INCLUDE_DIRECTORIES
853         "${WEBCORE_DIR}/platform/graphics/texmap/coordinated"
854         "${WEBKIT2_DIR}/Shared/CoordinatedGraphics"
855         "${WEBKIT2_DIR}/Shared/CoordinatedGraphics/threadedcompositor"
856         "${WEBKIT2_DIR}/WebProcess/WebPage/CoordinatedGraphics"
857     )
858 else (ENABLE_THREADED_COMPOSITOR)
859     list(APPEND WebKit2_SOURCES
860         WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
861     )
862 endif ()
863
864 # Commands for building the built-in injected bundle.
865 include_directories(
866     "${WEBKIT2_DIR}/Platform"
867     "${WEBKIT2_DIR}/Shared"
868     "${WEBKIT2_DIR}/Shared/API/c"
869     "${WEBKIT2_DIR}/UIProcess/API/C"
870     "${WEBKIT2_DIR}/WebProcess/InjectedBundle"
871     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c"
872     "${DERIVED_SOURCES_DIR}"
873     "${DERIVED_SOURCES_DIR}/InjectedBundle"
874     "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
875     "${FORWARDING_HEADERS_DIR}"
876     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
877 )
878
879 add_library(webkit2gtkinjectedbundle MODULE "${WEBKIT2_DIR}/WebProcess/gtk/WebGtkInjectedBundleMain.cpp")
880 add_dependencies(webkit2gtkinjectedbundle GObjectDOMBindings)
881 add_webkit2_prefix_header(webkit2gtkinjectedbundle)
882 target_link_libraries(webkit2gtkinjectedbundle WebKit2)
883
884 # Add ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} to LD_LIBRARY_PATH
885 string(COMPARE EQUAL "$ENV{LD_LIBRARY_PATH}" "" ld_library_path_not_exist)
886 if (ld_library_path_does_not_exist)
887     set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH
888         "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
889     )
890 else ()
891     set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH
892         "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{LD_LIBRARY_PATH}"
893     )
894 endif ()
895
896 # Add required -L flags from ${CMAKE_SHARED_LINKER_FLAGS} for g-ir-scanner
897 string(REGEX MATCHALL "-L[^ ]*"
898     INTROSPECTION_ADDITIONAL_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
899
900 add_custom_command(
901     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
902     DEPENDS WebKit2
903     DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
904     COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
905         LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
906         ${INTROSPECTION_SCANNER}
907         --quiet
908         --warn-all
909         --symbol-prefix=webkit
910         --identifier-prefix=WebKit
911         --namespace=WebKit2
912         --nsversion=${WEBKITGTK_API_VERSION}
913         --include=GObject-2.0
914         --include=Gtk-3.0
915         --include=Soup-2.4
916         --include-uninstalled=${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
917         --library=webkit2gtk-${WEBKITGTK_API_VERSION}
918         --library=javascriptcoregtk-${WEBKITGTK_API_VERSION}
919         -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
920         ${INTROSPECTION_ADDITIONAL_LINKER_FLAGS}
921         --no-libtool
922         --pkg=gobject-2.0
923         --pkg=gtk+-3.0
924         --pkg=libsoup-2.4
925         --pkg-export=webkit2gtk-${WEBKITGTK_API_VERSION}
926         --output=${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
927         --c-include="webkit2/webkit2.h"
928         -DBUILDING_WEBKIT
929         -DWEBKIT2_COMPILATION
930         -I${CMAKE_SOURCE_DIR}/Source
931         -I${WEBKIT2_DIR}
932         -I${JAVASCRIPTCORE_DIR}
933         -I${JAVASCRIPTCORE_DIR}/ForwardingHeaders
934         -I${DERIVED_SOURCES_DIR}
935         -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}
936         -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
937         ${WebKit2GTK_INSTALLED_HEADERS}
938         ${WEBKIT2_DIR}/UIProcess/API/gtk/*.cpp
939 )
940
941 add_custom_command(
942     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
943     DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
944     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
945     COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
946         LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
947         LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
948         ${INTROSPECTION_SCANNER}
949         --quiet
950         --warn-all
951         --symbol-prefix=webkit
952         --identifier-prefix=WebKit
953         --namespace=WebKit2WebExtension
954         --nsversion=${WEBKITGTK_API_VERSION}
955         --include=GObject-2.0
956         --include=Gtk-3.0
957         --include=Soup-2.4
958         --include-uninstalled=${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
959         --library=webkit2gtk-${WEBKITGTK_API_VERSION}
960         --library=javascriptcoregtk-${WEBKITGTK_API_VERSION}
961         ${INTROSPECTION_ADDITIONAL_LIBRARIES}
962         -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
963         ${INTROSPECTION_ADDITIONAL_LINKER_FLAGS}
964         --no-libtool
965         --pkg=gobject-2.0
966         --pkg=gtk+-3.0
967         --pkg=libsoup-2.4
968         --pkg-export=webkit2gtk-web-extension-${WEBKITGTK_API_VERSION}
969         --output=${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
970         --c-include="webkit2/webkit-web-extension.h"
971         -DBUILDING_WEBKIT
972         -DWEBKIT2_COMPILATION
973         -I${CMAKE_SOURCE_DIR}/Source
974         -I${WEBKIT2_DIR}
975         -I${JAVASCRIPTCORE_DIR}
976         -I${JAVASCRIPTCORE_DIR}/ForwardingHeaders
977         -I${DERIVED_SOURCES_DIR}
978         -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}
979         -I${FORWARDING_HEADERS_DIR}
980         -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
981         -I${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}
982         -I${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk
983         ${GObjectDOMBindings_GIR_HEADERS}
984         ${WebKit2WebExtension_INSTALLED_HEADERS}
985         ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
986         ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenu.cpp
987         ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
988         ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
989         ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.cpp
990         ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
991         ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
992         ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
993         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/*.cpp
994 )
995
996 add_custom_command(
997     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
998     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
999     COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
1000 )
1001
1002 add_custom_command(
1003     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
1004     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
1005     COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
1006 )
1007
1008 ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib)
1009 ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib)
1010
1011 install(TARGETS webkit2gtkinjectedbundle
1012         DESTINATION "${LIB_INSTALL_DIR}/webkit2gtk-${WEBKITGTK_API_VERSION}/injected-bundle"
1013 )
1014 install(FILES "${CMAKE_BINARY_DIR}/Source/WebKit2/webkit2gtk-${WEBKITGTK_API_VERSION}.pc"
1015               "${CMAKE_BINARY_DIR}/Source/WebKit2/webkit2gtk-web-extension-${WEBKITGTK_API_VERSION}.pc"
1016         DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
1017 )
1018 install(FILES ${WebKit2GTK_INSTALLED_HEADERS}
1019               ${WebKit2WebExtension_INSTALLED_HEADERS}
1020         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkit2"
1021 )
1022
1023 if (ENABLE_INTROSPECTION)
1024     install(FILES ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
1025                   ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
1026             DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
1027     )
1028     install(FILES ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
1029                   ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
1030             DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
1031     )
1032 endif ()
1033
1034 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkit2gtk.cfg
1035     "[webkit2gtk-${WEBKITGTK_API_VERSION}]\n"
1036     "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
1037     "namespace=webkit\n"
1038     "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
1039     "       -I${WEBKIT2_DIR}/UIProcess/API/gtk\n"
1040     "       -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}\n"
1041     "       -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}\n"
1042     "doc_dir=${WEBKIT2_DIR}/UIProcess/API/gtk/docs\n"
1043     "source_dirs=${WEBKIT2_DIR}/UIProcess/API/gtk\n"
1044     "            ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk\n"
1045     "            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}\n"
1046     "headers=${WebKit2GTK_ENUM_GENERATION_HEADERS} ${WebKit2WebExtension_INSTALLED_HEADERS}\n"
1047     "main_sgml_file=webkit2gtk-docs.sgml\n"
1048 )
1049
1050 add_custom_target(WebKit2-forwarding-headers
1051     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT2_DIR} --output ${FORWARDING_HEADERS_DIR} --platform gtk --platform soup
1052 )
1053
1054 # These symbolic link allows includes like #include <webkit2/WebkitWebView.h> which simulates installed headers.
1055 add_custom_command(
1056     OUTPUT ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
1057     DEPENDS ${WEBKIT2_DIR}/UIProcess/API/gtk
1058     COMMAND ln -n -s -f ${WEBKIT2_DIR}/UIProcess/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
1059 )
1060 add_custom_command(
1061     OUTPUT ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
1062     DEPENDS ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk
1063     COMMAND ln -n -s -f ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
1064 )
1065 add_custom_target(WebKit2-fake-api-headers
1066     DEPENDS ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
1067             ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
1068 )
1069
1070 set(WEBKIT2_EXTRA_DEPENDENCIES
1071      WebKit2-fake-api-headers
1072      WebKit2-forwarding-headers
1073 )