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