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