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