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