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