b9f281d3638c8924dccba61a564ad62fa298877d
[WebKit-https.git] / Source / WebKit / PlatformWPE.cmake
1 set(WebKit_OUTPUT_NAME WPEWebKit)
2 set(WebKit_WebProcess_OUTPUT_NAME WPEWebProcess)
3 set(WebKit_NetworkProcess_OUTPUT_NAME WPENetworkProcess)
4 set(WebKit_StorageProcess_OUTPUT_NAME WPEStorageProcess)
5
6 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WPE_API_DIR})
7 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WPE_DIR})
8 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WPE_EXTENSION_DIR})
9
10 configure_file(wpe/wpe-webkit.pc.in ${CMAKE_BINARY_DIR}/wpe-webkit.pc @ONLY)
11
12 add_definitions(-DWEBKIT2_COMPILATION)
13
14 add_definitions(-DLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
15 add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
16
17 # Temporary workaround to allow the build to succeed.
18 file(REMOVE "${FORWARDING_HEADERS_DIR}/WebCore/Settings.h")
19
20 set(WebKit_USE_PREFIX_HEADER ON)
21
22 add_custom_target(webkitwpe-forwarding-headers
23     DEPENDS ${WebKit_DERIVED_SOURCES}
24     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT_DIR} --include-path ${DERIVED_SOURCES_WEBKIT_DIR} --output ${FORWARDING_HEADERS_DIR} --platform wpe --platform soup
25 )
26
27  # These symbolic link allows includes like #include <wpe/WebkitWebView.h> which simulates installed headers.
28 add_custom_command(
29     OUTPUT ${FORWARDING_HEADERS_WPE_DIR}/wpe
30     DEPENDS ${WEBKIT_DIR}/UIProcess/API/wpe
31     COMMAND ln -n -s -f ${WEBKIT_DIR}/UIProcess/API/wpe ${FORWARDING_HEADERS_WPE_DIR}/wpe
32 )
33
34 add_custom_command(
35     OUTPUT ${FORWARDING_HEADERS_WPE_EXTENSION_DIR}/wpe
36     DEPENDS ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe
37     COMMAND ln -n -s -f ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe ${FORWARDING_HEADERS_WPE_EXTENSION_DIR}/wpe
38 )
39
40 add_custom_target(webkitwpe-fake-api-headers
41     DEPENDS ${FORWARDING_HEADERS_WPE_DIR}/wpe
42             ${FORWARDING_HEADERS_WPE_EXTENSION_DIR}/wpe
43 )
44
45 set(WEBKIT_EXTRA_DEPENDENCIES
46     webkitwpe-fake-api-headers
47     webkitwpe-forwarding-headers
48 )
49
50 list(APPEND WebProcess_SOURCES
51     WebProcess/EntryPoint/unix/WebProcessMain.cpp
52 )
53
54 list(APPEND NetworkProcess_SOURCES
55     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
56 )
57
58 list(APPEND StorageProcess_SOURCES
59     StorageProcess/EntryPoint/unix/StorageProcessMain.cpp
60 )
61
62 list(APPEND WebKit_SOURCES
63     NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp
64
65     NetworkProcess/cache/NetworkCacheCodersSoup.cpp
66     NetworkProcess/cache/NetworkCacheDataSoup.cpp
67     NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp
68
69     NetworkProcess/soup/NetworkDataTaskSoup.cpp
70     NetworkProcess/soup/NetworkProcessMainSoup.cpp
71     NetworkProcess/soup/NetworkProcessSoup.cpp
72     NetworkProcess/soup/NetworkSessionSoup.cpp
73     NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
74
75     Platform/IPC/glib/GSocketMonitor.cpp
76
77     Platform/IPC/unix/AttachmentUnix.cpp
78     Platform/IPC/unix/ConnectionUnix.cpp
79
80     Platform/classifier/ResourceLoadStatisticsClassifier.cpp
81
82     Platform/glib/ModuleGlib.cpp
83
84     Platform/unix/LoggingUnix.cpp
85     Platform/unix/SharedMemoryUnix.cpp
86
87     PluginProcess/unix/PluginControllerProxyUnix.cpp
88     PluginProcess/unix/PluginProcessMainUnix.cpp
89     PluginProcess/unix/PluginProcessUnix.cpp
90
91     Shared/API/c/cairo/WKImageCairo.cpp
92
93     Shared/API/glib/WebKitContextMenu.cpp
94     Shared/API/glib/WebKitContextMenuActions.cpp
95     Shared/API/glib/WebKitContextMenuItem.cpp
96     Shared/API/glib/WebKitHitTestResult.cpp
97     Shared/API/glib/WebKitURIRequest.cpp
98     Shared/API/glib/WebKitURIResponse.cpp
99
100     Shared/Authentication/soup/AuthenticationManagerSoup.cpp
101
102     Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
103     Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
104     Shared/CoordinatedGraphics/SimpleViewportController.cpp
105
106     Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp
107     Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp
108     Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
109     Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp
110
111     Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp
112
113     Shared/cairo/ShareableBitmapCairo.cpp
114
115     Shared/glib/WebContextMenuItemGlib.cpp
116     Shared/glib/WebErrorsGlib.cpp
117
118     Shared/linux/WebMemorySamplerLinux.cpp
119
120     Shared/soup/WebCoreArgumentCodersSoup.cpp
121     Shared/soup/WebErrorsSoup.cpp
122
123     Shared/unix/ChildProcessMain.cpp
124
125     Shared/wpe/NativeWebKeyboardEventWPE.cpp
126     Shared/wpe/NativeWebMouseEventWPE.cpp
127     Shared/wpe/NativeWebTouchEventWPE.cpp
128     Shared/wpe/NativeWebWheelEventWPE.cpp
129     Shared/wpe/ProcessExecutablePathWPE.cpp
130     Shared/wpe/WebEventFactory.cpp
131
132     StorageProcess/glib/StorageProcessMainGLib.cpp
133
134     UIProcess/AcceleratedDrawingAreaProxy.cpp
135     UIProcess/BackingStore.cpp
136     UIProcess/DefaultUndoController.cpp
137     UIProcess/LegacySessionStateCodingNone.cpp
138     UIProcess/WebResourceLoadStatisticsStore.cpp
139     UIProcess/WebResourceLoadStatisticsTelemetry.cpp
140
141     UIProcess/API/C/WKGrammarDetail.cpp
142
143     UIProcess/API/C/wpe/WKView.cpp
144
145     UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp
146     UIProcess/API/glib/IconDatabase.cpp
147     UIProcess/API/glib/WebKitApplicationInfo.cpp
148     UIProcess/API/glib/WebKitAuthenticationRequest.cpp
149     UIProcess/API/glib/WebKitAutomationSession.cpp
150     UIProcess/API/glib/WebKitBackForwardList.cpp
151     UIProcess/API/glib/WebKitBackForwardListItem.cpp
152     UIProcess/API/glib/WebKitContextMenuClient.cpp
153     UIProcess/API/glib/WebKitCookieManager.cpp
154     UIProcess/API/glib/WebKitCredential.cpp
155     UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp
156     UIProcess/API/glib/WebKitDownload.cpp
157     UIProcess/API/glib/WebKitDownloadClient.cpp
158     UIProcess/API/glib/WebKitEditorState.cpp
159     UIProcess/API/glib/WebKitError.cpp
160     UIProcess/API/glib/WebKitFaviconDatabase.cpp
161     UIProcess/API/glib/WebKitFileChooserRequest.cpp
162     UIProcess/API/glib/WebKitFindController.cpp
163     UIProcess/API/glib/WebKitFormClient.cpp
164     UIProcess/API/glib/WebKitFormSubmissionRequest.cpp
165     UIProcess/API/glib/WebKitGeolocationPermissionRequest.cpp
166     UIProcess/API/glib/WebKitGeolocationProvider.cpp
167     UIProcess/API/glib/WebKitInjectedBundleClient.cpp
168     UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp
169     UIProcess/API/glib/WebKitJavascriptResult.cpp
170     UIProcess/API/glib/WebKitLoaderClient.cpp
171     UIProcess/API/glib/WebKitMimeInfo.cpp
172     UIProcess/API/glib/WebKitNavigationAction.cpp
173     UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp
174     UIProcess/API/glib/WebKitNetworkProxySettings.cpp
175     UIProcess/API/glib/WebKitNotification.cpp
176     UIProcess/API/glib/WebKitNotificationPermissionRequest.cpp
177     UIProcess/API/glib/WebKitNotificationProvider.cpp
178     UIProcess/API/glib/WebKitPermissionRequest.cpp
179     UIProcess/API/glib/WebKitPlugin.cpp
180     UIProcess/API/glib/WebKitPolicyClient.cpp
181     UIProcess/API/glib/WebKitPolicyDecision.cpp
182     UIProcess/API/glib/WebKitPrivate.cpp
183     UIProcess/API/glib/WebKitResponsePolicyDecision.cpp
184     UIProcess/API/glib/WebKitScriptDialog.cpp
185     UIProcess/API/glib/WebKitSecurityManager.cpp
186     UIProcess/API/glib/WebKitSecurityOrigin.cpp
187     UIProcess/API/glib/WebKitSettings.cpp
188     UIProcess/API/glib/WebKitUIClient.cpp
189     UIProcess/API/glib/WebKitURISchemeRequest.cpp
190     UIProcess/API/glib/WebKitUserContent.cpp
191     UIProcess/API/glib/WebKitUserContentManager.cpp
192     UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp
193     UIProcess/API/glib/WebKitWebContext.cpp
194     UIProcess/API/glib/WebKitWebResource.cpp
195     UIProcess/API/glib/WebKitWebView.cpp
196     UIProcess/API/glib/WebKitWebViewSessionState.cpp
197     UIProcess/API/glib/WebKitWebsiteData.cpp
198     UIProcess/API/glib/WebKitWebsiteDataManager.cpp
199     UIProcess/API/glib/WebKitWindowProperties.cpp
200
201     UIProcess/API/wpe/CompositingManagerProxy.cpp
202     UIProcess/API/wpe/PageClientImpl.cpp
203     UIProcess/API/wpe/ScrollGestureController.cpp
204     UIProcess/API/wpe/WebKitScriptDialogWPE.cpp
205     UIProcess/API/wpe/WebKitWebViewWPE.cpp
206     UIProcess/API/wpe/WPEView.cpp
207
208     UIProcess/Automation/cairo/WebAutomationSessionCairo.cpp
209
210     UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
211
212     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
213     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
214
215     UIProcess/WebStorage/StorageManager.cpp
216
217     UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp
218
219     UIProcess/cairo/BackingStoreCairo.cpp
220
221     UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp
222     UIProcess/gstreamer/WebPageProxyGStreamer.cpp
223
224     UIProcess/linux/MemoryPressureMonitor.cpp
225
226     UIProcess/soup/WebCookieManagerProxySoup.cpp
227     UIProcess/soup/WebProcessPoolSoup.cpp
228
229     UIProcess/wpe/TextCheckerWPE.cpp
230     UIProcess/wpe/WebInspectorProxyWPE.cpp
231     UIProcess/wpe/WebPageProxyWPE.cpp
232     UIProcess/wpe/WebPasteboardProxyWPE.cpp
233     UIProcess/wpe/WebPreferencesWPE.cpp
234     UIProcess/wpe/WebProcessPoolWPE.cpp
235
236     WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
237
238     WebProcess/InjectedBundle/API/glib/WebKitConsoleMessage.cpp
239     WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp
240     WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp
241     WebProcess/InjectedBundle/API/glib/WebKitScriptWorld.cpp
242     WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp
243     WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
244     WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp
245
246     WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp
247
248     WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
249
250     WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
251
252     WebProcess/WebCoreSupport/wpe/WebContextMenuClientWPE.cpp
253     WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp
254     WebProcess/WebCoreSupport/wpe/WebPopupMenuWPE.cpp
255
256     WebProcess/WebPage/AcceleratedDrawingArea.cpp
257     WebProcess/WebPage/AcceleratedSurface.cpp
258
259     WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp
260     WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp
261     WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
262     WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp
263     WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp
264
265     WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp
266
267     WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp
268     WebProcess/WebPage/wpe/CompositingManager.cpp
269     WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp
270     WebProcess/WebPage/wpe/WebPageWPE.cpp
271
272     WebProcess/soup/WebKitSoupRequestInputStream.cpp
273     WebProcess/soup/WebProcessSoup.cpp
274
275     WebProcess/wpe/WebProcessMainWPE.cpp
276 )
277
278 list(APPEND WebKit_MESSAGES_IN_FILES
279     UIProcess/API/wpe/CompositingManagerProxy.messages.in
280 )
281
282 list(APPEND WebKit_DERIVED_SOURCES
283     ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.c
284
285     ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
286 )
287
288 set(WPE_API_INSTALLED_HEADERS
289     ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
290     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitApplicationInfo.h
291     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitAuthenticationRequest.h
292     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitAutomationSession.h
293     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitBackForwardList.h
294     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitBackForwardListItem.h
295     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitCredential.h
296     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitContextMenu.h
297     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitContextMenuActions.h
298     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitContextMenuItem.h
299     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitCookieManager.h
300     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitDefines.h
301     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitDownload.h
302     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitEditingCommands.h
303     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitEditorState.h
304     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitError.h
305     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitFaviconDatabase.h
306     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitFileChooserRequest.h
307     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitFindController.h
308     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitFormSubmissionRequest.h
309     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h
310     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitHitTestResult.h
311     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h
312     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitJavascriptResult.h
313     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitMimeInfo.h
314     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitNavigationAction.h
315     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitNavigationPolicyDecision.h
316     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitNetworkProxySettings.h
317     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitNotificationPermissionRequest.h
318     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitNotification.h
319     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitPermissionRequest.h
320     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitPlugin.h
321     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitPolicyDecision.h
322     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitResponsePolicyDecision.h
323     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitScriptDialog.h
324     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitSecurityManager.h
325     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitSecurityOrigin.h
326     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitSettings.h
327     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitURIRequest.h
328     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitURIResponse.h
329     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitURISchemeRequest.h
330     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitUserContent.h
331     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitUserContentManager.h
332     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h
333     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitWebContext.h
334     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitWebResource.h
335     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitWebView.h
336     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitWebViewSessionState.h
337     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitWebsiteData.h
338     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitWebsiteDataManager.h
339     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitWindowProperties.h
340     ${WEBKIT_DIR}/UIProcess/API/wpe/webkit.h
341 )
342
343 # To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
344 set(WPE_ENUM_GENERATION_HEADERS ${WPE_API_INSTALLED_HEADERS})
345 list(REMOVE_ITEM WPE_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h)
346 add_custom_command(
347     OUTPUT ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
348            ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
349     DEPENDS ${WPE_ENUM_GENERATION_HEADERS}
350
351     COMMAND glib-mkenums --template ${WEBKIT_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
352
353     COMMAND glib-mkenums --template ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitEnumTypes.cpp.template ${WPE_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
354     VERBATIM
355 )
356
357 set(WebKitResources
358 )
359
360 if (ENABLE_WEB_AUDIO)
361     list(APPEND WebKitResources
362         "        <file alias=\"audio/Composite\">Composite.wav</file>\n"
363     )
364 endif ()
365
366 file(WRITE ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.xml
367     "<?xml version=1.0 encoding=UTF-8?>\n"
368     "<gresources>\n"
369     "    <gresource prefix=\"/org/webkitwpe/resources\">\n"
370     ${WebKitResources}
371     "    </gresource>\n"
372     "</gresources>\n"
373 )
374
375 add_custom_command(
376     OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.c
377     DEPENDS ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.xml
378     COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --target=${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.c ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitResourcesGResourceBundle.xml
379     VERBATIM
380 )
381
382 list(APPEND WebKit_INCLUDE_DIRECTORIES
383     "${FORWARDING_HEADERS_DIR}"
384     "${FORWARDING_HEADERS_WPE_DIR}"
385     "${FORWARDING_HEADERS_WPE_EXTENSION_DIR}"
386     "${DERIVED_SOURCES_DIR}"
387     "${DERIVED_SOURCES_WPE_API_DIR}"
388     "${WEBCORE_DIR}/platform/graphics/cairo"
389     "${WEBCORE_DIR}/platform/graphics/freetype"
390     "${WEBCORE_DIR}/platform/graphics/opentype"
391     "${WEBCORE_DIR}/platform/graphics/texmap/coordinated"
392     "${WEBCORE_DIR}/platform/network/soup"
393     "${WEBKIT_DIR}/NetworkProcess/CustomProtocols/soup"
394     "${WEBKIT_DIR}/NetworkProcess/Downloads/soup"
395     "${WEBKIT_DIR}/NetworkProcess/soup"
396     "${WEBKIT_DIR}/NetworkProcess/unix"
397     "${WEBKIT_DIR}/Platform/IPC/glib"
398     "${WEBKIT_DIR}/Platform/IPC/unix"
399     "${WEBKIT_DIR}/Platform/classifier"
400     "${WEBKIT_DIR}/Shared/API/c/wpe"
401     "${WEBKIT_DIR}/Shared/API/glib"
402     "${WEBKIT_DIR}/Shared/CoordinatedGraphics"
403     "${WEBKIT_DIR}/Shared/CoordinatedGraphics/threadedcompositor"
404     "${WEBKIT_DIR}/Shared/glib"
405     "${WEBKIT_DIR}/Shared/soup"
406     "${WEBKIT_DIR}/Shared/unix"
407     "${WEBKIT_DIR}/Shared/wpe"
408     "${WEBKIT_DIR}/StorageProcess/unix"
409     "${WEBKIT_DIR}/UIProcess/API/C/cairo"
410     "${WEBKIT_DIR}/UIProcess/API/C/wpe"
411     "${WEBKIT_DIR}/UIProcess/API/glib"
412     "${WEBKIT_DIR}/UIProcess/API/wpe"
413     "${WEBKIT_DIR}/UIProcess/Network/CustomProtocols/soup"
414     "${WEBKIT_DIR}/UIProcess/gstreamer"
415     "${WEBKIT_DIR}/UIProcess/linux"
416     "${WEBKIT_DIR}/UIProcess/soup"
417     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib"
418     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe"
419     "${WEBKIT_DIR}/WebProcess/soup"
420     "${WEBKIT_DIR}/WebProcess/unix"
421     "${WEBKIT_DIR}/WebProcess/WebCoreSupport/soup"
422     "${WEBKIT_DIR}/WebProcess/WebPage/CoordinatedGraphics"
423     "${WEBKIT_DIR}/WebProcess/WebPage/wpe"
424     "${WTF_DIR}/wtf/gtk/"
425     "${WTF_DIR}/wtf/gobject"
426     "${WTF_DIR}"
427     ${CAIRO_INCLUDE_DIRS}
428     ${FREETYPE2_INCLUDE_DIRS}
429     ${GLIB_INCLUDE_DIRS}
430     ${GSTREAMER_INCLUDE_DIRS}
431     ${HARFBUZZ_INCLUDE_DIRS}
432     ${LIBSOUP_INCLUDE_DIRS}
433     ${WPE_INCLUDE_DIRS}
434 )
435
436 list(APPEND WebKit_LIBRARIES
437     WebCorePlatformWPE
438     ${CAIRO_LIBRARIES}
439     ${FREETYPE2_LIBRARIES}
440     ${GLIB_LIBRARIES}
441     ${GSTREAMER_LIBRARIES}
442     ${HARFBUZZ_LIBRARIES}
443     ${LIBSOUP_LIBRARIES}
444     ${WPE_LIBRARIES}
445 )
446
447 set(InspectorFiles
448     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
449     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html
450     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Base/*.js
451     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.css
452     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.js
453     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Debug/*.css
454     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Debug/*.js
455     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.css
456     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.js
457     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/ESLint/*.js
458     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/Esprima/*.js
459     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/three.js/*.js
460     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.png
461     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.svg
462     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Models/*.js
463     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Protocol/*.js
464     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Proxies/*.js
465     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Test/*.js
466     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.css
467     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.js
468     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Workers/Formatter/*.js
469     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/*.js
470 )
471
472 file(GLOB InspectorFilesDependencies
473     ${InspectorFiles}
474 )
475
476 # DerivedSources/JavaScriptCore/inspector/InspectorBackendCommands.js is
477 # expected in DerivedSources/WebInspectorUI/UserInterface/Protocol/.
478 add_custom_command(
479     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
480     DEPENDS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js
481     COMMAND cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
482 )
483
484 add_custom_command(
485     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.xml
486     DEPENDS ${InspectorFilesDependencies}
487             ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
488             ${TOOLS_DIR}/wpe/generate-inspector-gresource-manifest.py
489     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
490     VERBATIM
491 )
492
493 add_custom_command(
494     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.c
495     DEPENDS ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.xml
496     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
497     VERBATIM
498 )
499
500 list(APPEND WPEWebInspectorResources_DERIVED_SOURCES
501     ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.c
502 )
503
504 list(APPEND WPEWebInspectorResources_LIBRARIES
505     ${GLIB_GIO_LIBRARIES}
506 )
507
508 list(APPEND WPEWebInspectorResources_INCLUDE_DIRECTORIES
509     ${GLIB_INCLUDE_DIRS}
510 )
511
512 add_library(WPEWebInspectorResources SHARED ${WPEWebInspectorResources_DERIVED_SOURCES})
513 add_dependencies(WPEWebInspectorResources WebKit)
514 target_link_libraries(WPEWebInspectorResources ${WPEWebInspectorResources_LIBRARIES})
515 target_include_directories(WPEWebInspectorResources PUBLIC ${WPEWebInspectorResources_INCLUDE_DIRECTORIES})
516 install(TARGETS WPEWebInspectorResources DESTINATION "${LIB_INSTALL_DIR}")
517
518 add_library(WPEInjectedBundle MODULE "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp")
519 ADD_WEBKIT_PREFIX_HEADER(WPEInjectedBundle)
520 target_link_libraries(WPEInjectedBundle WebKit)
521
522 install(FILES "${CMAKE_BINARY_DIR}/wpe-webkit.pc"
523     DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
524     COMPONENT "Development"
525 )
526
527 install(FILES ${WPE_API_INSTALLED_HEADERS}
528     DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/wpe-${WPE_API_VERSION}/WPE/wpe"
529     COMPONENT "Development"
530 )