419dceb41944ddbec100904259defe1bfaa71eae
[WebKit-https.git] / Source / WebKit / PlatformWPE.cmake
1 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WPE_API_DIR})
2 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WPE_DIR})
3 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WPE_EXTENSION_DIR})
4
5 configure_file(wpe/wpe-webkit.pc.in ${CMAKE_BINARY_DIR}/wpe-webkit.pc @ONLY)
6
7 add_definitions(-DWEBKIT2_COMPILATION)
8
9 add_definitions(-DLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
10 add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
11
12 set(WebKit2_USE_PREFIX_HEADER ON)
13
14 add_custom_target(webkit2wpe-forwarding-headers
15     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT2_DIR} --output ${FORWARDING_HEADERS_DIR} --platform wpe --platform soup
16 )
17
18  # These symbolic link allows includes like #include <wpe/WebkitWebView.h> which simulates installed headers.
19 add_custom_command(
20     OUTPUT ${FORWARDING_HEADERS_WPE_DIR}/wpe
21     DEPENDS ${WEBKIT2_DIR}/UIProcess/API/wpe
22     COMMAND ln -n -s -f ${WEBKIT2_DIR}/UIProcess/API/wpe ${FORWARDING_HEADERS_WPE_DIR}/wpe
23 )
24
25 add_custom_command(
26     OUTPUT ${FORWARDING_HEADERS_WPE_EXTENSION_DIR}/wpe
27     DEPENDS ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/wpe
28     COMMAND ln -n -s -f ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/wpe ${FORWARDING_HEADERS_WPE_EXTENSION_DIR}/wpe
29 )
30
31 add_custom_target(webkit2wpe-fake-api-headers
32     DEPENDS ${FORWARDING_HEADERS_WPE_DIR}/wpe
33             ${FORWARDING_HEADERS_WPE_EXTENSION_DIR}/wpe
34 )
35
36 set(WEBKIT2_EXTRA_DEPENDENCIES
37     webkit2wpe-fake-api-headers
38     webkit2wpe-forwarding-headers
39 )
40
41 list(APPEND WebProcess_SOURCES
42     WebProcess/EntryPoint/unix/WebProcessMain.cpp
43 )
44
45 list(APPEND NetworkProcess_SOURCES
46     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
47 )
48
49 list(APPEND StorageProcess_SOURCES
50     StorageProcess/EntryPoint/unix/StorageProcessMain.cpp
51 )
52
53 list(APPEND WebKit2_SOURCES
54     NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp
55
56     NetworkProcess/cache/NetworkCacheCodersSoup.cpp
57     NetworkProcess/cache/NetworkCacheDataSoup.cpp
58     NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp
59
60     NetworkProcess/soup/NetworkDataTaskSoup.cpp
61     NetworkProcess/soup/NetworkProcessMainSoup.cpp
62     NetworkProcess/soup/NetworkProcessSoup.cpp
63     NetworkProcess/soup/NetworkSessionSoup.cpp
64     NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
65
66     Platform/IPC/glib/GSocketMonitor.cpp
67
68     Platform/IPC/unix/AttachmentUnix.cpp
69     Platform/IPC/unix/ConnectionUnix.cpp
70
71     Platform/classifier/ResourceLoadStatisticsClassifier.cpp
72
73     Platform/glib/ModuleGlib.cpp
74
75     Platform/unix/LoggingUnix.cpp
76     Platform/unix/SharedMemoryUnix.cpp
77
78     PluginProcess/unix/PluginControllerProxyUnix.cpp
79     PluginProcess/unix/PluginProcessMainUnix.cpp
80     PluginProcess/unix/PluginProcessUnix.cpp
81
82     Shared/API/c/cairo/WKImageCairo.cpp
83
84     Shared/API/glib/WebKitContextMenu.cpp
85     Shared/API/glib/WebKitContextMenuActions.cpp
86     Shared/API/glib/WebKitContextMenuItem.cpp
87     Shared/API/glib/WebKitHitTestResult.cpp
88     Shared/API/glib/WebKitURIRequest.cpp
89     Shared/API/glib/WebKitURIResponse.cpp
90
91     Shared/Authentication/soup/AuthenticationManagerSoup.cpp
92
93     Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
94     Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
95     Shared/CoordinatedGraphics/SimpleViewportController.cpp
96
97     Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp
98     Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp
99     Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
100     Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp
101
102     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
103
104     Shared/cairo/ShareableBitmapCairo.cpp
105
106     Shared/glib/WebContextMenuItemGlib.cpp
107     Shared/glib/WebErrorsGlib.cpp
108
109     Shared/linux/WebMemorySamplerLinux.cpp
110
111     Shared/soup/WebCoreArgumentCodersSoup.cpp
112     Shared/soup/WebErrorsSoup.cpp
113
114     Shared/unix/ChildProcessMain.cpp
115
116     Shared/wpe/NativeWebKeyboardEventWPE.cpp
117     Shared/wpe/NativeWebMouseEventWPE.cpp
118     Shared/wpe/NativeWebTouchEventWPE.cpp
119     Shared/wpe/NativeWebWheelEventWPE.cpp
120     Shared/wpe/ProcessExecutablePathWPE.cpp
121     Shared/wpe/WebEventFactory.cpp
122
123     UIProcess/AcceleratedDrawingAreaProxy.cpp
124     UIProcess/BackingStore.cpp
125     UIProcess/DefaultUndoController.cpp
126     UIProcess/LegacySessionStateCodingNone.cpp
127     UIProcess/WebResourceLoadStatisticsStore.cpp
128     UIProcess/WebResourceLoadStatisticsTelemetry.cpp
129
130     UIProcess/API/C/WKGrammarDetail.cpp
131
132     UIProcess/API/C/wpe/WKView.cpp
133
134     UIProcess/API/glib/IconDatabase.cpp
135     UIProcess/API/glib/WebKitApplicationInfo.cpp
136     UIProcess/API/glib/WebKitAuthenticationRequest.cpp
137     UIProcess/API/glib/WebKitAutomationSession.cpp
138     UIProcess/API/glib/WebKitBackForwardList.cpp
139     UIProcess/API/glib/WebKitBackForwardListItem.cpp
140     UIProcess/API/glib/WebKitContextMenuClient.cpp
141     UIProcess/API/glib/WebKitCookieManager.cpp
142     UIProcess/API/glib/WebKitCredential.cpp
143     UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp
144     UIProcess/API/glib/WebKitDownload.cpp
145     UIProcess/API/glib/WebKitDownloadClient.cpp
146     UIProcess/API/glib/WebKitEditorState.cpp
147     UIProcess/API/glib/WebKitError.cpp
148     UIProcess/API/glib/WebKitFaviconDatabase.cpp
149     UIProcess/API/glib/WebKitFileChooserRequest.cpp
150     UIProcess/API/glib/WebKitFindController.cpp
151     UIProcess/API/glib/WebKitFormClient.cpp
152     UIProcess/API/glib/WebKitFormSubmissionRequest.cpp
153     UIProcess/API/glib/WebKitGeolocationPermissionRequest.cpp
154     UIProcess/API/glib/WebKitGeolocationProvider.cpp
155     UIProcess/API/glib/WebKitIconLoadingClient.cpp
156     UIProcess/API/glib/WebKitInjectedBundleClient.cpp
157     UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp
158     UIProcess/API/glib/WebKitJavascriptResult.cpp
159     UIProcess/API/glib/WebKitLoaderClient.cpp
160     UIProcess/API/glib/WebKitMimeInfo.cpp
161     UIProcess/API/glib/WebKitNavigationAction.cpp
162     UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp
163     UIProcess/API/glib/WebKitNetworkProxySettings.cpp
164     UIProcess/API/glib/WebKitNotification.cpp
165     UIProcess/API/glib/WebKitNotificationPermissionRequest.cpp
166     UIProcess/API/glib/WebKitNotificationProvider.cpp
167     UIProcess/API/glib/WebKitPermissionRequest.cpp
168     UIProcess/API/glib/WebKitPlugin.cpp
169     UIProcess/API/glib/WebKitPolicyClient.cpp
170     UIProcess/API/glib/WebKitPolicyDecision.cpp
171     UIProcess/API/glib/WebKitPrivate.cpp
172     UIProcess/API/glib/WebKitResponsePolicyDecision.cpp
173     UIProcess/API/glib/WebKitScriptDialog.cpp
174     UIProcess/API/glib/WebKitSecurityManager.cpp
175     UIProcess/API/glib/WebKitSecurityOrigin.cpp
176     UIProcess/API/glib/WebKitSettings.cpp
177     UIProcess/API/glib/WebKitUIClient.cpp
178     UIProcess/API/glib/WebKitURISchemeRequest.cpp
179     UIProcess/API/glib/WebKitUserContent.cpp
180     UIProcess/API/glib/WebKitUserContentManager.cpp
181     UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp
182     UIProcess/API/glib/WebKitWebContext.cpp
183     UIProcess/API/glib/WebKitWebResource.cpp
184     UIProcess/API/glib/WebKitWebView.cpp
185     UIProcess/API/glib/WebKitWebViewSessionState.cpp
186     UIProcess/API/glib/WebKitWebsiteData.cpp
187     UIProcess/API/glib/WebKitWebsiteDataManager.cpp
188     UIProcess/API/glib/WebKitWindowProperties.cpp
189
190     UIProcess/API/wpe/CompositingManagerProxy.cpp
191     UIProcess/API/wpe/PageClientImpl.cpp
192     UIProcess/API/wpe/ScrollGestureController.cpp
193     UIProcess/API/wpe/WebKitScriptDialogWPE.cpp
194     UIProcess/API/wpe/WebKitWebViewWPE.cpp
195     UIProcess/API/wpe/WPEView.cpp
196
197     UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp
198
199     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
200     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
201
202     UIProcess/WebStorage/StorageManager.cpp
203
204     UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp
205
206     UIProcess/cairo/BackingStoreCairo.cpp
207
208     UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp
209     UIProcess/gstreamer/WebPageProxyGStreamer.cpp
210
211     UIProcess/linux/MemoryPressureMonitor.cpp
212
213     UIProcess/soup/WebCookieManagerProxySoup.cpp
214     UIProcess/soup/WebProcessPoolSoup.cpp
215
216     UIProcess/wpe/TextCheckerWPE.cpp
217     UIProcess/wpe/WebInspectorProxyWPE.cpp
218     UIProcess/wpe/WebPageProxyWPE.cpp
219     UIProcess/wpe/WebPasteboardProxyWPE.cpp
220     UIProcess/wpe/WebPreferencesWPE.cpp
221     UIProcess/wpe/WebProcessPoolWPE.cpp
222
223     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
224
225     WebProcess/InjectedBundle/API/glib/WebKitConsoleMessage.cpp
226     WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp
227     WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp
228     WebProcess/InjectedBundle/API/glib/WebKitScriptWorld.cpp
229     WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp
230     WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
231     WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp
232
233     WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp
234
235     WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
236
237     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
238
239     WebProcess/WebCoreSupport/wpe/WebContextMenuClientWPE.cpp
240     WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp
241     WebProcess/WebCoreSupport/wpe/WebPopupMenuWPE.cpp
242
243     WebProcess/WebPage/AcceleratedDrawingArea.cpp
244     WebProcess/WebPage/AcceleratedSurface.cpp
245
246     WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp
247     WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp
248     WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
249     WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp
250     WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp
251
252     WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp
253
254     WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp
255     WebProcess/WebPage/wpe/CompositingManager.cpp
256     WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp
257     WebProcess/WebPage/wpe/WebPageWPE.cpp
258
259     WebProcess/soup/WebKitSoupRequestInputStream.cpp
260     WebProcess/soup/WebProcessSoup.cpp
261
262     WebProcess/wpe/WebProcessMainWPE.cpp
263
264     # FIXME-GWSHARE:
265     StorageProcess/gtk/StorageProcessMainGtk.cpp
266 )
267
268 list(APPEND WebKit2_MESSAGES_IN_FILES
269     UIProcess/API/wpe/CompositingManagerProxy.messages.in
270 )
271
272 list(APPEND WebKit2_DERIVED_SOURCES
273     ${DERIVED_SOURCES_WEBKIT2_DIR}/WebKit2ResourcesGResourceBundle.c
274
275     ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
276 )
277
278 set(WPE_API_INSTALLED_HEADERS
279     ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
280     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitApplicationInfo.h
281     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitAuthenticationRequest.h
282     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitAutomationSession.h
283     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitBackForwardList.h
284     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitBackForwardListItem.h
285     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitCredential.h
286     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitContextMenu.h
287     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitContextMenuActions.h
288     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitContextMenuItem.h
289     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitCookieManager.h
290     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitDefines.h
291     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitDownload.h
292     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitEditingCommands.h
293     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitEditorState.h
294     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitError.h
295     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitFaviconDatabase.h
296     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitFindController.h
297     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitFormSubmissionRequest.h
298     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h
299     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitHitTestResult.h
300     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h
301     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitJavascriptResult.h
302     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitMimeInfo.h
303     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNavigationAction.h
304     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNavigationPolicyDecision.h
305     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNetworkProxySettings.h
306     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNotificationPermissionRequest.h
307     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNotification.h
308     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitPermissionRequest.h
309     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitPlugin.h
310     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitPolicyDecision.h
311     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitResponsePolicyDecision.h
312     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitSecurityManager.h
313     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitSecurityOrigin.h
314     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitSettings.h
315     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitURIRequest.h
316     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitURIResponse.h
317     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitURISchemeRequest.h
318     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitUserContent.h
319     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitUserContentManager.h
320     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h
321     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebContext.h
322     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebResource.h
323     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebView.h
324     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebViewSessionState.h
325     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebsiteData.h
326     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebsiteDataManager.h
327     ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWindowProperties.h
328     ${WEBKIT2_DIR}/UIProcess/API/wpe/webkit.h
329 )
330
331 # To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
332 set(WPE_ENUM_GENERATION_HEADERS ${WPE_API_INSTALLED_HEADERS})
333 list(REMOVE_ITEM WPE_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h)
334 add_custom_command(
335     OUTPUT ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
336            ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
337     DEPENDS ${WPE_ENUM_GENERATION_HEADERS}
338
339     COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitEnumTypes.h.template ${WPE_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
340
341     COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitEnumTypes.cpp.template ${WPE_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
342     VERBATIM
343 )
344
345 set(WebKit2Resources
346 )
347
348 if (ENABLE_WEB_AUDIO)
349     list(APPEND WebKit2Resources
350         "        <file alias=\"audio/Composite\">Composite.wav</file>\n"
351     )
352 endif ()
353
354 file(WRITE ${DERIVED_SOURCES_WEBKIT2_DIR}/WebKit2ResourcesGResourceBundle.xml
355     "<?xml version=1.0 encoding=UTF-8?>\n"
356     "<gresources>\n"
357     "    <gresource prefix=\"/org/webkitwpe/resources\">\n"
358     ${WebKit2Resources}
359     "    </gresource>\n"
360     "</gresources>\n"
361 )
362
363 add_custom_command(
364     OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/WebKit2ResourcesGResourceBundle.c
365     DEPENDS ${DERIVED_SOURCES_WEBKIT2_DIR}/WebKit2ResourcesGResourceBundle.xml
366     COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --target=${DERIVED_SOURCES_WEBKIT2_DIR}/WebKit2ResourcesGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2_DIR}/WebKit2ResourcesGResourceBundle.xml
367     VERBATIM
368 )
369
370 list(APPEND WebKit2_INCLUDE_DIRECTORIES
371     "${FORWARDING_HEADERS_DIR}"
372     "${FORWARDING_HEADERS_WPE_DIR}"
373     "${FORWARDING_HEADERS_WPE_EXTENSION_DIR}"
374     "${DERIVED_SOURCES_DIR}"
375     "${DERIVED_SOURCES_WPE_API_DIR}"
376     "${WEBCORE_DIR}/platform/graphics/cairo"
377     "${WEBCORE_DIR}/platform/graphics/freetype"
378     "${WEBCORE_DIR}/platform/graphics/opentype"
379     "${WEBCORE_DIR}/platform/graphics/texmap/coordinated"
380     "${WEBCORE_DIR}/platform/network/soup"
381     "${WEBKIT2_DIR}/NetworkProcess/CustomProtocols/soup"
382     "${WEBKIT2_DIR}/NetworkProcess/Downloads/soup"
383     "${WEBKIT2_DIR}/NetworkProcess/soup"
384     "${WEBKIT2_DIR}/NetworkProcess/unix"
385     "${WEBKIT2_DIR}/Platform/IPC/glib"
386     "${WEBKIT2_DIR}/Platform/IPC/unix"
387     "${WEBKIT2_DIR}/Platform/classifier"
388     "${WEBKIT2_DIR}/Shared/API/c/wpe"
389     "${WEBKIT2_DIR}/Shared/API/glib"
390     "${WEBKIT2_DIR}/Shared/CoordinatedGraphics"
391     "${WEBKIT2_DIR}/Shared/CoordinatedGraphics/threadedcompositor"
392     "${WEBKIT2_DIR}/Shared/glib"
393     "${WEBKIT2_DIR}/Shared/soup"
394     "${WEBKIT2_DIR}/Shared/unix"
395     "${WEBKIT2_DIR}/Shared/wpe"
396     "${WEBKIT2_DIR}/StorageProcess/unix"
397     "${WEBKIT2_DIR}/UIProcess/API/C/cairo"
398     "${WEBKIT2_DIR}/UIProcess/API/C/wpe"
399     "${WEBKIT2_DIR}/UIProcess/API/glib"
400     "${WEBKIT2_DIR}/UIProcess/API/wpe"
401     "${WEBKIT2_DIR}/UIProcess/Network/CustomProtocols/soup"
402     "${WEBKIT2_DIR}/UIProcess/gstreamer"
403     "${WEBKIT2_DIR}/UIProcess/linux"
404     "${WEBKIT2_DIR}/UIProcess/soup"
405     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/glib"
406     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/wpe"
407     "${WEBKIT2_DIR}/WebProcess/soup"
408     "${WEBKIT2_DIR}/WebProcess/unix"
409     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
410     "${WEBKIT2_DIR}/WebProcess/WebPage/CoordinatedGraphics"
411     "${WEBKIT2_DIR}/WebProcess/WebPage/wpe"
412     "${WTF_DIR}/wtf/gtk/"
413     "${WTF_DIR}/wtf/gobject"
414     "${WTF_DIR}"
415     ${CAIRO_INCLUDE_DIRS}
416     ${FREETYPE2_INCLUDE_DIRS}
417     ${GLIB_INCLUDE_DIRS}
418     ${GSTREAMER_INCLUDE_DIRS}
419     ${HARFBUZZ_INCLUDE_DIRS}
420     ${LIBSOUP_INCLUDE_DIRS}
421     ${WPE_INCLUDE_DIRS}
422 )
423
424 list(APPEND WebKit2_LIBRARIES
425     WebCorePlatformWPE
426     ${CAIRO_LIBRARIES}
427     ${FREETYPE2_LIBRARIES}
428     ${GLIB_LIBRARIES}
429     ${GSTREAMER_LIBRARIES}
430     ${HARFBUZZ_LIBRARIES}
431     ${LIBSOUP_LIBRARIES}
432     ${WPE_LIBRARIES}
433 )
434
435 set(InspectorFiles
436     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
437     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html
438     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Base/*.js
439     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.css
440     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.js
441     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Debug/*.css
442     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Debug/*.js
443     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.css
444     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.js
445     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/ESLint/*.js
446     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/Esprima/*.js
447     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.png
448     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.svg
449     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Models/*.js
450     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Protocol/*.js
451     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Proxies/*.js
452     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Test/*.js
453     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.css
454     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.js
455     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Workers/Formatter/*.js
456     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/*.js
457 )
458
459 file(GLOB InspectorFilesDependencies
460     ${InspectorFiles}
461 )
462
463 # DerivedSources/JavaScriptCore/inspector/InspectorBackendCommands.js is
464 # expected in DerivedSources/WebInspectorUI/UserInterface/Protocol/.
465 add_custom_command(
466     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
467     DEPENDS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js
468     COMMAND cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
469 )
470
471 add_custom_command(
472     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.xml
473     DEPENDS ${InspectorFilesDependencies}
474             ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
475             ${TOOLS_DIR}/wpe/generate-inspector-gresource-manifest.py
476     COMMAND ${TOOLS_DIR}/wpe/generate-inspector-gresource-manifest.py --output=${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.xml ${InspectorFiles} ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
477     VERBATIM
478 )
479
480 add_custom_command(
481     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.c
482     DEPENDS ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.xml
483     COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebInspectorUI --sourcedir=${DERIVED_SOURCES_WEBINSPECTORUI_DIR} --target=${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.c ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.xml
484     VERBATIM
485 )
486
487 list(APPEND WPEWebInspectorResources_DERIVED_SOURCES
488     ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.c
489 )
490
491 list(APPEND WPEWebInspectorResources_LIBRARIES
492     ${GLIB_GIO_LIBRARIES}
493 )
494
495 list(APPEND WPEWebInspectorResources_INCLUDE_DIRECTORIES
496     ${GLIB_INCLUDE_DIRS}
497 )
498
499 add_library(WPEWebInspectorResources SHARED ${WPEWebInspectorResources_DERIVED_SOURCES})
500 add_dependencies(WPEWebInspectorResources WebKit2)
501 target_link_libraries(WPEWebInspectorResources ${WPEWebInspectorResources_LIBRARIES})
502 target_include_directories(WPEWebInspectorResources PUBLIC ${WPEWebInspectorResources_INCLUDE_DIRECTORIES})
503 install(TARGETS WPEWebInspectorResources DESTINATION "${LIB_INSTALL_DIR}")
504
505 add_library(WPEInjectedBundle MODULE "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp")
506 add_webkit2_prefix_header(WPEInjectedBundle)
507 target_link_libraries(WPEInjectedBundle WebKit2)
508
509 if (EXPORT_DEPRECATED_WEBKIT2_C_API)
510     set(WPE_INSTALLED_WEBKIT_HEADERS
511         ${WEBKIT2_DIR}/Shared/API/c/WKArray.h
512         ${WEBKIT2_DIR}/Shared/API/c/WKBase.h
513         ${WEBKIT2_DIR}/Shared/API/c/WKData.h
514         ${WEBKIT2_DIR}/Shared/API/c/WKDeclarationSpecifiers.h
515         ${WEBKIT2_DIR}/Shared/API/c/WKDiagnosticLoggingResultType.h
516         ${WEBKIT2_DIR}/Shared/API/c/WKDictionary.h
517         ${WEBKIT2_DIR}/Shared/API/c/WKErrorRef.h
518         ${WEBKIT2_DIR}/Shared/API/c/WKEvent.h
519         ${WEBKIT2_DIR}/Shared/API/c/WKFindOptions.h
520         ${WEBKIT2_DIR}/Shared/API/c/WKGeometry.h
521         ${WEBKIT2_DIR}/Shared/API/c/WKImage.h
522         ${WEBKIT2_DIR}/Shared/API/c/WKMutableArray.h
523         ${WEBKIT2_DIR}/Shared/API/c/WKMutableDictionary.h
524         ${WEBKIT2_DIR}/Shared/API/c/WKNumber.h
525         ${WEBKIT2_DIR}/Shared/API/c/WKPageLoadTypes.h
526         ${WEBKIT2_DIR}/Shared/API/c/WKPageVisibilityTypes.h
527         ${WEBKIT2_DIR}/Shared/API/c/WKSecurityOriginRef.h
528         ${WEBKIT2_DIR}/Shared/API/c/WKSerializedScriptValue.h
529         ${WEBKIT2_DIR}/Shared/API/c/WKString.h
530         ${WEBKIT2_DIR}/Shared/API/c/WKType.h
531         ${WEBKIT2_DIR}/Shared/API/c/WKURL.h
532         ${WEBKIT2_DIR}/Shared/API/c/WKURLRequest.h
533         ${WEBKIT2_DIR}/Shared/API/c/WKURLResponse.h
534         ${WEBKIT2_DIR}/Shared/API/c/WKUserContentInjectedFrames.h
535         ${WEBKIT2_DIR}/Shared/API/c/WKUserContentURLPattern.h
536         ${WEBKIT2_DIR}/Shared/API/c/WKUserScriptInjectionTime.h
537
538         ${WEBKIT2_DIR}/Shared/API/c/wpe/WKBaseWPE.h
539
540         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundle.h
541         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h
542         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h
543         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.h
544         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h
545         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
546         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h
547         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleInitialize.h
548         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleInspector.h
549         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.h
550         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h
551         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePage.h
552         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h
553         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h
554         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h
555         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h
556         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h
557         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageGroup.h
558         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h
559         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h
560         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h
561         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h
562         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h
563         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.h
564         ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h
565
566         ${WEBKIT2_DIR}/UIProcess/API/C/WKBackForwardListItemRef.h
567         ${WEBKIT2_DIR}/UIProcess/API/C/WKBackForwardListRef.h
568         ${WEBKIT2_DIR}/UIProcess/API/C/WKContextConfigurationRef.h
569         ${WEBKIT2_DIR}/UIProcess/API/C/WKContextConnectionClient.h
570         ${WEBKIT2_DIR}/UIProcess/API/C/WKContextDownloadClient.h
571         ${WEBKIT2_DIR}/UIProcess/API/C/WKContextHistoryClient.h
572         ${WEBKIT2_DIR}/UIProcess/API/C/WKContextInjectedBundleClient.h
573         ${WEBKIT2_DIR}/UIProcess/API/C/WKContext.h
574         ${WEBKIT2_DIR}/UIProcess/API/C/WKCookieManager.h
575         ${WEBKIT2_DIR}/UIProcess/API/C/WKCredential.h
576         ${WEBKIT2_DIR}/UIProcess/API/C/WKCredentialTypes.h
577         ${WEBKIT2_DIR}/UIProcess/API/C/WKFrame.h
578         ${WEBKIT2_DIR}/UIProcess/API/C/WKFrameInfoRef.h
579         ${WEBKIT2_DIR}/UIProcess/API/C/WKFramePolicyListener.h
580         ${WEBKIT2_DIR}/UIProcess/API/C/WKHitTestResult.h
581         ${WEBKIT2_DIR}/UIProcess/API/C/WKNativeEvent.h
582         ${WEBKIT2_DIR}/UIProcess/API/C/WKNavigationActionRef.h
583         ${WEBKIT2_DIR}/UIProcess/API/C/WKNavigationDataRef.h
584         ${WEBKIT2_DIR}/UIProcess/API/C/WKNavigationRef.h
585         ${WEBKIT2_DIR}/UIProcess/API/C/WKNavigationResponseRef.h
586         ${WEBKIT2_DIR}/UIProcess/API/C/WKPage.h
587         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageConfigurationRef.h
588         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageContextMenuClient.h
589         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageDiagnosticLoggingClient.h
590         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageFindClient.h
591         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageFindMatchesClient.h
592         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageFormClient.h
593         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageGroup.h
594         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageInjectedBundleClient.h
595         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageLoaderClient.h
596         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageNavigationClient.h
597         ${WEBKIT2_DIR}/UIProcess/API/C/WKPagePolicyClient.h
598         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageRenderingProgressEvents.h
599         ${WEBKIT2_DIR}/UIProcess/API/C/WKPageUIClient.h
600         ${WEBKIT2_DIR}/UIProcess/API/C/WKPluginLoadPolicy.h
601         ${WEBKIT2_DIR}/UIProcess/API/C/WKPreferencesRef.h
602         ${WEBKIT2_DIR}/UIProcess/API/C/WKSessionStateRef.h
603         ${WEBKIT2_DIR}/UIProcess/API/C/WKUserContentControllerRef.h
604         ${WEBKIT2_DIR}/UIProcess/API/C/WKUserScriptRef.h
605         ${WEBKIT2_DIR}/UIProcess/API/C/WKViewportAttributes.h
606         ${WEBKIT2_DIR}/UIProcess/API/C/WKWindowFeaturesRef.h
607
608         ${WEBKIT2_DIR}/UIProcess/API/C/wpe/WKView.h
609     )
610
611     install(FILES ${WPE_INSTALLED_WEBKIT_HEADERS}
612         DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/wpe-${WPE_API_VERSION}/WPE/WebKit"
613         COMPONENT "Development"
614     )
615
616     set(WPE_INSTALLED_HEADERS
617         ${WEBKIT2_DIR}/Shared/API/c/wpe/WebKit.h
618     )
619
620     install(FILES ${WPE_INSTALLED_HEADERS}
621         DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/wpe-${WPE_API_VERSION}/WPE"
622         COMPONENT "Development"
623     )
624
625     install(FILES ${CMAKE_BINARY_DIR}/wpe-webkit.pc
626         DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
627         COMPONENT "Development"
628     )
629 endif ()