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