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