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