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