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