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