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