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