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