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