[GTK] REGRESSION(r183936): Test /webkit2/WebKitWebContext/spell-checker fails since...
[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/WKTextCheckerGtk.cpp
95     UIProcess/API/C/gtk/WKView.cpp
96
97     UIProcess/API/C/soup/WKCookieManagerSoup.cpp
98     UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp
99
100     UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp
101     UIProcess/API/gtk/PageClientImpl.cpp
102     UIProcess/API/gtk/PageClientImpl.h
103     UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
104     UIProcess/API/gtk/WebKitAuthenticationDialog.h
105     UIProcess/API/gtk/WebKitAuthenticationRequest.cpp
106     UIProcess/API/gtk/WebKitAuthenticationRequest.h
107     UIProcess/API/gtk/WebKitBackForwardList.cpp
108     UIProcess/API/gtk/WebKitBackForwardList.h
109     UIProcess/API/gtk/WebKitBackForwardListItem.cpp
110     UIProcess/API/gtk/WebKitBackForwardListItem.h
111     UIProcess/API/gtk/WebKitBackForwardListPrivate.h
112     UIProcess/API/gtk/WebKitColorChooser.cpp
113     UIProcess/API/gtk/WebKitColorChooserRequest.cpp
114     UIProcess/API/gtk/WebKitContextMenu.cpp
115     UIProcess/API/gtk/WebKitContextMenu.h
116     UIProcess/API/gtk/WebKitContextMenuActions.cpp
117     UIProcess/API/gtk/WebKitContextMenuActions.h
118     UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h
119     UIProcess/API/gtk/WebKitContextMenuClient.cpp
120     UIProcess/API/gtk/WebKitContextMenuClient.h
121     UIProcess/API/gtk/WebKitContextMenuItem.cpp
122     UIProcess/API/gtk/WebKitContextMenuItem.h
123     UIProcess/API/gtk/WebKitContextMenuItemPrivate.h
124     UIProcess/API/gtk/WebKitContextMenuPrivate.h
125     UIProcess/API/gtk/WebKitCookieManager.cpp
126     UIProcess/API/gtk/WebKitCookieManager.h
127     UIProcess/API/gtk/WebKitCookieManagerPrivate.h
128     UIProcess/API/gtk/WebKitCredential.cpp
129     UIProcess/API/gtk/WebKitCredential.h
130     UIProcess/API/gtk/WebKitDefines.h
131     UIProcess/API/gtk/WebKitDownload.cpp
132     UIProcess/API/gtk/WebKitDownload.h
133     UIProcess/API/gtk/WebKitDownloadClient.cpp
134     UIProcess/API/gtk/WebKitDownloadClient.h
135     UIProcess/API/gtk/WebKitDownloadPrivate.h
136     UIProcess/API/gtk/WebKitEditingCommands.h
137     UIProcess/API/gtk/WebKitError.cpp
138     UIProcess/API/gtk/WebKitError.h
139     UIProcess/API/gtk/WebKitFaviconDatabase.cpp
140     UIProcess/API/gtk/WebKitFaviconDatabase.h
141     UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h
142     UIProcess/API/gtk/WebKitFileChooserRequest.cpp
143     UIProcess/API/gtk/WebKitFileChooserRequest.h
144     UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h
145     UIProcess/API/gtk/WebKitFindController.cpp
146     UIProcess/API/gtk/WebKitFindController.h
147     UIProcess/API/gtk/WebKitFormClient.cpp
148     UIProcess/API/gtk/WebKitFormClient.h
149     UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp
150     UIProcess/API/gtk/WebKitFormSubmissionRequest.h
151     UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h
152     UIProcess/API/gtk/WebKitForwardDeclarations.h
153     UIProcess/API/gtk/WebKitFullscreenClient.cpp
154     UIProcess/API/gtk/WebKitFullscreenClient.h
155     UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp
156     UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
157     UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h
158     UIProcess/API/gtk/WebKitGeolocationProvider.cpp
159     UIProcess/API/gtk/WebKitGeolocationProvider.h
160     UIProcess/API/gtk/WebKitHitTestResult.cpp
161     UIProcess/API/gtk/WebKitHitTestResult.h
162     UIProcess/API/gtk/WebKitHitTestResultPrivate.h
163     UIProcess/API/gtk/WebKitInjectedBundleClient.cpp
164     UIProcess/API/gtk/WebKitInjectedBundleClient.h
165     UIProcess/API/gtk/WebKitJavascriptResult.cpp
166     UIProcess/API/gtk/WebKitJavascriptResult.h
167     UIProcess/API/gtk/WebKitJavascriptResultPrivate.h
168     UIProcess/API/gtk/WebKitLoaderClient.cpp
169     UIProcess/API/gtk/WebKitLoaderClient.h
170     UIProcess/API/gtk/WebKitMimeInfo.cpp
171     UIProcess/API/gtk/WebKitMimeInfo.h
172     UIProcess/API/gtk/WebKitMimeInfoPrivate.h
173     UIProcess/API/gtk/WebKitNavigationAction.cpp
174     UIProcess/API/gtk/WebKitNavigationAction.h
175     UIProcess/API/gtk/WebKitNavigationActionPrivate.h
176     UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp
177     UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
178     UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h
179     UIProcess/API/gtk/WebKitNotification.cpp
180     UIProcess/API/gtk/WebKitNotification.h
181     UIProcess/API/gtk/WebKitNotificationPermissionRequest.cpp
182     UIProcess/API/gtk/WebKitNotificationPermissionRequest.h
183     UIProcess/API/gtk/WebKitNotificationPermissionRequestPrivate.h
184     UIProcess/API/gtk/WebKitNotificationPrivate.h
185     UIProcess/API/gtk/WebKitNotificationProvider.cpp
186     UIProcess/API/gtk/WebKitNotificationProvider.h
187     UIProcess/API/gtk/WebKitPermissionRequest.cpp
188     UIProcess/API/gtk/WebKitPermissionRequest.h
189     UIProcess/API/gtk/WebKitPlugin.cpp
190     UIProcess/API/gtk/WebKitPlugin.h
191     UIProcess/API/gtk/WebKitPluginPrivate.h
192     UIProcess/API/gtk/WebKitPolicyClient.cpp
193     UIProcess/API/gtk/WebKitPolicyClient.h
194     UIProcess/API/gtk/WebKitPolicyDecision.cpp
195     UIProcess/API/gtk/WebKitPolicyDecision.h
196     UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h
197     UIProcess/API/gtk/WebKitPrintOperation.cpp
198     UIProcess/API/gtk/WebKitPrintOperation.h
199     UIProcess/API/gtk/WebKitPrintOperationPrivate.h
200     UIProcess/API/gtk/WebKitPrivate.cpp
201     UIProcess/API/gtk/WebKitPrivate.h
202     UIProcess/API/gtk/WebKitRequestManagerClient.cpp
203     UIProcess/API/gtk/WebKitRequestManagerClient.h
204     UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp
205     UIProcess/API/gtk/WebKitResponsePolicyDecision.h
206     UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h
207     UIProcess/API/gtk/WebKitScriptDialog.cpp
208     UIProcess/API/gtk/WebKitScriptDialog.h
209     UIProcess/API/gtk/WebKitScriptDialogPrivate.h
210     UIProcess/API/gtk/WebKitSecurityManager.cpp
211     UIProcess/API/gtk/WebKitSecurityManager.h
212     UIProcess/API/gtk/WebKitSecurityManagerPrivate.h
213     UIProcess/API/gtk/WebKitSettings.cpp
214     UIProcess/API/gtk/WebKitSettings.h
215     UIProcess/API/gtk/WebKitSettingsPrivate.h
216     UIProcess/API/gtk/WebKitUIClient.cpp
217     UIProcess/API/gtk/WebKitUIClient.h
218     UIProcess/API/gtk/WebKitURIRequest.cpp
219     UIProcess/API/gtk/WebKitURIRequest.h
220     UIProcess/API/gtk/WebKitURIRequestPrivate.h
221     UIProcess/API/gtk/WebKitURIResponse.cpp
222     UIProcess/API/gtk/WebKitURIResponse.h
223     UIProcess/API/gtk/WebKitURIResponsePrivate.h
224     UIProcess/API/gtk/WebKitURISchemeRequest.cpp
225     UIProcess/API/gtk/WebKitURISchemeRequest.h
226     UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h
227     UIProcess/API/gtk/WebKitUserContent.cpp
228     UIProcess/API/gtk/WebKitUserContent.h
229     UIProcess/API/gtk/WebKitUserContentManager.cpp
230     UIProcess/API/gtk/WebKitUserContentManager.h
231     UIProcess/API/gtk/WebKitUserContentManagerPrivate.h
232     UIProcess/API/gtk/WebKitUserContentPrivate.h
233     UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp
234     UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h
235     UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h
236     UIProcess/API/gtk/WebKitVersion.cpp
237     UIProcess/API/gtk/WebKitVersion.h.in
238     UIProcess/API/gtk/WebKitWebContext.cpp
239     UIProcess/API/gtk/WebKitWebContext.h
240     UIProcess/API/gtk/WebKitWebContextPrivate.h
241     UIProcess/API/gtk/WebKitWebInspector.cpp
242     UIProcess/API/gtk/WebKitWebInspector.h
243     UIProcess/API/gtk/WebKitWebInspectorPrivate.h
244     UIProcess/API/gtk/WebKitWebResource.cpp
245     UIProcess/API/gtk/WebKitWebResource.h
246     UIProcess/API/gtk/WebKitWebResourcePrivate.h
247     UIProcess/API/gtk/WebKitWebView.cpp
248     UIProcess/API/gtk/WebKitWebView.h
249     UIProcess/API/gtk/WebKitWebViewBase.cpp
250     UIProcess/API/gtk/WebKitWebViewBase.h
251     UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp
252     UIProcess/API/gtk/WebKitWebViewBaseAccessible.h
253     UIProcess/API/gtk/WebKitWebViewBasePrivate.h
254     UIProcess/API/gtk/WebKitWebViewPrivate.h
255     UIProcess/API/gtk/WebKitWebsiteDataManager.cpp
256     UIProcess/API/gtk/WebKitWebsiteDataManager.h
257     UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h
258     UIProcess/API/gtk/WebKitWindowProperties.cpp
259     UIProcess/API/gtk/WebKitWindowProperties.h
260     UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h
261     UIProcess/API/gtk/webkit2.h
262
263     UIProcess/Databases/gtk/DatabaseProcessProxyGtk.cpp
264
265     UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp
266
267     UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp
268
269     UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
270
271     UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp
272     UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp
273     UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp
274
275     UIProcess/Network/soup/NetworkProcessProxySoup.cpp
276
277     UIProcess/Plugins/gtk/PluginInfoCache.cpp
278
279     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
280     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
281
282     UIProcess/Storage/StorageManager.cpp
283
284     UIProcess/cairo/BackingStoreCairo.cpp
285
286     UIProcess/gtk/DragAndDropHandler.cpp
287     UIProcess/gtk/ExperimentalFeatures.cpp
288     UIProcess/gtk/GestureController.cpp
289     UIProcess/gtk/InputMethodFilter.cpp
290     UIProcess/gtk/KeyBindingTranslator.cpp
291     UIProcess/gtk/RedirectedXCompositeWindow.cpp
292     UIProcess/gtk/TextCheckerGtk.cpp
293     UIProcess/gtk/WebColorPickerGtk.cpp
294     UIProcess/gtk/WebContextMenuProxyGtk.cpp
295     UIProcess/gtk/WebFullScreenClientGtk.cpp
296     UIProcess/gtk/WebInspectorClientGtk.cpp
297     UIProcess/gtk/WebInspectorProxyGtk.cpp
298     UIProcess/gtk/WebPageProxyGtk.cpp
299     UIProcess/gtk/WebPopupMenuProxyGtk.cpp
300     UIProcess/gtk/WebPreferencesGtk.cpp
301     UIProcess/gtk/WebProcessPoolGtk.cpp
302     UIProcess/gtk/WebProcessProxyGtk.cpp
303
304     UIProcess/soup/WebCookieManagerProxySoup.cpp
305     UIProcess/soup/WebProcessPoolSoup.cpp
306
307     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
308     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
309
310     WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp
311     WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp
312     WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp
313     WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp
314     WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp
315
316     WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp
317
318     WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
319
320     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
321
322     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
323
324     WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp
325     WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp
326     WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
327     WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp
328     WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp
329
330     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
331
332     WebProcess/WebPage/DrawingAreaImpl.cpp
333
334     WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
335
336     WebProcess/WebPage/gtk/PrinterListGtk.cpp
337     WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp
338     WebProcess/WebPage/gtk/WebPageGtk.cpp
339     WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
340
341     WebProcess/gtk/WebGtkExtensionManager.cpp
342     WebProcess/gtk/WebGtkInjectedBundleMain.cpp
343     WebProcess/gtk/WebProcessMainGtk.cpp
344
345     WebProcess/soup/WebKitSoupRequestInputStream.cpp
346     WebProcess/soup/WebProcessSoup.cpp
347 )
348
349 list(APPEND WebKit2_DERIVED_SOURCES
350     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
351     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
352     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.c
353
354     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
355     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
356 )
357
358 set(WebKit2GTK_INSTALLED_HEADERS
359     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
360     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h
361     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitAuthenticationRequest.h
362     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardList.h
363     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardListItem.h
364     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitColorChooserRequest.h
365     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCredential.h
366     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
367     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
368     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
369     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCookieManager.h
370     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDefines.h
371     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDownload.h
372     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEditingCommands.h
373     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitError.h
374     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFaviconDatabase.h
375     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFileChooserRequest.h
376     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFindController.h
377     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFormSubmissionRequest.h
378     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitForwardDeclarations.h
379     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
380     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
381     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitJavascriptResult.h
382     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitMimeInfo.h
383     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNavigationAction.h
384     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
385     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNotificationPermissionRequest.h
386     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNotification.h
387     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPermissionRequest.h
388     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPlugin.h
389     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPolicyDecision.h
390     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPrintOperation.h
391     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitResponsePolicyDecision.h
392     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitScriptDialog.h
393     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSecurityManager.h
394     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSettings.h
395     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
396     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
397     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURISchemeRequest.h
398     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitUserContent.h
399     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitUserContentManager.h
400     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h
401     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebContext.h
402     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebInspector.h
403     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebResource.h
404     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebView.h
405     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewBase.h
406     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebsiteDataManager.h
407     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWindowProperties.h
408     ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2.h
409 )
410
411 set(WebKit2WebExtension_INSTALLED_HEADERS
412     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitFrame.h
413     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h
414     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h
415     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.h
416     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
417     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
418 )
419
420 set(InspectorFiles
421     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html
422     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Base/*.js
423     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.css
424     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.js
425     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.css
426     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.js
427     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/ESLint/*.js
428     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/Esprima/*.js
429     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Models/*.js
430     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Protocol/*.js
431     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.css
432     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.js
433     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.png
434     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.svg
435     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
436 )
437
438 file(GLOB InspectorFilesDependencies
439     ${InspectorFiles}
440 )
441
442 # DerivedSources/JavaScriptCore/inspector/InspectorBackendCommands.js is
443 # expected in DerivedSources/WebInspectorUI/UserInterface/Protocol/.
444 add_custom_command(
445     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
446     DEPENDS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js
447     COMMAND cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
448 )
449
450 # This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore.
451 list(INSERT WebKit2_INCLUDE_DIRECTORIES 0
452     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
453     "${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}"
454     "${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}"
455     "${DERIVED_SOURCES_WEBKIT2GTK_DIR}"
456 )
457
458 list(APPEND WebKit2_INCLUDE_DIRECTORIES
459     "${WEBKIT2_DIR}/PluginProcess/unix"
460     "${WEBCORE_DIR}/platform/cairo"
461     "${WEBCORE_DIR}/platform/gtk"
462     "${WEBCORE_DIR}/platform/graphics/cairo"
463     "${WEBCORE_DIR}/platform/graphics/opentype"
464     "${WEBCORE_DIR}/platform/graphics/x11"
465     "${WEBCORE_DIR}/platform/network/soup"
466     "${WEBCORE_DIR}/platform/text/enchant"
467     "${WEBKIT2_DIR}/DatabaseProcess/unix"
468     "${WEBKIT2_DIR}/NetworkProcess/gtk"
469     "${WEBKIT2_DIR}/NetworkProcess/unix"
470     "${WEBKIT2_DIR}/Shared/API/c/gtk"
471     "${WEBKIT2_DIR}/Shared/Network/CustomProtocols/soup"
472     "${WEBKIT2_DIR}/Shared/Downloads/soup"
473     "${WEBKIT2_DIR}/Shared/gtk"
474     "${WEBKIT2_DIR}/Shared/soup"
475     "${WEBKIT2_DIR}/Shared/unix"
476     "${WEBKIT2_DIR}/UIProcess/API/C/cairo"
477     "${WEBKIT2_DIR}/UIProcess/API/C/gtk"
478     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
479     "${WEBKIT2_DIR}/UIProcess/API/cpp/gtk"
480     "${WEBKIT2_DIR}/UIProcess/API/gtk"
481     "${WEBKIT2_DIR}/UIProcess/Network/CustomProtocols/soup"
482     "${WEBKIT2_DIR}/UIProcess/Plugins/gtk"
483     "${WEBKIT2_DIR}/UIProcess/gtk"
484     "${WEBKIT2_DIR}/UIProcess/soup"
485     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk"
486     "${WEBKIT2_DIR}/WebProcess/gtk"
487     "${WEBKIT2_DIR}/WebProcess/soup"
488     "${WEBKIT2_DIR}/WebProcess/unix"
489     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/gtk"
490     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
491     "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
492     "${WEBKIT2_DIR}/WebProcess/WebPage/gtk"
493     "${WTF_DIR}/wtf/gtk"
494     "${WTF_DIR}/wtf/glib"
495     "${WTF_DIR}"
496 )
497
498 list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
499     ${CAIRO_INCLUDE_DIRS}
500     ${ENCHANT_INCLUDE_DIRS}
501     ${GEOCLUE_INCLUDE_DIRS}
502     ${HARFBUZZ_INCLUDE_DIRS}
503     ${LIBSOUP_INCLUDE_DIRS}
504 )
505
506 if (USE_LIBNOTIFY)
507 list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
508     ${LIBNOTIFY_INCLUDE_DIRS}
509 )
510 endif ()
511
512 set(WebKit2CommonIncludeDirectories ${WebKit2_INCLUDE_DIRECTORIES})
513 set(WebKit2CommonSystemIncludeDirectories ${WebKit2_SYSTEM_INCLUDE_DIRECTORIES})
514
515 list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
516     ${GLIB_INCLUDE_DIRS}
517     ${GTK_INCLUDE_DIRS}
518     ${GTK_UNIX_PRINT_INCLUDE_DIRS}
519 )
520
521 list(APPEND WebProcess_SOURCES
522     WebProcess/EntryPoint/unix/WebProcessMain.cpp
523 )
524
525 list(APPEND NetworkProcess_SOURCES
526     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
527 )
528
529 list(APPEND DatabaseProcess_SOURCES
530     DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp
531 )
532
533 file(WRITE ${CMAKE_BINARY_DIR}/test_atomic.cpp
534      "#include <atomic>\n"
535      "int main() { std::atomic<int64_t> i(0); i++; return 0; }\n")
536 try_compile(ATOMIC_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomic.cpp)
537 if (NOT ATOMIC_BUILD_SUCCEEDED)
538     list(APPEND WebKit2_LIBRARIES atomic)
539 endif ()
540 file(REMOVE ${CMAKE_BINARY_DIR}/test_atomic.cpp)
541
542 set(SharedWebKit2Libraries
543     ${WebKit2_LIBRARIES}
544 )
545
546 list(APPEND WebKit2_LIBRARIES
547     GObjectDOMBindings
548     WebCorePlatformGTK
549     ${GTK_UNIX_PRINT_LIBRARIES}
550 )
551
552 if (LIBNOTIFY_FOUND)
553 list(APPEND WebKit2_LIBRARIES
554     ${LIBNOTIFY_LIBRARIES}
555 )
556 endif ()
557
558 ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES)
559
560 set(WebKit2_MARSHAL_LIST ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2marshal.list)
561 add_custom_command(
562     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
563            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.h
564     MAIN_DEPENDENCY ${WebKit2_MARSHAL_LIST}
565
566     COMMAND echo extern \"C\" { > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
567     COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --body >> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
568     COMMAND echo } >> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
569
570     COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --header > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.h
571     VERBATIM)
572
573 # To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
574 set(WebKit2GTK_ENUM_GENERATION_HEADERS ${WebKit2GTK_INSTALLED_HEADERS})
575 list(REMOVE_ITEM WebKit2GTK_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h)
576 add_custom_command(
577     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
578            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
579     DEPENDS ${WebKit2GTK_ENUM_GENERATION_HEADERS}
580
581     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
582
583     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
584     VERBATIM)
585
586 add_custom_command(
587     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
588     DEPENDS ${InspectorFilesDependencies}
589             ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
590             ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py
591     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
592     VERBATIM
593 )
594
595 add_custom_command(
596     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
597     DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
598     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
599     VERBATIM
600 )
601
602 add_custom_command(
603     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
604     DEPENDS ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
605             ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
606     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
607     VERBATIM
608 )
609
610 set(WebKit2Resources
611     "        <file alias=\"images/missingImage\">missingImage.png</file>\n"
612     "        <file alias=\"images/missingImage@2x\">missingImage@2x.png</file>\n"
613     "        <file alias=\"images/panIcon\">panIcon.png</file>\n"
614     "        <file alias=\"images/textAreaResizeCorner\">textAreaResizeCorner.png</file>\n"
615     "        <file alias=\"images/textAreaResizeCorner@2x\">textAreaResizeCorner@2x.png</file>\n"
616 )
617
618 if (ENABLE_ICONDATABASE)
619     list(APPEND WebKit2Resources
620         "        <file alias=\"images/urlIcon\">urlIcon.png</file>\n"
621     )
622 endif ()
623
624 if (ENABLE_WEB_AUDIO)
625     list(APPEND WebKit2Resources
626         "        <file alias=\"audio/Composite\">Composite.wav</file>\n"
627     )
628 endif ()
629
630 file(WRITE ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml
631     "<?xml version=1.0 encoding=UTF-8?>\n"
632     "<gresources>\n"
633     "    <gresource prefix=\"/org/webkitgtk/resources\">\n"
634     ${WebKit2Resources}
635     "    </gresource>\n"
636     "</gresources>\n"
637 )
638
639 add_custom_command(
640     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.c
641     DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml
642     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
643     VERBATIM
644 )
645
646 if (ENABLE_PLUGIN_PROCESS_GTK2)
647     set(PluginProcessGTK2_EXECUTABLE_NAME WebKitPluginProcess2)
648
649     # FIXME: We should figure out a way to avoid compiling files that are common between the plugin
650     # process and WebKit2 only once instead of recompiling them for the plugin process.
651     list(APPEND PluginProcessGTK2_SOURCES
652         Platform/Logging.cpp
653         Platform/Module.cpp
654
655         Platform/IPC/ArgumentCoders.cpp
656         Platform/IPC/ArgumentDecoder.cpp
657         Platform/IPC/ArgumentEncoder.cpp
658         Platform/IPC/Attachment.cpp
659         Platform/IPC/Connection.cpp
660         Platform/IPC/DataReference.cpp
661         Platform/IPC/MessageDecoder.cpp
662         Platform/IPC/MessageEncoder.cpp
663         Platform/IPC/MessageReceiverMap.cpp
664         Platform/IPC/MessageSender.cpp
665         Platform/IPC/StringReference.cpp
666
667         Platform/IPC/unix/AttachmentUnix.cpp
668         Platform/IPC/unix/ConnectionUnix.cpp
669
670         Platform/gtk/LoggingGtk.cpp
671         Platform/gtk/ModuleGtk.cpp
672
673         Platform/unix/SharedMemoryUnix.cpp
674
675         PluginProcess/PluginControllerProxy.cpp
676         PluginProcess/PluginCreationParameters.cpp
677         PluginProcess/PluginProcess.cpp
678         PluginProcess/WebProcessConnection.cpp
679
680         PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
681
682         PluginProcess/unix/PluginControllerProxyUnix.cpp
683         PluginProcess/unix/PluginProcessMainUnix.cpp
684         PluginProcess/unix/PluginProcessUnix.cpp
685
686         Shared/ActivityAssertion.cpp
687         Shared/BlobDataFileReferenceWithSandboxExtension.cpp
688         Shared/ChildProcess.cpp
689         Shared/ChildProcessProxy.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 )