[GTK] [CMake] Add support for generating gtkdoc
[WebKit-https.git] / Source / WebKit2 / PlatformGTK.cmake
1 set(DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR ${DERIVED_SOURCES_DIR}/webkitdom)
2 set(DERIVED_SOURCES_WEBKIT2GTK_DIR ${DERIVED_SOURCES_DIR}/WebKit2/webkit2gtk)
3 set(WEBKIT2_BUILT_API_DIR ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/webkit2)
4 set(WEBKIT2_FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders/webkit2gtk)
5
6 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2_DIR})
7 file(MAKE_DIRECTORY ${WEBKIT2_BUILT_API_DIR})
8 file(MAKE_DIRECTORY ${WEBKIT2_FORWARDING_HEADERS_DIR})
9
10 configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${WEBKIT2_BUILT_API_DIR}/WebKitVersion.h)
11 configure_file(webkit2gtk.pc.in ${CMAKE_BINARY_DIR}/Source/WebKit2/webkit2gtk-3.0.pc @ONLY)
12
13 add_definitions(-DWEBKIT2_COMPILATION)
14 add_definitions(-DLIBEXECDIR="${CMAKE_INSTALL_FULL_LIBEXECDIR}")
15 add_definitions(-DPACKAGE_LOCALE_DIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
16 add_definitions(-DLIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}")
17
18 list(APPEND WebKit2_SOURCES
19     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
20     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
21
22     ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
23     ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
24
25     Platform/CoreIPC/unix/AttachmentUnix.cpp
26     Platform/CoreIPC/unix/ConnectionUnix.cpp
27
28     Platform/gtk/LoggingGtk.cpp
29     Platform/gtk/ModuleGtk.cpp
30     Platform/gtk/WorkQueueGtk.cpp
31
32     Platform/unix/SharedMemoryUnix.cpp
33
34     PluginProcess/unix/PluginControllerProxyUnix.cpp
35     PluginProcess/unix/PluginProcessMainUnix.cpp
36     PluginProcess/unix/PluginProcessUnix.cpp
37
38     Shared/API/c/cairo/WKImageCairo.cpp
39
40     Shared/Downloads/gtk/DownloadSoupErrorsGtk.cpp
41
42     Shared/Downloads/soup/DownloadSoup.cpp
43
44     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
45
46     Shared/cairo/ShareableBitmapCairo.cpp
47
48     Shared/gtk/ArgumentCodersGtk.cpp
49     Shared/gtk/LayerTreeContextGtk.cpp
50     Shared/gtk/NativeWebKeyboardEventGtk.cpp
51     Shared/gtk/NativeWebMouseEventGtk.cpp
52     Shared/gtk/NativeWebWheelEventGtk.cpp
53     Shared/gtk/PrintInfoGtk.cpp
54     Shared/gtk/ProcessExecutablePathGtk.cpp
55     Shared/gtk/WebEventFactory.cpp
56
57     Shared/linux/WebMemorySamplerLinux.cpp
58
59     Shared/linux/SeccompFilters/OpenSyscall.cpp
60     Shared/linux/SeccompFilters/SeccompBroker.cpp
61     Shared/linux/SeccompFilters/SeccompFilters.cpp
62     Shared/linux/SeccompFilters/SigactionSyscall.cpp
63     Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp
64     Shared/linux/SeccompFilters/Syscall.cpp
65     Shared/linux/SeccompFilters/SyscallPolicy.cpp
66
67     Shared/soup/WebCoreArgumentCodersSoup.cpp
68
69     UIProcess/DefaultUndoController.cpp
70     UIProcess/DrawingAreaProxyImpl.cpp
71
72     UIProcess/API/C/CoordinatedGraphics/WKView.cpp
73
74     UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp
75
76     UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp
77     UIProcess/API/C/gtk/WKInspectorClientGtk.cpp
78     UIProcess/API/C/gtk/WKView.cpp
79
80     UIProcess/API/C/soup/WKContextSoup.cpp
81     UIProcess/API/C/soup/WKCookieManagerSoup.cpp
82     UIProcess/API/C/soup/WKSoupRequestManager.cpp
83
84     UIProcess/API/gtk/PageClientImpl.cpp
85     UIProcess/API/gtk/PageClientImpl.h
86     UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
87     UIProcess/API/gtk/WebKitAuthenticationDialog.h
88     UIProcess/API/gtk/WebKitAuthenticationRequest.cpp
89     UIProcess/API/gtk/WebKitAuthenticationRequest.h
90     UIProcess/API/gtk/WebKitBackForwardList.cpp
91     UIProcess/API/gtk/WebKitBackForwardList.h
92     UIProcess/API/gtk/WebKitBackForwardListItem.cpp
93     UIProcess/API/gtk/WebKitBackForwardListItem.h
94     UIProcess/API/gtk/WebKitBackForwardListPrivate.h
95     UIProcess/API/gtk/WebKitCertificateInfo.cpp
96     UIProcess/API/gtk/WebKitCertificateInfo.h
97     UIProcess/API/gtk/WebKitCertificateInfoPrivate.h
98     UIProcess/API/gtk/WebKitContextMenu.cpp
99     UIProcess/API/gtk/WebKitContextMenu.h
100     UIProcess/API/gtk/WebKitContextMenuActions.cpp
101     UIProcess/API/gtk/WebKitContextMenuActions.h
102     UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h
103     UIProcess/API/gtk/WebKitContextMenuClient.cpp
104     UIProcess/API/gtk/WebKitContextMenuClient.h
105     UIProcess/API/gtk/WebKitContextMenuItem.cpp
106     UIProcess/API/gtk/WebKitContextMenuItem.h
107     UIProcess/API/gtk/WebKitContextMenuItemPrivate.h
108     UIProcess/API/gtk/WebKitContextMenuPrivate.h
109     UIProcess/API/gtk/WebKitCookieManager.cpp
110     UIProcess/API/gtk/WebKitCookieManager.h
111     UIProcess/API/gtk/WebKitCookieManagerPrivate.h
112     UIProcess/API/gtk/WebKitCredential.cpp
113     UIProcess/API/gtk/WebKitCredential.h
114     UIProcess/API/gtk/WebKitDefines.h
115     UIProcess/API/gtk/WebKitDownload.cpp
116     UIProcess/API/gtk/WebKitDownload.h
117     UIProcess/API/gtk/WebKitDownloadClient.cpp
118     UIProcess/API/gtk/WebKitDownloadClient.h
119     UIProcess/API/gtk/WebKitDownloadPrivate.h
120     UIProcess/API/gtk/WebKitEditingCommands.h
121     UIProcess/API/gtk/WebKitError.cpp
122     UIProcess/API/gtk/WebKitError.h
123     UIProcess/API/gtk/WebKitFaviconDatabase.cpp
124     UIProcess/API/gtk/WebKitFaviconDatabase.h
125     UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h
126     UIProcess/API/gtk/WebKitFileChooserRequest.cpp
127     UIProcess/API/gtk/WebKitFileChooserRequest.h
128     UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h
129     UIProcess/API/gtk/WebKitFindController.cpp
130     UIProcess/API/gtk/WebKitFindController.h
131     UIProcess/API/gtk/WebKitFormClient.cpp
132     UIProcess/API/gtk/WebKitFormClient.h
133     UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp
134     UIProcess/API/gtk/WebKitFormSubmissionRequest.h
135     UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h
136     UIProcess/API/gtk/WebKitForwardDeclarations.h
137     UIProcess/API/gtk/WebKitFullscreenClient.cpp
138     UIProcess/API/gtk/WebKitFullscreenClient.h
139     UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp
140     UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
141     UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h
142     UIProcess/API/gtk/WebKitGeolocationProvider.cpp
143     UIProcess/API/gtk/WebKitGeolocationProvider.h
144     UIProcess/API/gtk/WebKitHitTestResult.cpp
145     UIProcess/API/gtk/WebKitHitTestResult.h
146     UIProcess/API/gtk/WebKitHitTestResultPrivate.h
147     UIProcess/API/gtk/WebKitInjectedBundleClient.cpp
148     UIProcess/API/gtk/WebKitInjectedBundleClient.h
149     UIProcess/API/gtk/WebKitJavascriptResult.cpp
150     UIProcess/API/gtk/WebKitJavascriptResult.h
151     UIProcess/API/gtk/WebKitJavascriptResultPrivate.h
152     UIProcess/API/gtk/WebKitLoaderClient.cpp
153     UIProcess/API/gtk/WebKitLoaderClient.h
154     UIProcess/API/gtk/WebKitMimeInfo.cpp
155     UIProcess/API/gtk/WebKitMimeInfo.h
156     UIProcess/API/gtk/WebKitMimeInfoPrivate.h
157     UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp
158     UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
159     UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h
160     UIProcess/API/gtk/WebKitPermissionRequest.cpp
161     UIProcess/API/gtk/WebKitPermissionRequest.h
162     UIProcess/API/gtk/WebKitPlugin.cpp
163     UIProcess/API/gtk/WebKitPlugin.h
164     UIProcess/API/gtk/WebKitPluginPrivate.h
165     UIProcess/API/gtk/WebKitPolicyClient.cpp
166     UIProcess/API/gtk/WebKitPolicyClient.h
167     UIProcess/API/gtk/WebKitPolicyDecision.cpp
168     UIProcess/API/gtk/WebKitPolicyDecision.h
169     UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h
170     UIProcess/API/gtk/WebKitPrintOperation.cpp
171     UIProcess/API/gtk/WebKitPrintOperation.h
172     UIProcess/API/gtk/WebKitPrintOperationPrivate.h
173     UIProcess/API/gtk/WebKitPrivate.cpp
174     UIProcess/API/gtk/WebKitPrivate.h
175     UIProcess/API/gtk/WebKitRequestManagerClient.cpp
176     UIProcess/API/gtk/WebKitRequestManagerClient.h
177     UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp
178     UIProcess/API/gtk/WebKitResponsePolicyDecision.h
179     UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h
180     UIProcess/API/gtk/WebKitScriptDialog.cpp
181     UIProcess/API/gtk/WebKitScriptDialog.h
182     UIProcess/API/gtk/WebKitScriptDialogPrivate.h
183     UIProcess/API/gtk/WebKitSecurityManager.cpp
184     UIProcess/API/gtk/WebKitSecurityManager.h
185     UIProcess/API/gtk/WebKitSecurityManagerPrivate.h
186     UIProcess/API/gtk/WebKitSettings.cpp
187     UIProcess/API/gtk/WebKitSettings.h
188     UIProcess/API/gtk/WebKitSettingsPrivate.h
189     UIProcess/API/gtk/WebKitTextChecker.cpp
190     UIProcess/API/gtk/WebKitTextChecker.h
191     UIProcess/API/gtk/WebKitUIClient.cpp
192     UIProcess/API/gtk/WebKitUIClient.h
193     UIProcess/API/gtk/WebKitURIRequest.cpp
194     UIProcess/API/gtk/WebKitURIRequest.h
195     UIProcess/API/gtk/WebKitURIRequestPrivate.h
196     UIProcess/API/gtk/WebKitURIResponse.cpp
197     UIProcess/API/gtk/WebKitURIResponse.h
198     UIProcess/API/gtk/WebKitURIResponsePrivate.h
199     UIProcess/API/gtk/WebKitURISchemeRequest.cpp
200     UIProcess/API/gtk/WebKitURISchemeRequest.h
201     UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h
202     UIProcess/API/gtk/WebKitVersion.cpp
203     UIProcess/API/gtk/WebKitVersion.h.in
204     UIProcess/API/gtk/WebKitWebContext.cpp
205     UIProcess/API/gtk/WebKitWebContext.h
206     UIProcess/API/gtk/WebKitWebContextPrivate.h
207     UIProcess/API/gtk/WebKitWebInspector.cpp
208     UIProcess/API/gtk/WebKitWebInspector.h
209     UIProcess/API/gtk/WebKitWebInspectorPrivate.h
210     UIProcess/API/gtk/WebKitWebResource.cpp
211     UIProcess/API/gtk/WebKitWebResource.h
212     UIProcess/API/gtk/WebKitWebResourcePrivate.h
213     UIProcess/API/gtk/WebKitWebView.cpp
214     UIProcess/API/gtk/WebKitWebView.h
215     UIProcess/API/gtk/WebKitWebViewBase.cpp
216     UIProcess/API/gtk/WebKitWebViewBase.h
217     UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp
218     UIProcess/API/gtk/WebKitWebViewBaseAccessible.h
219     UIProcess/API/gtk/WebKitWebViewBasePrivate.h
220     UIProcess/API/gtk/WebKitWebViewGroup.cpp
221     UIProcess/API/gtk/WebKitWebViewGroup.h
222     UIProcess/API/gtk/WebKitWebViewGroupPrivate.h
223     UIProcess/API/gtk/WebKitWebViewPrivate.h
224     UIProcess/API/gtk/WebKitWindowProperties.cpp
225     UIProcess/API/gtk/WebKitWindowProperties.h
226     UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h
227     UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp
228     UIProcess/API/gtk/WebViewBaseInputMethodFilter.h
229     UIProcess/API/gtk/webkit2.h
230
231     UIProcess/CoordinatedGraphics/WebView.cpp
232     UIProcess/CoordinatedGraphics/WebViewClient.cpp
233
234     UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp
235
236     UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp
237
238     UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
239
240     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
241     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
242
243     UIProcess/Storage/StorageManager.cpp
244
245     UIProcess/cairo/BackingStoreCairo.cpp
246
247     UIProcess/gtk/ExperimentalFeatures.cpp
248     UIProcess/gtk/TextCheckerGtk.cpp
249     UIProcess/gtk/WebContextGtk.cpp
250     UIProcess/gtk/WebContextMenuProxyGtk.cpp
251     UIProcess/gtk/WebFullScreenClientGtk.cpp
252     UIProcess/gtk/WebInspectorClientGtk.cpp
253     UIProcess/gtk/WebInspectorProxyGtk.cpp
254     UIProcess/gtk/WebPageProxyGtk.cpp
255     UIProcess/gtk/WebPopupMenuProxyGtk.cpp
256     UIProcess/gtk/WebPreferencesGtk.cpp
257     UIProcess/gtk/WebProcessProxyGtk.cpp
258
259     UIProcess/soup/WebCookieManagerProxySoup.cpp
260     UIProcess/soup/WebSoupRequestManagerClient.cpp
261     UIProcess/soup/WebSoupRequestManagerProxy.cpp
262
263     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
264     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
265
266     WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp
267     WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp
268     WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp
269     WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp
270
271     WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp
272
273     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
274
275     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
276
277     WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp
278     WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp
279     WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
280     WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp
281     WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp
282
283     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
284
285     WebProcess/WebPage/DrawingAreaImpl.cpp
286
287     WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
288
289     WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
290     WebProcess/WebPage/gtk/WebInspectorGtk.cpp
291     WebProcess/WebPage/gtk/WebPageGtk.cpp
292     WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
293
294     WebProcess/gtk/WebGtkExtensionManager.cpp
295     WebProcess/gtk/WebGtkInjectedBundleMain.cpp
296     WebProcess/gtk/WebProcessMainGtk.cpp
297
298     WebProcess/soup/WebKitSoupRequestGeneric.cpp
299     WebProcess/soup/WebKitSoupRequestInputStream.cpp
300     WebProcess/soup/WebProcessSoup.cpp
301     WebProcess/soup/WebSoupRequestManager.cpp
302 )
303
304 set(WebKit2_INSTALLED_HEADERS
305     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardList.h
306     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardListItem.h
307     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCertificateInfo.h
308     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
309     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
310     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
311     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCookieManager.h
312     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDefines.h
313     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDownload.h
314     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEditingCommands.h
315     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitError.h
316     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFaviconDatabase.h
317     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFileChooserRequest.h
318     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFindController.h
319     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFormSubmissionRequest.h
320     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitForwardDeclarations.h
321     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
322     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
323     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitJavascriptResult.h
324     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitMimeInfo.h
325     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
326     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPermissionRequest.h
327     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPlugin.h
328     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPolicyDecision.h
329     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPrintOperation.h
330     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitResponsePolicyDecision.h
331     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitScriptDialog.h
332     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSecurityManager.h
333     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSettings.h
334     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
335     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
336     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURISchemeRequest.h
337     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebContext.h
338     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebInspector.h
339     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebResource.h
340     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebView.h
341     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewBase.h
342     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewGroup.h
343     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWindowProperties.h
344     ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2.h
345
346     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp
347     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitFrame.h
348     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h
349     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp
350     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h
351     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h
352     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp
353     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h
354     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h
355     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp
356     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
357     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h
358     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
359 )
360
361 file(GLOB InspectorFiles
362     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
363     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.css
364     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*
365     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html
366     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/*.png
367     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/*.svg
368     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.js
369 )
370
371 list(APPEND WebKit2_MESSAGES_IN_FILES
372     UIProcess/soup/WebSoupRequestManagerProxy.messages.in
373
374     WebProcess/soup/WebSoupRequestManager.messages.in
375 )
376
377 # This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore.
378 list(INSERT WebKit2_INCLUDE_DIRECTORIES 0
379     "${WEBKIT2_FORWARDING_HEADERS_DIR}"
380     "${WEBKIT2_FORWARDING_HEADERS_DIR}/webkit2extension"
381     "${WEBKIT2_BUILT_API_DIR}"
382     "${DERIVED_SOURCES_WEBKIT2GTK_DIR}"
383 )
384
385 list(APPEND WebKit2_INCLUDE_DIRECTORIES
386     "${WEBCORE_DIR}/platform/cairo"
387     "${WEBCORE_DIR}/platform/gtk"
388     "${WEBCORE_DIR}/platform/graphics/cairo"
389     "${WEBCORE_DIR}/platform/graphics/opentype"
390     "${WEBCORE_DIR}/platform/network/soup"
391     "${WEBCORE_DIR}/platform/text/enchant"
392     "${WEBKIT2_DIR}/Shared/API/c/gtk"
393     "${WEBKIT2_DIR}/Shared/Downloads/soup"
394     "${WEBKIT2_DIR}/Shared/gtk"
395     "${WEBKIT2_DIR}/Shared/soup"
396     "${WEBKIT2_DIR}/UIProcess/API/C/cairo"
397     "${WEBKIT2_DIR}/UIProcess/API/C/gtk"
398     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
399     "${WEBKIT2_DIR}/UIProcess/API/cpp/gtk"
400     "${WEBKIT2_DIR}/UIProcess/API/gtk"
401     "${WEBKIT2_DIR}/UIProcess/gtk"
402     "${WEBKIT2_DIR}/UIProcess/soup"
403     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk"
404     "${WEBKIT2_DIR}/WebProcess/gtk"
405     "${WEBKIT2_DIR}/WebProcess/soup"
406     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/gtk"
407     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
408     "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
409     "${WEBKIT2_DIR}/WebProcess/WebPage/gtk"
410     "${WTF_DIR}/wtf/gtk/"
411     "${WTF_DIR}/wtf/gobject"
412     ${WTF_DIR}
413     ${CAIRO_INCLUDE_DIRS}
414     ${ENCHANT_INCLUDE_DIRS}
415     ${LIBSOUP_INCLUDE_DIRS}
416 )
417
418 set(WebKit2CommonIncludeDirectories ${WebKit2_INCLUDE_DIRECTORIES})
419
420 list(APPEND WebKit2_INCLUDE_DIRECTORIES
421     ${GLIB_INCLUDE_DIRS}
422     ${GTK3_INCLUDE_DIRS}
423 )
424
425 list(APPEND WebProcess_SOURCES
426     gtk/MainGtk.cpp
427 )
428
429 set(SharedWebKit2Libraries
430     ${WebKit2_LIBRARIES}
431 )
432
433 list(APPEND WebKit2_LIBRARIES
434     GObjectDOMBindings
435     WebCorePlatformGTK
436 )
437
438 set(WebKit2_MARSHAL_LIST ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2marshal.list)
439 add_custom_command(
440     OUTPUT ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
441            ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.h
442     MAIN_DEPENDENCY ${WebKit2_MARSHAL_LIST}
443
444     COMMAND echo extern \"C\" { > ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
445     COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --body >> ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
446     COMMAND echo } >> ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
447
448     COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --header > ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.h
449     VERBATIM)
450
451 add_custom_command(
452     OUTPUT ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.h
453            ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
454     DEPENDS ${WebKit2_INSTALLED_HEADERS}
455
456     COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.h.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.h
457
458     COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.cpp.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ > ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
459     VERBATIM)
460
461 add_custom_command(
462     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
463     DEPENDS ${InspectorFiles}
464             ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py
465     COMMAND ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
466     VERBATIM
467 )
468
469 add_custom_command(
470     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
471     DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
472             ${InspectorFiles}
473     COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebInspectorUI --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
474     VERBATIM
475 )
476
477 add_custom_command(
478     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
479     DEPENDS ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
480             ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
481     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
482     VERBATIM
483 )
484
485 # This symbolic link allows includes like #include <webkit2/WebkitWebView.h> which simulates installed headers.
486 add_custom_target(fake-installed-headers
487     mkdir -p ${DERIVED_SOURCES_WEBKIT2_DIR}/webkit2gtk/include
488     COMMAND ln -n -s -f ${WEBKIT2_DIR}/UIProcess/API/gtk ${WEBKIT2_FORWARDING_HEADERS_DIR}/webkit2
489 )
490
491 add_custom_target(fake-installed-webextension-headers
492     mkdir -p ${WEBKIT2_FORWARDING_HEADERS_DIR}/webkit2extension
493     COMMAND ln -n -s -f ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk ${WEBKIT2_FORWARDING_HEADERS_DIR}/webkit2extension/webkit2
494 )
495
496 add_custom_target(gtk-forwarding-headers
497     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include gtk
498 )
499
500 add_custom_target(soup-forwarding-headers
501     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
502 )
503
504 set(WEBKIT2_EXTRA_DEPENDENCIES
505      fake-installed-headers
506      gtk-forwarding-headers
507      soup-forwarding-headers
508      fake-installed-webextension-headers
509 )
510
511 if (ENABLE_PLUGIN_PROCESS)
512     set(PluginProcess_EXECUTABLE_NAME WebKitPluginProcess)
513     list(APPEND PluginProcess_INCLUDE_DIRECTORIES
514         "${WEBKIT2_DIR}/PluginProcess/unix"
515     )
516
517     include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
518
519     # FIXME: We should figure out a way to avoid compiling files that are common between the plugin
520     # process and WebKit2 only once instead of recompiling them for the plugin process.
521     list(APPEND PluginProcess_SOURCES
522         Platform/CoreIPC/ArgumentCoders.cpp
523         Platform/CoreIPC/ArgumentDecoder.cpp
524         Platform/CoreIPC/ArgumentEncoder.cpp
525
526         Platform/CoreIPC/Attachment.cpp
527         Platform/CoreIPC/Connection.cpp
528         Platform/CoreIPC/MessageDecoder.cpp
529         Platform/CoreIPC/MessageEncoder.cpp
530         Platform/CoreIPC/MessageReceiverMap.cpp
531
532         Platform/CoreIPC/unix/AttachmentUnix.cpp
533         Platform/CoreIPC/unix/ConnectionUnix.cpp
534
535         Platform/IPC/DataReference.cpp
536         Platform/IPC/StringReference.cpp
537         Platform/IPC/MessageSender.cpp
538
539         Platform/Logging.cpp
540         Platform/Module.cpp
541         Platform/WorkQueue.cpp
542
543         Platform/gtk/LoggingGtk.cpp
544         Platform/gtk/ModuleGtk.cpp
545         Platform/gtk/WorkQueueGtk.cpp
546         Platform/unix/SharedMemoryUnix.cpp
547
548         PluginProcess/PluginControllerProxy.cpp
549         PluginProcess/PluginCreationParameters.cpp
550         PluginProcess/PluginProcess.cpp
551         PluginProcess/WebProcessConnection.cpp
552
553         PluginProcess/unix/PluginControllerProxyUnix.cpp
554         PluginProcess/unix/PluginProcessMainUnix.cpp
555         PluginProcess/unix/PluginProcessUnix.cpp
556
557         Shared/ActivityAssertion.cpp
558         Shared/ChildProcess.cpp
559         Shared/ChildProcessProxy.cpp
560         Shared/ConnectionStack.cpp
561
562         Shared/Plugins/NPIdentifierData.cpp
563         Shared/Plugins/NPObjectMessageReceiver.cpp
564         Shared/Plugins/NPObjectProxy.cpp
565         Shared/Plugins/NPRemoteObjectMap.cpp
566         Shared/Plugins/NPVariantData.cpp
567
568         Shared/Plugins/Netscape/NetscapePluginModule.cpp
569         Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp
570         Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
571
572         Shared/Plugins/PluginProcessCreationParameters.cpp
573
574         Shared/ShareableBitmap.cpp
575         Shared/WebCoreArgumentCoders.cpp
576         Shared/WebEvent.cpp
577         Shared/WebKeyboardEvent.cpp
578         Shared/WebKit2Initialize.cpp
579         Shared/WebMouseEvent.cpp
580         Shared/WebWheelEvent.cpp
581
582         Shared/cairo/ShareableBitmapCairo.cpp
583
584         Shared/gtk/NativeWebKeyboardEventGtk.cpp
585         Shared/gtk/NativeWebMouseEventGtk.cpp
586         Shared/gtk/NativeWebWheelEventGtk.cpp
587         Shared/gtk/ProcessExecutablePathGtk.cpp
588         Shared/gtk/WebEventFactory.cpp
589
590         Shared/soup/WebCoreArgumentCodersSoup.cpp
591
592         UIProcess/Launcher/ProcessLauncher.cpp
593         UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
594
595         UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
596
597         WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp
598         WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
599         WebProcess/Plugins/Netscape/NetscapePlugin.cpp
600         WebProcess/Plugins/Netscape/NetscapePluginNone.cpp
601         WebProcess/Plugins/Netscape/NetscapePluginStream.cpp
602         WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
603
604         WebProcess/Plugins/Plugin.cpp
605
606         unix/PluginMainUnix.cpp
607         unix/PluginMainUnix.cpp
608     )
609
610     list(APPEND PluginProcess_MESSAGES_IN_FILES
611         Shared/Plugins/NPObjectMessageReceiver.messages.in
612
613         PluginProcess/PluginControllerProxy.messages.in
614         PluginProcess/PluginProcess.messages.in
615         PluginProcess/WebProcessConnection.messages.in
616     )
617     GENERATE_WEBKIT2_MESSAGE_SOURCES(PluginProcess_SOURCES "${PluginProcess_MESSAGES_IN_FILES}")
618
619     add_executable(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_SOURCES})
620
621     # We need ENABLE_PLUGIN_PROCESS for all targets in this directory, but
622     # we only want GTK_API_VERSION_2 for the plugin process target.
623     add_definitions(-DENABLE_PLUGIN_PROCESS=1)
624     set_property(
625         TARGET ${PluginProcess_EXECUTABLE_NAME}
626         APPEND
627         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
628     )
629     set_property(
630         TARGET ${PluginProcess_EXECUTABLE_NAME}
631         APPEND
632         PROPERTY INCLUDE_DIRECTORIES
633             ${WebKit2CommonIncludeDirectories}
634             ${GTK2_INCLUDE_DIRS}
635             ${GDK2_INCLUDE_DIRS}
636     )
637
638     target_link_libraries(${PluginProcess_EXECUTABLE_NAME}
639         ${SharedWebKit2Libraries}
640         WebCorePlatformGTK2
641         WebCore
642     )
643
644     add_dependencies(${PluginProcess_EXECUTABLE_NAME} WebKit2)
645
646     install(TARGETS ${PluginProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
647 endif () # ENABLE_PLUGIN_PROCESS
648
649 # Commands for building the built-in injected bundle.
650 include_directories(
651     "${WEBKIT2_DIR}/Platform"
652     "${WEBKIT2_DIR}/Shared"
653     "${WEBKIT2_DIR}/Shared/API/c"
654     "${WEBKIT2_DIR}/UIProcess/API/C"
655     "${WEBKIT2_DIR}/WebProcess/InjectedBundle"
656     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c"
657     "${DERIVED_SOURCES_DIR}"
658     "${DERIVED_SOURCES_DIR}/InjectedBundle"
659     "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
660     "${DERIVED_SOURCES_WEBKIT2_DIR}/include"
661 )
662
663 add_library(webkit2gtkinjectedbundle MODULE
664     "${WEBKIT2_DIR}/WebProcess/gtk/WebGtkInjectedBundleMain.cpp"
665 )
666 add_dependencies(webkit2gtkinjectedbundle GObjectDOMBindings)