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