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