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