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