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