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