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