[CMake] Re-add the StorageProcess executable target
[WebKit-https.git] / Source / WebKit / CMakeLists.txt
1 include(WebKitCommon)
2
3 set_property(DIRECTORY . PROPERTY FOLDER "WebKit2")
4
5 set(WebKit2_INCLUDE_DIRECTORIES
6     "${WEBKIT2_DIR}"
7     "${WEBKIT2_DIR}/NetworkProcess"
8     "${WEBKIT2_DIR}/NetworkProcess/CustomProtocols"
9     "${WEBKIT2_DIR}/NetworkProcess/Downloads"
10     "${WEBKIT2_DIR}/NetworkProcess/FileAPI"
11     "${WEBKIT2_DIR}/NetworkProcess/cache"
12     "${WEBKIT2_DIR}/NetworkProcess/capture"
13     "${WEBKIT2_DIR}/NetworkProcess/webrtc"
14     "${WEBKIT2_DIR}/Platform"
15     "${WEBKIT2_DIR}/Platform/IPC"
16     "${WEBKIT2_DIR}/PluginProcess"
17     "${WEBKIT2_DIR}/Shared"
18     "${WEBKIT2_DIR}/Shared/API"
19     "${WEBKIT2_DIR}/Shared/API/c"
20     "${WEBKIT2_DIR}/Shared/Authentication"
21     "${WEBKIT2_DIR}/Shared/CoreIPCSupport"
22     "${WEBKIT2_DIR}/Shared/Databases"
23     "${WEBKIT2_DIR}/Shared/Databases/IndexedDB"
24     "${WEBKIT2_DIR}/Shared/FileAPI"
25     "${WEBKIT2_DIR}/Shared/Gamepad"
26     "${WEBKIT2_DIR}/Shared/Plugins"
27     "${WEBKIT2_DIR}/Shared/Plugins/Netscape"
28     "${WEBKIT2_DIR}/Shared/Plugins/Netscape/x11"
29     "${WEBKIT2_DIR}/Shared/Storage"
30     "${WEBKIT2_DIR}/Shared/WebsiteData"
31     "${WEBKIT2_DIR}/StorageProcess"
32     "${WEBKIT2_DIR}/StorageProcess/IndexedDB"
33     "${WEBKIT2_DIR}/UIProcess"
34     "${WEBKIT2_DIR}/UIProcess/API"
35     "${WEBKIT2_DIR}/UIProcess/API/C"
36     "${WEBKIT2_DIR}/UIProcess/API/cpp"
37     "${WEBKIT2_DIR}/UIProcess/ApplePay"
38     "${WEBKIT2_DIR}/UIProcess/Authentication"
39     "${WEBKIT2_DIR}/UIProcess/Automation"
40     "${WEBKIT2_DIR}/UIProcess/Downloads"
41     "${WEBKIT2_DIR}/UIProcess/Gamepad"
42     "${WEBKIT2_DIR}/UIProcess/Launcher"
43     "${WEBKIT2_DIR}/UIProcess/Network"
44     "${WEBKIT2_DIR}/UIProcess/Network/CustomProtocols"
45     "${WEBKIT2_DIR}/UIProcess/Notifications"
46     "${WEBKIT2_DIR}/UIProcess/Plugins"
47     "${WEBKIT2_DIR}/UIProcess/Storage"
48     "${WEBKIT2_DIR}/UIProcess/UserContent"
49     "${WEBKIT2_DIR}/UIProcess/WebStorage"
50     "${WEBKIT2_DIR}/UIProcess/WebsiteData"
51     "${WEBKIT2_DIR}/WebProcess"
52     "${WEBKIT2_DIR}/WebProcess/ApplePay"
53     "${WEBKIT2_DIR}/WebProcess/ApplicationCache"
54     "${WEBKIT2_DIR}/WebProcess/Automation"
55     "${WEBKIT2_DIR}/WebProcess/Cookies"
56     "${WEBKIT2_DIR}/WebProcess/Databases"
57     "${WEBKIT2_DIR}/WebProcess/Databases/IndexedDB"
58     "${WEBKIT2_DIR}/WebProcess/FileAPI"
59     "${WEBKIT2_DIR}/WebProcess/FullScreen"
60     "${WEBKIT2_DIR}/WebProcess/Gamepad"
61     "${WEBKIT2_DIR}/WebProcess/Geolocation"
62     "${WEBKIT2_DIR}/WebProcess/IconDatabase"
63     "${WEBKIT2_DIR}/WebProcess/InjectedBundle"
64     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API"
65     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c"
66     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/DOM"
67     "${WEBKIT2_DIR}/WebProcess/Launching"
68     "${WEBKIT2_DIR}/WebProcess/MediaCache"
69     "${WEBKIT2_DIR}/WebProcess/MediaStream"
70     "${WEBKIT2_DIR}/WebProcess/Network"
71     "${WEBKIT2_DIR}/WebProcess/Network/webrtc"
72     "${WEBKIT2_DIR}/WebProcess/Notifications"
73     "${WEBKIT2_DIR}/WebProcess/OriginData"
74     "${WEBKIT2_DIR}/WebProcess/Plugins"
75     "${WEBKIT2_DIR}/WebProcess/Plugins/Netscape"
76     "${WEBKIT2_DIR}/WebProcess/ResourceCache"
77     "${WEBKIT2_DIR}/WebProcess/Storage"
78     "${WEBKIT2_DIR}/WebProcess/UserContent"
79     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport"
80     "${WEBKIT2_DIR}/WebProcess/WebPage"
81     "${WEBKIT2_DIR}/WebProcess/WebStorage"
82     "${DERIVED_SOURCES_WEBKIT2_DIR}"
83     "${DERIVED_SOURCES_WEBKIT2_DIR}/include"
84     "${CMAKE_SOURCE_DIR}/WebKitLibraries"
85 )
86
87 set(PROTOCOL_GENERATOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
88
89 set(WebKit2_SYSTEM_INCLUDE_DIRECTORIES
90     ${ICU_INCLUDE_DIRS}
91 )
92
93 if (ENABLE_GRAPHICS_CONTEXT_3D)
94     list(APPEND WebKit2_INCLUDE_DIRECTORIES
95         "${THIRDPARTY_DIR}/ANGLE"
96         "${THIRDPARTY_DIR}/ANGLE/include/KHR"
97     )
98 endif ()
99
100 set(WebKit2_SOURCES
101     NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp
102
103     NetworkProcess/Downloads/BlobDownloadClient.cpp
104     NetworkProcess/Downloads/Download.cpp
105     NetworkProcess/Downloads/DownloadManager.cpp
106     NetworkProcess/Downloads/PendingDownload.cpp
107
108     NetworkProcess/FileAPI/NetworkBlobRegistry.cpp
109
110     NetworkProcess/NetworkConnectionToWebProcess.cpp
111     NetworkProcess/NetworkDataTask.cpp
112     NetworkProcess/NetworkDataTaskBlob.cpp
113     NetworkProcess/NetworkLoad.cpp
114     NetworkProcess/NetworkProcess.cpp
115     NetworkProcess/NetworkProcessCreationParameters.cpp
116     NetworkProcess/NetworkProcessPlatformStrategies.cpp
117     NetworkProcess/NetworkResourceLoadParameters.cpp
118     NetworkProcess/NetworkResourceLoader.cpp
119     NetworkProcess/NetworkSession.cpp
120     NetworkProcess/NetworkSocketStream.cpp
121
122     NetworkProcess/cache/NetworkCache.cpp
123     NetworkProcess/cache/NetworkCacheBlobStorage.cpp
124     NetworkProcess/cache/NetworkCacheCoders.cpp
125     NetworkProcess/cache/NetworkCacheData.cpp
126     NetworkProcess/cache/NetworkCacheEntry.cpp
127     NetworkProcess/cache/NetworkCacheFileSystem.cpp
128     NetworkProcess/cache/NetworkCacheKey.cpp
129     NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp
130     NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp
131     NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp
132     NetworkProcess/cache/NetworkCacheStatistics.cpp
133     NetworkProcess/cache/NetworkCacheStorage.cpp
134
135     NetworkProcess/capture/NetworkCaptureEvent.cpp
136     NetworkProcess/capture/NetworkCaptureManager.cpp
137     NetworkProcess/capture/NetworkCaptureRecorder.cpp
138     NetworkProcess/capture/NetworkCaptureReplayer.cpp
139     NetworkProcess/capture/NetworkCaptureResource.cpp
140     NetworkProcess/capture/NetworkDataTaskReplay.cpp
141
142     Platform/Logging.cpp
143     Platform/Module.cpp
144
145     Platform/IPC/ArgumentCoders.cpp
146     Platform/IPC/Attachment.cpp
147     Platform/IPC/Connection.cpp
148     Platform/IPC/DataReference.cpp
149     Platform/IPC/Decoder.cpp
150     Platform/IPC/Encoder.cpp
151     Platform/IPC/MessageReceiverMap.cpp
152     Platform/IPC/MessageSender.cpp
153     Platform/IPC/StringReference.cpp
154
155     PluginProcess/PluginControllerProxy.cpp
156     PluginProcess/PluginCreationParameters.cpp
157     PluginProcess/PluginProcess.cpp
158     PluginProcess/WebProcessConnection.cpp
159
160     Shared/ActivityAssertion.cpp
161     Shared/AsyncRequest.cpp
162     Shared/BlobDataFileReferenceWithSandboxExtension.cpp
163     Shared/CacheModel.cpp
164     Shared/ChildProcess.cpp
165     Shared/ContextMenuContextData.cpp
166     Shared/EditorState.cpp
167     Shared/FontInfo.cpp
168     Shared/FrameInfoData.cpp
169     Shared/LayerTreeContext.cpp
170     Shared/LoadParameters.cpp
171     Shared/NavigationActionData.cpp
172     Shared/PlatformPopupMenuData.cpp
173     Shared/PrintInfo.cpp
174     Shared/SessionState.cpp
175     Shared/SessionTracker.cpp
176     Shared/ShareableBitmap.cpp
177     Shared/ShareableResource.cpp
178     Shared/StatisticsData.cpp
179     Shared/UpdateInfo.cpp
180     Shared/UserData.cpp
181     Shared/VisitedLinkTable.cpp
182     Shared/WebBackForwardListItem.cpp
183     Shared/WebCompiledContentRuleList.cpp
184     Shared/WebCompiledContentRuleListData.cpp
185     Shared/WebConnection.cpp
186     Shared/WebConnectionClient.cpp
187     Shared/WebContextMenuItem.cpp
188     Shared/WebContextMenuItemData.cpp
189     Shared/WebCoreArgumentCoders.cpp
190     Shared/WebErrors.cpp
191     Shared/WebEvent.cpp
192     Shared/WebEventConversion.cpp
193     Shared/WebGeolocationPosition.cpp
194     Shared/WebHitTestResultData.cpp
195     Shared/WebImage.cpp
196     Shared/WebKeyboardEvent.cpp
197     Shared/WebKit2Initialize.cpp
198     Shared/WebMediaSessionMetadata.cpp
199     Shared/WebMemorySampler.cpp
200     Shared/WebMouseEvent.cpp
201     Shared/WebPageCreationParameters.cpp
202     Shared/WebPageGroupData.cpp
203     Shared/WebPlatformTouchPoint.cpp
204     Shared/WebPopupItem.cpp
205     Shared/WebPreferencesKeys.cpp
206     Shared/WebPreferencesStore.cpp
207     Shared/WebProcessCreationParameters.cpp
208     Shared/WebRenderLayer.cpp
209     Shared/WebRenderObject.cpp
210     Shared/WebTouchEvent.cpp
211     Shared/WebUserContentControllerDataTypes.cpp
212     Shared/WebWheelEvent.cpp
213     Shared/WebsiteDataStoreParameters.cpp
214
215     Shared/API/APIArray.cpp
216     Shared/API/APIData.cpp
217     Shared/API/APIDictionary.cpp
218     Shared/API/APIError.cpp
219     Shared/API/APIFrameHandle.cpp
220     Shared/API/APIGeometry.cpp
221     Shared/API/APIObject.cpp
222     Shared/API/APIPageGroupHandle.cpp
223     Shared/API/APIPageHandle.cpp
224     Shared/API/APIURLRequest.cpp
225     Shared/API/APIURLResponse.cpp
226
227     Shared/API/c/WKArray.cpp
228     Shared/API/c/WKCertificateInfo.cpp
229     Shared/API/c/WKConnectionRef.cpp
230     Shared/API/c/WKContextMenuItem.cpp
231     Shared/API/c/WKData.cpp
232     Shared/API/c/WKDeprecatedFunctions.cpp
233     Shared/API/c/WKDictionary.cpp
234     Shared/API/c/WKErrorRef.cpp
235     Shared/API/c/WKGeometry.cpp
236     Shared/API/c/WKImage.cpp
237     Shared/API/c/WKMutableArray.cpp
238     Shared/API/c/WKMutableDictionary.cpp
239     Shared/API/c/WKNumber.cpp
240     Shared/API/c/WKPluginInformation.cpp
241     Shared/API/c/WKRenderLayer.cpp
242     Shared/API/c/WKRenderObject.cpp
243     Shared/API/c/WKSecurityOriginRef.cpp
244     Shared/API/c/WKSerializedScriptValue.cpp
245     Shared/API/c/WKString.cpp
246     Shared/API/c/WKType.cpp
247     Shared/API/c/WKURL.cpp
248     Shared/API/c/WKURLRequest.cpp
249     Shared/API/c/WKURLResponse.cpp
250     Shared/API/c/WKUserContentURLPattern.cpp
251
252     Shared/Authentication/AuthenticationManager.cpp
253
254     Shared/Databases/IndexedDB/IDBUtilities.cpp
255     Shared/Databases/IndexedDB/WebIDBResult.cpp
256
257     Shared/Gamepad/GamepadData.cpp
258
259     Shared/Plugins/NPIdentifierData.cpp
260     Shared/Plugins/NPObjectMessageReceiver.cpp
261     Shared/Plugins/NPObjectProxy.cpp
262     Shared/Plugins/NPRemoteObjectMap.cpp
263     Shared/Plugins/NPVariantData.cpp
264     Shared/Plugins/PluginProcessCreationParameters.cpp
265
266     Shared/Plugins/Netscape/NetscapePluginModule.cpp
267     Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp
268     Shared/Plugins/Netscape/PluginInformation.cpp
269
270     Shared/Storage/StorageProcessCreationParameters.cpp
271
272     Shared/WebsiteData/WebsiteData.cpp
273
274     StorageProcess/StorageProcess.cpp
275     StorageProcess/StorageToWebProcessConnection.cpp
276
277     StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp
278
279     UIProcess/BackgroundProcessResponsivenessTimer.cpp
280     UIProcess/ChildProcessProxy.cpp
281     UIProcess/DrawingAreaProxy.cpp
282     UIProcess/FrameLoadState.cpp
283     UIProcess/GeolocationPermissionRequestManagerProxy.cpp
284     UIProcess/GeolocationPermissionRequestProxy.cpp
285     UIProcess/PageLoadState.cpp
286     UIProcess/ProcessAssertion.cpp
287     UIProcess/ProcessThrottler.cpp
288     UIProcess/RemoteWebInspectorProxy.cpp
289     UIProcess/ResourceLoadStatisticsPersistentStorage.cpp
290     UIProcess/ResponsivenessTimer.cpp
291     UIProcess/StatisticsRequest.cpp
292     UIProcess/TextCheckerCompletion.cpp
293     UIProcess/UserMediaPermissionCheckProxy.cpp
294     UIProcess/UserMediaPermissionRequestManagerProxy.cpp
295     UIProcess/UserMediaPermissionRequestProxy.cpp
296     UIProcess/UserMediaProcessManager.cpp
297     UIProcess/VisitedLinkStore.cpp
298     UIProcess/WebBackForwardList.cpp
299     UIProcess/WebColorPicker.cpp
300     UIProcess/WebConnectionToWebProcess.cpp
301     UIProcess/WebContextClient.cpp
302     UIProcess/WebContextConnectionClient.cpp
303     UIProcess/WebContextInjectedBundleClient.cpp
304     UIProcess/WebContextMenuProxy.cpp
305     UIProcess/WebCookieManagerProxy.cpp
306     UIProcess/WebCookieManagerProxyClient.cpp
307     UIProcess/WebEditCommandProxy.cpp
308     UIProcess/WebFormClient.cpp
309     UIProcess/WebFormSubmissionListenerProxy.cpp
310     UIProcess/WebFrameListenerProxy.cpp
311     UIProcess/WebFramePolicyListenerProxy.cpp
312     UIProcess/WebFrameProxy.cpp
313     UIProcess/WebFullScreenManagerProxy.cpp
314     UIProcess/WebGeolocationManagerProxy.cpp
315     UIProcess/WebGeolocationProvider.cpp
316     UIProcess/WebGrammarDetail.cpp
317     UIProcess/WebInspectorProxy.cpp
318     UIProcess/WebInspectorUtilities.cpp
319     UIProcess/WebNavigationState.cpp
320     UIProcess/WebOpenPanelResultListenerProxy.cpp
321     UIProcess/WebPageDiagnosticLoggingClient.cpp
322     UIProcess/WebPageGroup.cpp
323     UIProcess/WebPageInjectedBundleClient.cpp
324     UIProcess/WebPageProxy.cpp
325     UIProcess/WebPasteboardProxy.cpp
326     UIProcess/WebPreferences.cpp
327     UIProcess/WebProcessLifetimeObserver.cpp
328     UIProcess/WebProcessLifetimeTracker.cpp
329     UIProcess/WebProcessPool.cpp
330     UIProcess/WebProcessProxy.cpp
331     UIProcess/WebURLSchemeHandler.cpp
332     UIProcess/WebURLSchemeTask.cpp
333     UIProcess/WebViewportAttributes.cpp
334
335     UIProcess/API/APIContentRuleList.cpp
336     UIProcess/API/APIContentRuleListStore.cpp
337     UIProcess/API/APIExperimentalFeature.cpp
338     UIProcess/API/APIFrameInfo.cpp
339     UIProcess/API/APIHTTPCookieStore.cpp
340     UIProcess/API/APIHitTestResult.cpp
341     UIProcess/API/APINavigation.cpp
342     UIProcess/API/APINavigationData.cpp
343     UIProcess/API/APIPageConfiguration.cpp
344     UIProcess/API/APIProcessPoolConfiguration.cpp
345     UIProcess/API/APIOpenPanelParameters.cpp
346     UIProcess/API/APISessionState.cpp
347     UIProcess/API/APIURLSchemeTask.cpp
348     UIProcess/API/APIUserContentWorld.cpp
349     UIProcess/API/APIUserScript.cpp
350     UIProcess/API/APIUserStyleSheet.cpp
351     UIProcess/API/APIWebsiteDataStore.cpp
352     UIProcess/API/APIWebsitePolicies.cpp
353     UIProcess/API/APIWindowFeatures.cpp
354
355     UIProcess/API/C/WKApplicationCacheManager.cpp
356     UIProcess/API/C/WKAuthenticationChallenge.cpp
357     UIProcess/API/C/WKAuthenticationDecisionListener.cpp
358     UIProcess/API/C/WKBackForwardListItemRef.cpp
359     UIProcess/API/C/WKBackForwardListRef.cpp
360     UIProcess/API/C/WKContext.cpp
361     UIProcess/API/C/WKContextConfigurationRef.cpp
362     UIProcess/API/C/WKCookieManager.cpp
363     UIProcess/API/C/WKCredential.cpp
364     UIProcess/API/C/WKDownload.cpp
365     UIProcess/API/C/WKFormSubmissionListener.cpp
366     UIProcess/API/C/WKFrame.cpp
367     UIProcess/API/C/WKFrameHandleRef.cpp
368     UIProcess/API/C/WKFrameInfoRef.cpp
369     UIProcess/API/C/WKFramePolicyListener.cpp
370     UIProcess/API/C/WKGeolocationManager.cpp
371     UIProcess/API/C/WKGeolocationPermissionRequest.cpp
372     UIProcess/API/C/WKGeolocationPosition.cpp
373     UIProcess/API/C/WKHitTestResult.cpp
374     UIProcess/API/C/WKIconDatabase.cpp
375     UIProcess/API/C/WKInspector.cpp
376     UIProcess/API/C/WKKeyValueStorageManager.cpp
377     UIProcess/API/C/WKMediaSessionMetadata.cpp
378     UIProcess/API/C/WKNavigationActionRef.cpp
379     UIProcess/API/C/WKNavigationDataRef.cpp
380     UIProcess/API/C/WKNavigationRef.cpp
381     UIProcess/API/C/WKNavigationResponseRef.cpp
382     UIProcess/API/C/WKNotification.cpp
383     UIProcess/API/C/WKNotificationManager.cpp
384     UIProcess/API/C/WKNotificationPermissionRequest.cpp
385     UIProcess/API/C/WKOpenPanelParametersRef.cpp
386     UIProcess/API/C/WKOpenPanelResultListener.cpp
387     UIProcess/API/C/WKPage.cpp
388     UIProcess/API/C/WKPageConfigurationRef.cpp
389     UIProcess/API/C/WKPageGroup.cpp
390     UIProcess/API/C/WKPreferences.cpp
391     UIProcess/API/C/WKProtectionSpace.cpp
392     UIProcess/API/C/WKResourceCacheManager.cpp
393     UIProcess/API/C/WKSessionStateRef.cpp
394     UIProcess/API/C/WKTextChecker.cpp
395     UIProcess/API/C/WKUserContentControllerRef.cpp
396     UIProcess/API/C/WKUserMediaPermissionCheck.cpp
397     UIProcess/API/C/WKUserMediaPermissionRequest.cpp
398     UIProcess/API/C/WKViewportAttributes.cpp
399     UIProcess/API/C/WKWebsiteDataStoreRef.cpp
400     UIProcess/API/C/WKWebsitePolicies.cpp
401     UIProcess/API/C/WKWindowFeaturesRef.cpp
402
403     UIProcess/Authentication/AuthenticationChallengeProxy.cpp
404     UIProcess/Authentication/AuthenticationDecisionListener.cpp
405     UIProcess/Authentication/WebCredential.cpp
406     UIProcess/Authentication/WebProtectionSpace.cpp
407
408     UIProcess/Automation/WebAutomationSession.cpp
409
410     UIProcess/Downloads/DownloadProxy.cpp
411     UIProcess/Downloads/DownloadProxyMap.cpp
412
413     UIProcess/Gamepad/UIGamepad.cpp
414     UIProcess/Gamepad/UIGamepadProvider.cpp
415
416     UIProcess/Launcher/ProcessLauncher.cpp
417
418     UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp
419
420     UIProcess/Network/NetworkProcessProxy.cpp
421
422     UIProcess/Notifications/NotificationPermissionRequest.cpp
423     UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp
424     UIProcess/Notifications/WebNotification.cpp
425     UIProcess/Notifications/WebNotificationManagerProxy.cpp
426     UIProcess/Notifications/WebNotificationProvider.cpp
427
428     UIProcess/Plugins/PlugInAutoStartProvider.cpp
429     UIProcess/Plugins/PluginInfoStore.cpp
430     UIProcess/Plugins/PluginProcessManager.cpp
431     UIProcess/Plugins/PluginProcessProxy.cpp
432
433     UIProcess/Storage/StorageProcessProxy.cpp
434
435     UIProcess/UserContent/WebScriptMessageHandler.cpp
436     UIProcess/UserContent/WebUserContentControllerProxy.cpp
437
438     UIProcess/WebStorage/LocalStorageDatabase.cpp
439     UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp
440
441     UIProcess/WebsiteData/WebsiteDataRecord.cpp
442     UIProcess/WebsiteData/WebsiteDataStore.cpp
443
444     WebProcess/WebConnectionToUIProcess.cpp
445     WebProcess/WebProcess.cpp
446
447     WebProcess/Automation/WebAutomationSessionProxy.cpp
448
449     WebProcess/Cookies/WebCookieManager.cpp
450
451     WebProcess/Databases/WebDatabaseProvider.cpp
452
453     WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
454
455     WebProcess/FileAPI/BlobRegistryProxy.cpp
456
457     WebProcess/FullScreen/WebFullScreenManager.cpp
458
459     WebProcess/Gamepad/WebGamepad.cpp
460     WebProcess/Gamepad/WebGamepadProvider.cpp
461
462     WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp
463     WebProcess/Geolocation/WebGeolocationManager.cpp
464
465     WebProcess/InjectedBundle/InjectedBundle.cpp
466     WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp
467     WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp
468     WebProcess/InjectedBundle/InjectedBundleClient.cpp
469     WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp
470     WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
471     WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp
472     WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp
473     WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp
474     WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp
475     WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp
476     WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
477     WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp
478     WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp
479     WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
480     WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp
481
482     WebProcess/InjectedBundle/API/c/WKBundle.cpp
483     WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp
484     WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
485     WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp
486     WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
487     WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
488     WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp
489     WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp
490     WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
491     WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
492     WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp
493     WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp
494     WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp
495     WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp
496
497     WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp
498     WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp
499     WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
500     WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp
501
502     WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp
503     WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp
504
505     WebProcess/Network/NetworkProcessConnection.cpp
506     WebProcess/Network/WebLoaderStrategy.cpp
507     WebProcess/Network/WebResourceLoader.cpp
508     WebProcess/Network/WebSocketProvider.cpp
509     WebProcess/Network/WebSocketStream.cpp
510
511     WebProcess/Notifications/NotificationPermissionRequestManager.cpp
512     WebProcess/Notifications/WebNotificationManager.cpp
513
514     WebProcess/Plugins/Plugin.cpp
515     WebProcess/Plugins/PluginProcessConnection.cpp
516     WebProcess/Plugins/PluginProcessConnectionManager.cpp
517     WebProcess/Plugins/PluginProxy.cpp
518     WebProcess/Plugins/PluginView.cpp
519     WebProcess/Plugins/WebPluginInfoProvider.cpp
520
521     WebProcess/Plugins/Netscape/JSNPMethod.cpp
522     WebProcess/Plugins/Netscape/JSNPObject.cpp
523     WebProcess/Plugins/Netscape/NPJSObject.cpp
524     WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp
525     WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp
526     WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
527     WebProcess/Plugins/Netscape/NetscapePlugin.cpp
528     WebProcess/Plugins/Netscape/NetscapePluginNone.cpp
529     WebProcess/Plugins/Netscape/NetscapePluginStream.cpp
530
531     WebProcess/Storage/WebToStorageProcessConnection.cpp
532
533     WebProcess/UserContent/WebUserContentController.cpp
534
535     WebProcess/WebCoreSupport/SessionStateConversion.cpp
536     WebProcess/WebCoreSupport/WebChromeClient.cpp
537     WebProcess/WebCoreSupport/WebColorChooser.cpp
538     WebProcess/WebCoreSupport/WebContextMenuClient.cpp
539     WebProcess/WebCoreSupport/WebDeviceProximityClient.cpp
540     WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp
541     WebProcess/WebCoreSupport/WebDragClient.cpp
542     WebProcess/WebCoreSupport/WebEditorClient.cpp
543     WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
544     WebProcess/WebCoreSupport/WebGeolocationClient.cpp
545     WebProcess/WebCoreSupport/WebInspectorClient.cpp
546     WebProcess/WebCoreSupport/WebNotificationClient.cpp
547     WebProcess/WebCoreSupport/WebPerformanceLoggingClient.cpp
548     WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
549     WebProcess/WebCoreSupport/WebPlugInClient.cpp
550     WebProcess/WebCoreSupport/WebPopupMenu.cpp
551     WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp
552     WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
553     WebProcess/WebCoreSupport/WebUserMediaClient.cpp
554
555     WebProcess/WebPage/DrawingArea.cpp
556     WebProcess/WebPage/EventDispatcher.cpp
557     WebProcess/WebPage/FindController.cpp
558     WebProcess/WebPage/LayerTreeHost.cpp
559     WebProcess/WebPage/PageBanner.cpp
560     WebProcess/WebPage/RemoteWebInspectorUI.cpp
561     WebProcess/WebPage/VisitedLinkTableController.cpp
562     WebProcess/WebPage/WebBackForwardListProxy.cpp
563     WebProcess/WebPage/WebContextMenu.cpp
564     WebProcess/WebPage/WebDocumentLoader.cpp
565     WebProcess/WebPage/WebFrame.cpp
566     WebProcess/WebPage/WebInspector.cpp
567     WebProcess/WebPage/WebInspectorInterruptDispatcher.cpp
568     WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp
569     WebProcess/WebPage/WebInspectorUI.cpp
570     WebProcess/WebPage/WebOpenPanelResultListener.cpp
571     WebProcess/WebPage/WebPage.cpp
572     WebProcess/WebPage/WebPageGroupProxy.cpp
573     WebProcess/WebPage/WebPageOverlay.cpp
574     WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp
575     WebProcess/WebPage/WebURLSchemeTaskProxy.cpp
576     WebProcess/WebPage/WebUndoStep.cpp
577
578     WebProcess/WebStorage/StorageAreaImpl.cpp
579     WebProcess/WebStorage/StorageAreaMap.cpp
580     WebProcess/WebStorage/StorageNamespaceImpl.cpp
581     WebProcess/WebStorage/WebStorageNamespaceProvider.cpp
582 )
583
584 set(WebKit2_MESSAGES_IN_FILES
585     NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in
586
587     NetworkProcess/NetworkConnectionToWebProcess.messages.in
588     NetworkProcess/NetworkProcess.messages.in
589     NetworkProcess/NetworkResourceLoader.messages.in
590     NetworkProcess/NetworkSocketStream.messages.in
591
592     NetworkProcess/webrtc/NetworkRTCMonitor.messages.in
593     NetworkProcess/webrtc/NetworkRTCProvider.messages.in
594     NetworkProcess/webrtc/NetworkRTCSocket.messages.in
595
596     PluginProcess/PluginControllerProxy.messages.in
597     PluginProcess/PluginProcess.messages.in
598     PluginProcess/WebProcessConnection.messages.in
599
600     Shared/ChildProcess.messages.in
601     Shared/WebConnection.messages.in
602
603     Shared/Authentication/AuthenticationManager.messages.in
604
605     Shared/Plugins/NPObjectMessageReceiver.messages.in
606
607     StorageProcess/StorageProcess.messages.in
608     StorageProcess/StorageToWebProcessConnection.messages.in
609
610     StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in
611
612     UIProcess/DrawingAreaProxy.messages.in
613     UIProcess/RemoteWebInspectorProxy.messages.in
614     UIProcess/VisitedLinkStore.messages.in
615     UIProcess/WebCookieManagerProxy.messages.in
616     UIProcess/WebFullScreenManagerProxy.messages.in
617     UIProcess/WebGeolocationManagerProxy.messages.in
618     UIProcess/WebInspectorProxy.messages.in
619     UIProcess/WebPageProxy.messages.in
620     UIProcess/WebPasteboardProxy.messages.in
621     UIProcess/WebProcessPool.messages.in
622     UIProcess/WebProcessProxy.messages.in
623     UIProcess/WebResourceLoadStatisticsStore.messages.in
624
625     UIProcess/Automation/WebAutomationSession.messages.in
626
627     UIProcess/Downloads/DownloadProxy.messages.in
628
629     UIProcess/Network/NetworkProcessProxy.messages.in
630
631     UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in
632
633     UIProcess/Plugins/PluginProcessProxy.messages.in
634
635     UIProcess/Storage/StorageProcessProxy.messages.in
636
637     UIProcess/UserContent/WebUserContentControllerProxy.messages.in
638
639     UIProcess/WebStorage/StorageManager.messages.in
640
641     WebProcess/WebProcess.messages.in
642
643     WebProcess/Automation/WebAutomationSessionProxy.messages.in
644
645     WebProcess/Cookies/WebCookieManager.messages.in
646
647     WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in
648
649     WebProcess/FullScreen/WebFullScreenManager.messages.in
650
651     WebProcess/Geolocation/WebGeolocationManager.messages.in
652
653     WebProcess/Network/webrtc/WebRTCMonitor.messages.in
654     WebProcess/Network/webrtc/WebRTCResolver.messages.in
655     WebProcess/Network/webrtc/WebRTCSocket.messages.in
656
657     WebProcess/Network/NetworkProcessConnection.messages.in
658     WebProcess/Network/WebResourceLoader.messages.in
659     WebProcess/Network/WebSocketStream.messages.in
660
661     WebProcess/Notifications/WebNotificationManager.messages.in
662
663     WebProcess/Plugins/PluginProcessConnection.messages.in
664     WebProcess/Plugins/PluginProcessConnectionManager.messages.in
665     WebProcess/Plugins/PluginProxy.messages.in
666
667     WebProcess/UserContent/WebUserContentController.messages.in
668
669     WebProcess/WebPage/DrawingArea.messages.in
670     WebProcess/WebPage/EventDispatcher.messages.in
671     WebProcess/WebPage/RemoteWebInspectorUI.messages.in
672     WebProcess/WebPage/VisitedLinkTableController.messages.in
673     WebProcess/WebPage/WebInspector.messages.in
674     WebProcess/WebPage/WebInspectorInterruptDispatcher.messages.in
675     WebProcess/WebPage/WebInspectorUI.messages.in
676     WebProcess/WebPage/WebPage.messages.in
677
678     WebProcess/WebStorage/StorageAreaMap.messages.in
679 )
680
681 set(WebProcess_LIBRARIES
682     WebKit2
683 )
684
685 set(NetworkProcess_LIBRARIES
686     WebKit2
687 )
688
689 set(StorageProcess_LIBRARIES
690     WebKit2
691 )
692
693 if (APPLE)
694     set(WebKit2_LIBRARIES
695         PRIVATE WebCore
696         PUBLIC JavaScriptCore
697     )
698 else ()
699     set(WebKit2_LIBRARIES
700         WebCore
701         JavaScriptCore
702     )
703 endif ()
704
705 set(PluginProcess_LIBRARIES
706     WebKit2
707 )
708
709 if (WIN32 AND INTERNAL_BUILD)
710     set(JavaScriptCore_SCRIPTS_DIR "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore/Scripts")
711 else ()
712     set(JavaScriptCore_SCRIPTS_DIR "${FORWARDING_HEADERS_DIR}/JavaScriptCore/Scripts")
713 endif ()
714
715 if (COMPILER_IS_GCC_OR_CLANG)
716     set(ATOMIC_TEST_SOURCE
717     "
718         #include <atomic>
719         int main() { std::atomic<int64_t> i(0); i++; return 0; }
720     "
721     )
722     check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_IS_BUILTIN)
723     if (NOT ATOMIC_INT64_IS_BUILTIN)
724         set(CMAKE_REQUIRED_LIBRARIES atomic)
725         check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_REQUIRES_LIBATOMIC)
726         if (ATOMIC_INT64_REQUIRES_LIBATOMIC)
727             list(APPEND WebKit2_LIBRARIES atomic)
728         endif ()
729         unset(CMAKE_REQUIRED_LIBRARIES)
730     endif ()
731 endif ()
732
733 if (UNIX)
734     check_function_exists(shm_open SHM_OPEN_EXISTS)
735     if (NOT SHM_OPEN_EXISTS)
736         set(CMAKE_REQUIRED_LIBRARIES rt)
737         check_function_exists(shm_open SHM_OPEN_REQUIRES_LIBRT)
738         if (SHM_OPEN_REQUIRES_LIBRT)
739             list(APPEND WebKit2_LIBRARIES rt)
740         endif ()
741     endif ()
742 endif ()
743
744 macro(ADD_WEBKIT2_PREFIX_HEADER _target)
745     if (WebKit2_USE_PREFIX_HEADER)
746         get_target_property(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
747         if (${OLD_COMPILE_FLAGS} STREQUAL "OLD_COMPILE_FLAGS-NOTFOUND")
748             set(OLD_COMPILE_FLAGS "")
749         endif ()
750         set_target_properties(${_target} PROPERTIES COMPILE_FLAGS "${OLD_COMPILE_FLAGS} -include ${WEBKIT2_DIR}/WebKit2Prefix.h")
751     endif ()
752 endmacro()
753
754 set(WebKit2_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS
755 )
756
757 WEBKIT_FRAMEWORK_DECLARE(WebKit2)
758 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
759
760 # Helper macro which wraps generate-message-receiver.py and generate-message-header.py scripts
761 #   _output_source is a list name which will contain generated sources.(eg. WebKit2_SOURCES)
762 #   _input_files are messages.in files to generate.
763 macro(GENERATE_MESSAGE_SOURCES _output_source _input_files)
764     foreach (_file ${_input_files})
765         get_filename_component(_name ${_file} NAME_WE)
766         add_custom_command(
767             OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}Messages.h
768             MAIN_DEPENDENCY ${_file}
769             DEPENDS ${WEBKIT2_DIR}/Scripts/webkit/__init__.py
770                     ${WEBKIT2_DIR}/Scripts/webkit/messages.py
771                     ${WEBKIT2_DIR}/Scripts/webkit/model.py
772                     ${WEBKIT2_DIR}/Scripts/webkit/parser.py
773             COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-message-receiver.py ${_file} > ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp
774             COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-messages-header.py ${_file} > ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}Messages.h
775             WORKING_DIRECTORY ${WEBKIT2_DIR}
776             VERBATIM)
777
778         list(APPEND ${_output_source} ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp)
779     endforeach ()
780 endmacro()
781 GENERATE_MESSAGE_SOURCES(WebKit2_DERIVED_SOURCES "${WebKit2_MESSAGES_IN_FILES}")
782
783 set(WebKit2_AUTOMATION_PROTOCOL_GENERATOR_SCRIPTS
784     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py
785     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/cpp_generator.py
786     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/cpp_generator_templates.py
787     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_header.py
788     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_implementation.py
789     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_header.py
790     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_implementation.py
791     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_header.py
792     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_implementation.py
793     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generator.py
794     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generator_templates.py
795     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/models.py
796 )
797
798 set(WebKit2_AUTOMATION_PROTOCOL_GENERATOR_INPUTS
799     ${WEBKIT2_DIR}/UIProcess/Automation/Automation.json
800 )
801
802 add_custom_command(
803     OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationBackendDispatchers.h ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationBackendDispatchers.cpp ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationProtocolObjects.h ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationProtocolObjects.cpp ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationFrontendDispatchers.h ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationFrontendDispatchers.cpp
804     MAIN_DEPENDENCY ${WebKit2_AUTOMATION_PROTOCOL_GENERATOR_INPUTS}
805     DEPENDS ${WebKit2_AUTOMATION_PROTOCOL_GENERATOR_SCRIPTS}
806     COMMAND ${PYTHON_EXECUTABLE} ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py --outputDir "${DERIVED_SOURCES_WEBKIT2_DIR}" --framework WebKit ${WebKit2_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS} --backend ${WebKit2_AUTOMATION_PROTOCOL_GENERATOR_INPUTS}
807     VERBATIM)
808
809 list(APPEND WebKit2_HEADERS
810     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationBackendDispatchers.h
811     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationFrontendDispatchers.h
812     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationProtocolObjects.h
813 )
814
815 list(APPEND WebKit2_SOURCES
816     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationBackendDispatchers.cpp
817     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationFrontendDispatchers.cpp
818     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationProtocolObjects.cpp
819 )
820
821 add_custom_command(
822     OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxyScriptSource.h ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js
823     MAIN_DEPENDENCY ${WEBKIT2_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js
824     DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py
825     COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__InjectedScript_WebAutomationSessionProxy.js" > ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js
826     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${WEBKIT2_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js >> ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js
827     COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl WebAutomationSessionProxyScriptSource ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxyScriptSource.h
828     VERBATIM)
829
830 list(APPEND WebKit2_HEADERS
831     ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxyScriptSource.h
832 )
833
834 list(APPEND WebKit2_SOURCES ${WebKit2_DERIVED_SOURCES})
835
836 WEBKIT_FRAMEWORK(WebKit2)
837 add_dependencies(WebKit2 WebCore ${WEBKIT2_EXTRA_DEPENDENCIES})
838 add_webkit2_prefix_header(WebKit2)
839
840 if (COMPILER_IS_GCC_OR_CLANG AND NOT APPLE)
841     target_link_libraries(WebKit2 -Wl,--start-group WebCore WebCoreDerivedSources -Wl,--end-group)
842 endif ()
843
844 # Suppress unused parameter warnings for sources in WebKit2.
845 if (COMPILER_IS_GCC_OR_CLANG)
846     WEBKIT_ADD_TARGET_PROPERTIES(WebKit2 COMPILE_FLAGS "-Wno-unused-parameter")
847 endif ()
848
849 if (WebKit2_VERSION_SCRIPT)
850     WEBKIT_ADD_TARGET_PROPERTIES(WebKit2 LINK_FLAGS "${WebKit2_VERSION_SCRIPT}")
851 endif ()
852
853 add_executable(WebProcess ${WebProcess_SOURCES})
854 add_webkit2_prefix_header(WebProcess)
855 target_link_libraries(WebProcess ${WebProcess_LIBRARIES})
856
857 if (WebKit2_WebProcess_OUTPUT_NAME)
858     set_target_properties(WebProcess PROPERTIES OUTPUT_NAME ${WebKit2_WebProcess_OUTPUT_NAME})
859 endif ()
860
861 add_executable(NetworkProcess ${NetworkProcess_SOURCES})
862 add_webkit2_prefix_header(NetworkProcess)
863 target_link_libraries(NetworkProcess ${NetworkProcess_LIBRARIES})
864
865 if (WebKit2_NetworkProcess_OUTPUT_NAME)
866     set_target_properties(NetworkProcess PROPERTIES OUTPUT_NAME ${WebKit2_NetworkProcess_OUTPUT_NAME})
867 endif ()
868
869 if (NOT "${PORT}" STREQUAL "Mac")
870     add_executable(StorageProcess ${StorageProcess_SOURCES})
871     add_webkit2_prefix_header(StorageProcess)
872     target_link_libraries(StorageProcess ${StorageProcess_LIBRARIES})
873     install(TARGETS StorageProcess DESTINATION "${LIBEXEC_INSTALL_DIR}")
874
875     if (WebKit2_StorageProcess_OUTPUT_NAME)
876         set_target_properties(StorageProcess PROPERTIES OUTPUT_NAME ${WebKit2_StorageProcess_OUTPUT_NAME})
877     endif ()
878 endif ()
879
880 if (ENABLE_PLUGIN_PROCESS AND NOT "${PORT}" STREQUAL "Mac")
881     add_definitions(-DENABLE_PLUGIN_PROCESS=1)
882     add_executable(PluginProcess ${PluginProcess_SOURCES})
883     add_webkit2_prefix_header(PluginProcess)
884     target_link_libraries(PluginProcess ${PluginProcess_LIBRARIES})
885     install(TARGETS PluginProcess DESTINATION "${LIBEXEC_INSTALL_DIR}")
886
887     if (WebKit2_PluginProcess_OUTPUT_NAME)
888       set_target_properties(PluginProcess PROPERTIES OUTPUT_NAME ${WebKit2_PluginProcess_OUTPUT_NAME})
889     endif ()
890 endif ()
891
892 if ("${PORT}" STREQUAL "Mac")
893     set(_web_xpc_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/XPCServices/com.apple.WebKit.WebContent.Development.xpc/Contents)
894     make_directory(${_web_xpc_dir}/MacOS)
895     make_directory(${_web_xpc_dir}/Resources)
896     make_directory(${_web_xpc_dir}/_CodeSignature)
897
898     add_custom_target(WebContentProcessNib COMMAND
899         ibtool --compile ${_web_xpc_dir}/Resources/WebContentProcess.nib ${WEBKIT2_DIR}/Resources/WebContentProcess.xib
900         VERBATIM)
901     add_dependencies(WebKit2 WebContentProcessNib)
902
903     # FIXME: This shouldn't be two operations.
904     file(COPY ${WEBKIT2_DIR}/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist DESTINATION ${_web_xpc_dir})
905     file(RENAME ${_web_xpc_dir}/Info-OSX.plist ${_web_xpc_dir}/Info.plist)
906
907     set_target_properties(WebProcess PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${_web_xpc_dir}/MacOS")
908
909
910     set(_net_xpc_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/XPCServices/com.apple.WebKit.Networking.Development.xpc/Contents)
911     make_directory(${_net_xpc_dir}/MacOS)
912     make_directory(${_net_xpc_dir}/_CodeSignature)
913
914     # FIXME: This shouldn't be two operations.
915     file(COPY ${WEBKIT2_DIR}/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist DESTINATION ${_net_xpc_dir})
916     file(RENAME ${_net_xpc_dir}/Info-OSX.plist ${_net_xpc_dir}/Info.plist)
917
918     set_target_properties(NetworkProcess PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${_net_xpc_dir}/MacOS")
919 else ()
920     WEBKIT_POPULATE_LIBRARY_VERSION(WEBKIT2)
921     set_target_properties(WebKit2 PROPERTIES VERSION ${WEBKIT2_VERSION} SOVERSION ${WEBKIT2_VERSION_MAJOR})
922
923     install(TARGETS WebKit2 WebProcess NetworkProcess
924         LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
925         RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}"
926     )
927 endif ()