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