Make LegacyCustomProtocolManager optional for network process
[WebKit-https.git] / Source / WebKit / PlatformMac.cmake
1 add_definitions("-ObjC++ -std=c++14")
2 find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
3 find_library(CARBON_LIBRARY Carbon)
4 find_library(QUARTZ_LIBRARY Quartz)
5 find_library(AVFOUNDATION_LIBRARY AVFoundation)
6 find_library(AVFAUDIO_LIBRARY AVFAudio HINTS ${AVFOUNDATION_LIBRARY}/Versions/*/Frameworks)
7 add_definitions(-iframework ${QUARTZ_LIBRARY}/Frameworks)
8 add_definitions(-iframework ${CARBON_LIBRARY}/Frameworks)
9 add_definitions(-iframework ${APPLICATIONSERVICES_LIBRARY}/Versions/Current/Frameworks)
10 add_definitions(-DWK_XPC_SERVICE_SUFFIX=".Development")
11
12 list(APPEND WebKit_LIBRARIES
13     PRIVATE WebKitLegacy
14     ${APPLICATIONSERVICES_LIBRARY}
15 )
16
17 if (NOT AVFAUDIO_LIBRARY-NOTFOUND)
18     list(APPEND WebKit_LIBRARIES ${AVFAUDIO_LIBRARY})
19 endif ()
20
21 list(APPEND WebKit_SOURCES
22     NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp
23
24     NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm
25
26     NetworkProcess/Downloads/PendingDownload.cpp
27
28     NetworkProcess/Downloads/cocoa/DownloadCocoa.mm
29
30     NetworkProcess/Downloads/mac/DownloadMac.mm
31
32     NetworkProcess/cache/NetworkCacheCodersCocoa.cpp
33     NetworkProcess/cache/NetworkCacheDataCocoa.mm
34     NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm
35
36     NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
37     NetworkProcess/cocoa/NetworkProcessCocoa.mm
38     NetworkProcess/cocoa/NetworkSessionCocoa.mm
39
40     NetworkProcess/mac/NetworkLoadMac.mm
41     NetworkProcess/mac/NetworkProcessMac.mm
42     NetworkProcess/mac/RemoteNetworkingContext.mm
43
44     Platform/IPC/mac/ConnectionMac.mm
45     Platform/IPC/mac/MachMessage.cpp
46
47     Platform/cf/ModuleCF.cpp
48
49     Platform/cg/CGUtilities.cpp
50
51     Platform/cocoa/WKCrashReporter.mm
52
53     Platform/classifier/ResourceLoadStatisticsClassifier.cpp
54
55     Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp
56
57     Platform/foundation/LoggingFoundation.mm
58
59     Platform/cocoa/SharedMemoryCocoa.cpp
60
61     Platform/mac/LayerHostingContext.mm
62     Platform/mac/MachUtilities.cpp
63     Platform/mac/MenuUtilities.mm
64     Platform/mac/StringUtilities.mm
65
66     Platform/unix/EnvironmentUtilities.cpp
67
68     PluginProcess/mac/PluginControllerProxyMac.mm
69     PluginProcess/mac/PluginProcessMac.mm
70     PluginProcess/mac/PluginProcessShim.mm
71
72     Shared/APIWebArchive.mm
73     Shared/APIWebArchiveResource.mm
74
75     Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm
76
77     Shared/API/Cocoa/RemoteObjectInvocation.mm
78     Shared/API/Cocoa/RemoteObjectRegistry.mm
79     Shared/API/Cocoa/WKBrowsingContextHandle.mm
80     Shared/API/Cocoa/WKRemoteObject.mm
81     Shared/API/Cocoa/WKRemoteObjectCoder.mm
82     Shared/API/Cocoa/WebKit.m
83     Shared/API/Cocoa/_WKFrameHandle.mm
84     Shared/API/Cocoa/_WKHitTestResult.mm
85     Shared/API/Cocoa/_WKNSFileManagerExtras.mm
86     Shared/API/Cocoa/_WKRemoteObjectInterface.mm
87     Shared/API/Cocoa/_WKRemoteObjectRegistry.mm
88
89     Shared/API/c/cf/WKErrorCF.cpp
90     Shared/API/c/cf/WKStringCF.mm
91     Shared/API/c/cf/WKURLCF.mm
92
93     Shared/API/c/cg/WKImageCG.cpp
94
95     Shared/API/c/mac/WKCertificateInfoMac.mm
96     Shared/API/c/mac/WKObjCTypeWrapperRef.mm
97     Shared/API/c/mac/WKURLRequestNS.mm
98     Shared/API/c/mac/WKURLResponseNS.mm
99     Shared/API/c/mac/WKWebArchive.cpp
100     Shared/API/c/mac/WKWebArchiveResource.cpp
101
102     Shared/Authentication/mac/AuthenticationManager.mac.mm
103
104     Shared/Cocoa/APIDataCocoa.mm
105     Shared/Cocoa/APIObject.mm
106     Shared/Cocoa/ChildProcessCocoa.mm
107     Shared/Cocoa/CompletionHandlerCallChecker.mm
108     Shared/Cocoa/DataDetectionResult.mm
109     Shared/Cocoa/LoadParametersCocoa.mm
110     Shared/Cocoa/WKNSArray.mm
111     Shared/Cocoa/WKNSData.mm
112     Shared/Cocoa/WKNSDictionary.mm
113     Shared/Cocoa/WKNSError.mm
114     Shared/Cocoa/WKNSNumber.mm
115     Shared/Cocoa/WKNSString.mm
116     Shared/Cocoa/WKNSURL.mm
117     Shared/Cocoa/WKNSURLExtras.mm
118     Shared/Cocoa/WKNSURLRequest.mm
119     Shared/Cocoa/WKObject.mm
120     Shared/Cocoa/WebErrorsCocoa.mm
121     Shared/Cocoa/WebKit2InitializeCocoa.mm
122
123     Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
124     Shared/Plugins/Netscape/mac/PluginInformationMac.mm
125
126     Shared/Plugins/mac/PluginSandboxProfile.mm
127
128     Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
129     Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm
130     Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
131     Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm
132     Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
133
134     Shared/cf/ArgumentCodersCF.cpp
135     Shared/cf/CookieStorageUtilsCF.mm
136
137     Shared/cg/ShareableBitmapCG.cpp
138
139     Shared/mac/ArgumentCodersMac.mm
140     Shared/mac/AttributedString.mm
141     Shared/mac/ChildProcessMac.mm
142     Shared/mac/CodeSigning.mm
143     Shared/mac/ColorSpaceData.mm
144     Shared/mac/CookieStorageShim.mm
145     Shared/mac/CookieStorageShimLibrary.cpp
146     Shared/mac/HangDetectionDisablerMac.mm
147     Shared/mac/NativeWebGestureEventMac.mm
148     Shared/mac/NativeWebKeyboardEventMac.mm
149     Shared/mac/NativeWebMouseEventMac.mm
150     Shared/mac/NativeWebWheelEventMac.mm
151     Shared/mac/ObjCObjectGraph.mm
152     Shared/mac/PDFKitImports.mm
153     Shared/mac/PasteboardTypes.mm
154     Shared/mac/PrintInfoMac.mm
155     Shared/mac/SandboxExtensionMac.mm
156     Shared/mac/SandboxInitialiationParametersMac.mm
157     Shared/mac/SandboxUtilities.mm
158     Shared/mac/SecItemRequestData.cpp
159     Shared/mac/SecItemResponseData.cpp
160     Shared/mac/SecItemShim.cpp
161     Shared/mac/WebCoreArgumentCodersMac.mm
162     Shared/mac/WebEventFactory.mm
163     Shared/mac/WebGestureEvent.cpp
164     Shared/mac/WebHitTestResultData.mm
165     Shared/mac/WebMemorySampler.mac.mm
166
167     StorageProcess/mac/StorageProcessMac.mm
168
169     UIProcess/HighPerformanceGraphicsUsageSampler.cpp
170     UIProcess/PerActivityStateCPUUsageSampler.cpp
171     UIProcess/WebContextMenuListenerProxy.cpp
172     UIProcess/WebResourceLoadStatisticsStore.cpp
173     UIProcess/WebResourceLoadStatisticsTelemetry.cpp
174
175     UIProcess/Automation/WebAutomationSession.cpp
176
177     UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm
178
179     UIProcess/Automation/mac/WebAutomationSessionMac.mm
180
181     UIProcess/API/APIAttachment.cpp
182     UIProcess/API/APIUserScript.cpp
183     UIProcess/API/APIUserStyleSheet.cpp
184     UIProcess/API/APIWebsiteDataRecord.cpp
185
186     UIProcess/API/C/mac/WKContextPrivateMac.mm
187     UIProcess/API/C/mac/WKPagePrivateMac.mm
188
189     UIProcess/API/Cocoa/APIContentRuleListStoreCocoa.mm
190     UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm
191     UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm
192     UIProcess/API/Cocoa/LegacyBundleForClass.mm
193     UIProcess/API/Cocoa/WKBackForwardList.mm
194     UIProcess/API/Cocoa/WKBackForwardListItem.mm
195     UIProcess/API/Cocoa/WKBrowsingContextController.mm
196     UIProcess/API/Cocoa/WKBrowsingContextGroup.mm
197     UIProcess/API/Cocoa/WKConnection.mm
198     UIProcess/API/Cocoa/WKContentRuleList.mm
199     UIProcess/API/Cocoa/WKContentRuleListStore.mm
200     UIProcess/API/Cocoa/WKError.mm
201     UIProcess/API/Cocoa/WKFrameInfo.mm
202     UIProcess/API/Cocoa/WKHTTPCookieStore.mm
203     UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm
204     UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm
205     UIProcess/API/Cocoa/WKNavigation.mm
206     UIProcess/API/Cocoa/WKNavigationAction.mm
207     UIProcess/API/Cocoa/WKNavigationData.mm
208     UIProcess/API/Cocoa/WKNavigationResponse.mm
209     UIProcess/API/Cocoa/WKOpenPanelParameters.mm
210     UIProcess/API/Cocoa/WKPreferences.mm
211     UIProcess/API/Cocoa/WKPreviewActionItem.mm
212     UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm
213     UIProcess/API/Cocoa/WKPreviewElementInfo.mm
214     UIProcess/API/Cocoa/WKProcessGroup.mm
215     UIProcess/API/Cocoa/WKProcessPool.mm
216     UIProcess/API/Cocoa/WKScriptMessage.mm
217     UIProcess/API/Cocoa/WKSecurityOrigin.mm
218     UIProcess/API/Cocoa/WKTypeRefWrapper.mm
219     UIProcess/API/Cocoa/WKURLSchemeTask.mm
220     UIProcess/API/Cocoa/WKUserContentController.mm
221     UIProcess/API/Cocoa/WKUserScript.mm
222     UIProcess/API/Cocoa/WKWebView.mm
223     UIProcess/API/Cocoa/WKWebViewConfiguration.mm
224     UIProcess/API/Cocoa/WKWebsiteDataRecord.mm
225     UIProcess/API/Cocoa/WKWebsiteDataStore.mm
226     UIProcess/API/Cocoa/WKWindowFeatures.mm
227     UIProcess/API/Cocoa/_WKActivatedElementInfo.mm
228     UIProcess/API/Cocoa/_WKAttachment.mm
229     UIProcess/API/Cocoa/_WKAutomationSession.mm
230     UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.mm
231     UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm
232     UIProcess/API/Cocoa/_WKDownload.mm
233     UIProcess/API/Cocoa/_WKElementAction.mm
234     UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm
235     UIProcess/API/Cocoa/_WKExperimentalFeature.mm
236     UIProcess/API/Cocoa/_WKLinkIconParameters.mm
237     UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
238     UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm
239     UIProcess/API/Cocoa/_WKSessionState.mm
240     UIProcess/API/Cocoa/_WKThumbnailView.mm
241     UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm
242     UIProcess/API/Cocoa/_WKUserContentFilter.mm
243     UIProcess/API/Cocoa/_WKUserContentWorld.mm
244     UIProcess/API/Cocoa/_WKUserInitiatedAction.mm
245     UIProcess/API/Cocoa/_WKUserStyleSheet.mm
246     UIProcess/API/Cocoa/_WKVisitedLinkStore.mm
247     UIProcess/API/Cocoa/_WKWebsiteDataSize.mm
248     UIProcess/API/Cocoa/_WKWebsiteDataStore.mm
249     UIProcess/API/Cocoa/_WKWebsitePolicies.mm
250
251     UIProcess/API/mac/WKView.mm
252
253     UIProcess/Cocoa/AutomationClient.mm
254     UIProcess/Cocoa/AutomationSessionClient.mm
255     UIProcess/Cocoa/DiagnosticLoggingClient.mm
256     UIProcess/Cocoa/DownloadClient.mm
257     UIProcess/Cocoa/FindClient.mm
258     UIProcess/Cocoa/FullscreenClient.mm
259     UIProcess/Cocoa/IconLoadingDelegate.mm
260     UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm
261     UIProcess/Cocoa/NavigationState.mm
262     UIProcess/Cocoa/PageClientImplCocoa.mm
263     UIProcess/Cocoa/SessionStateCoding.mm
264     UIProcess/Cocoa/UIDelegate.mm
265     UIProcess/Cocoa/VersionChecks.mm
266     UIProcess/Cocoa/ViewGestureController.cpp
267     UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm
268     UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm
269     UIProcess/Cocoa/WebPageProxyCocoa.mm
270     UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
271     UIProcess/Cocoa/WebProcessPoolCocoa.mm
272     UIProcess/Cocoa/WebProcessProxyCocoa.mm
273     UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm
274     UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm
275     UIProcess/Cocoa/WebViewImpl.mm
276
277     UIProcess/Launcher/mac/ProcessLauncherMac.mm
278
279     UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp
280
281     UIProcess/Network/mac/NetworkProcessProxyMac.mm
282
283     UIProcess/Plugins/mac/PluginInfoStoreMac.mm
284     UIProcess/Plugins/mac/PluginProcessManagerMac.mm
285     UIProcess/Plugins/mac/PluginProcessProxyMac.mm
286
287     UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm
288     UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
289     UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp
290     UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
291     UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
292
293     UIProcess/WebStorage/StorageManager.cpp
294
295     UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
296
297     UIProcess/mac/CorrectionPanel.mm
298     UIProcess/mac/LegacySessionStateCoding.cpp
299     UIProcess/mac/PageClientImplMac.mm
300     UIProcess/mac/RemoteWebInspectorProxyMac.mm
301     UIProcess/mac/SecItemShimProxy.cpp
302     UIProcess/mac/ServicesController.mm
303     UIProcess/mac/TextCheckerMac.mm
304     UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
305     UIProcess/mac/ViewGestureControllerMac.mm
306     UIProcess/mac/ViewSnapshotStore.mm
307     UIProcess/mac/WKFullKeyboardAccessWatcher.mm
308     UIProcess/mac/WKFullScreenWindowController.mm
309     UIProcess/mac/WKImmediateActionController.mm
310     UIProcess/mac/WKInspectorViewController.mm
311     UIProcess/mac/WKPrintingView.mm
312     UIProcess/mac/WKSharingServicePickerDelegate.mm
313     UIProcess/mac/WKTextFinderClient.mm
314     UIProcess/mac/WKTextInputWindowController.mm
315     UIProcess/mac/WKViewLayoutStrategy.mm
316     UIProcess/mac/WKWebInspectorWKWebView.mm
317     UIProcess/mac/WebColorPickerMac.mm
318     UIProcess/mac/WebContextMenuProxyMac.mm
319     UIProcess/mac/WebCookieManagerProxyMac.mm
320     UIProcess/mac/WebInspectorProxyMac.mm
321     UIProcess/mac/WebPageProxyMac.mm
322     UIProcess/mac/WebPopupMenuProxyMac.mm
323     UIProcess/mac/WebPreferencesMac.mm
324     UIProcess/mac/WebProcessProxyMac.mm
325     UIProcess/mac/WindowServerConnection.mm
326
327     WebProcess/Cookies/mac/WebCookieManagerMac.mm
328
329     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm
330     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm
331     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm
332     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm
333     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm
334     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm
335     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm
336
337     WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm
338     WebProcess/InjectedBundle/API/mac/WKDOMElement.mm
339     WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm
340     WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
341     WebProcess/InjectedBundle/API/mac/WKDOMRange.mm
342     WebProcess/InjectedBundle/API/mac/WKDOMText.mm
343     WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm
344     WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm
345     WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
346
347     WebProcess/InjectedBundle/mac/InjectedBundleMac.mm
348
349     WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
350
351     WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
352     WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm
353
354     WebProcess/Plugins/PDF/PDFPlugin.mm
355     WebProcess/Plugins/PDF/PDFPluginAnnotation.mm
356     WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm
357     WebProcess/Plugins/PDF/PDFPluginPasswordField.mm
358     WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm
359
360     WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.cpp
361     WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm
362     WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp
363     WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm
364     WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp
365     WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm
366     WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm
367     WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
368     WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm
369
370     WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp
371     WebProcess/WebCoreSupport/WebValidationMessageClient.cpp
372
373     WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp
374     WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm
375     WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
376     WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm
377     WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
378     WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm
379
380     WebProcess/WebPage/ViewGestureGeometryCollector.cpp
381
382     WebProcess/WebPage/Cocoa/WebPageCocoa.mm
383
384     WebProcess/WebPage/mac/PageBannerMac.mm
385     WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
386     WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm
387     WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm
388     WebProcess/WebPage/mac/WebInspectorUIMac.mm
389     WebProcess/WebPage/mac/WebPageMac.mm
390
391     WebProcess/cocoa/WebProcessCocoa.mm
392
393     WebProcess/mac/SecItemShimLibrary.mm
394 )
395
396 list(APPEND WebKit_INCLUDE_DIRECTORIES
397     "${PAL_DIR}"
398     "${WEBKIT_DIR}/NetworkProcess/cocoa"
399     "${WEBKIT_DIR}/NetworkProcess/mac"
400     "${WEBKIT_DIR}/PluginProcess/mac"
401     "${WEBKIT_DIR}/UIProcess/mac"
402     "${WEBKIT_DIR}/UIProcess/API/C/mac"
403     "${WEBKIT_DIR}/UIProcess/API/Cocoa"
404     "${WEBKIT_DIR}/UIProcess/API/mac"
405     "${WEBKIT_DIR}/UIProcess/Cocoa"
406     "${WEBKIT_DIR}/UIProcess/Launcher/mac"
407     "${WEBKIT_DIR}/UIProcess/RemoteLayerTree"
408     "${WEBKIT_DIR}/UIProcess/RemoteLayerTree/ios"
409     "${WEBKIT_DIR}/UIProcess/ios"
410     "${WEBKIT_DIR}/Platform/cg"
411     "${WEBKIT_DIR}/Platform/classifier"
412     "${WEBKIT_DIR}/Platform/classifier/cocoa"
413     "${WEBKIT_DIR}/Platform/cocoa"
414     "${WEBKIT_DIR}/Platform/mac"
415     "${WEBKIT_DIR}/Platform/unix"
416     "${WEBKIT_DIR}/Platform/spi/Cocoa"
417     "${WEBKIT_DIR}/Platform/spi/mac"
418     "${WEBKIT_DIR}/Platform/IPC/mac"
419     "${WEBKIT_DIR}/Platform/spi/Cocoa"
420     "${WEBKIT_DIR}/Shared/API/Cocoa"
421     "${WEBKIT_DIR}/Shared/API/c/cf"
422     "${WEBKIT_DIR}/Shared/API/c/cg"
423     "${WEBKIT_DIR}/Shared/API/c/mac"
424     "${WEBKIT_DIR}/Shared/cf"
425     "${WEBKIT_DIR}/Shared/Cocoa"
426     "${WEBKIT_DIR}/Shared/EntryPointUtilities/mac/XPCService"
427     "${WEBKIT_DIR}/Shared/mac"
428     "${WEBKIT_DIR}/Shared/Plugins/mac"
429     "${WEBKIT_DIR}/Shared/Scrolling"
430     "${WEBKIT_DIR}/WebProcess/cocoa"
431     "${WEBKIT_DIR}/WebProcess/mac"
432     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/Cocoa"
433     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/mac"
434     "${WEBKIT_DIR}/WebProcess/Plugins/PDF"
435     "${WEBKIT_DIR}/WebProcess/Plugins/Netscape/mac"
436     "${WEBKIT_DIR}/WebProcess/WebPage/Cocoa"
437     "${WEBKIT_DIR}/WebProcess/WebPage/RemoteLayerTree"
438     "${WEBKIT_DIR}/WebProcess/WebPage/mac"
439     "${WEBKIT_DIR}/WebProcess/WebCoreSupport/mac"
440     "${FORWARDING_HEADERS_DIR}/WebCore"
441     "${DERIVED_SOURCES_WEBCORE_DIR}"
442 )
443
444 set(XPCService_SOURCES
445     Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm
446     Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm
447 )
448
449 set(WebProcess_SOURCES
450     WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm
451     ${XPCService_SOURCES}
452 )
453
454 set(PluginProcess_SOURCES
455     PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm
456     ${XPCService_SOURCES}
457 )
458
459 list(APPEND NetworkProcess_SOURCES
460     NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm
461     ${XPCService_SOURCES}
462 )
463
464 list(APPEND StorageProcess_SOURCES
465     StorageProcess/EntryPoint/mac/XPCService/StorageServiceEntryPoint.mm
466     ${XPCService_SOURCES}
467 )
468
469 # FIXME: These should not have Development in production builds.
470 set(WebKit_WebProcess_OUTPUT_NAME com.apple.WebKit.WebContent.Development)
471 set(WebKit_NetworkProcess_OUTPUT_NAME com.apple.WebKit.Networking.Development)
472 set(WebKit_StorageProcess_OUTPUT_NAME com.apple.WebKit.Storage.Development)
473
474 add_definitions("-include WebKit2Prefix.h")
475
476 set(WebKit_FORWARDING_HEADERS_FILES
477     Platform/cocoa/WKCrashReporter.h
478
479     Shared/API/c/WKDiagnosticLoggingResultType.h
480
481     UIProcess/API/C/WKPageDiagnosticLoggingClient.h
482     UIProcess/API/C/WKPageNavigationClient.h
483     UIProcess/API/C/WKPageRenderingProgressEvents.h
484 )
485
486 list(APPEND WebKit_MESSAGES_IN_FILES
487     NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in
488
489     Shared/API/Cocoa/RemoteObjectRegistry.messages.in
490
491     UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in
492     UIProcess/Cocoa/ViewGestureController.messages.in
493
494     UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in
495
496     UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in
497
498     UIProcess/mac/SecItemShimProxy.messages.in
499
500     WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.messages.in
501     WebProcess/WebPage/ViewGestureGeometryCollector.messages.in
502 )
503
504 set(WebKit_FORWARDING_HEADERS_DIRECTORIES
505     Platform
506     Shared
507
508     NetworkProcess/Downloads
509
510     Platform/IPC
511
512     Shared/API
513     Shared/Cocoa
514
515     Shared/API/Cocoa
516     Shared/API/c
517
518     Shared/API/c/cf
519     Shared/API/c/mac
520
521     UIProcess
522     UIProcess/Cocoa
523
524     UIProcess/API/C
525
526     UIProcess/API/C/Cocoa
527     UIProcess/API/C/mac
528     UIProcess/API/cpp
529
530     WebProcess/WebPage
531
532     WebProcess/InjectedBundle/API/Cocoa
533     WebProcess/InjectedBundle/API/c
534     WebProcess/InjectedBundle/API/mac
535 )
536
537 WEBKIT_CREATE_FORWARDING_HEADERS(WebKit FILES ${WebKit_FORWARDING_HEADERS_FILES} DIRECTORIES ${WebKit_FORWARDING_HEADERS_DIRECTORIES})
538
539 # This is needed right now to import ObjC headers instead of including them.
540 # FIXME: Forwarding headers should be copies of actual headers.
541 file(GLOB ObjCHeaders UIProcess/API/Cocoa/*.h)
542 foreach (_file ${ObjCHeaders})
543     get_filename_component(_name ${_file} NAME)
544     if (NOT EXISTS ${FORWARDING_HEADERS_DIR}/WebKit/${_name})
545         file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/${_name} "#import <WebKit/UIProcess/API/Cocoa/${_name}>")
546     endif ()
547 endforeach ()
548
549 # FIXME: Forwarding headers should be complete copies of the header.
550 set(WebKitLegacyForwardingHeaders
551     DOM.h
552     DOMCore.h
553     DOMElement.h
554     DOMException.h
555     DOMObject.h
556     DOMPrivate.h
557     WebApplicationCache.h
558     WebCache.h
559     WebCoreStatistics.h
560     WebDOMOperations.h
561     WebDOMOperationsPrivate.h
562     WebDatabaseManagerPrivate.h
563     WebDataSource.h
564     WebDataSourcePrivate.h
565     WebDefaultPolicyDelegate.h
566     WebDeviceOrientation.h
567     WebDeviceOrientationProviderMock.h
568     WebDocument.h
569     WebDocumentPrivate.h
570     WebDynamicScrollBarsView.h
571     WebEditingDelegate.h
572     WebFrame.h
573     WebFramePrivate.h
574     WebFrameViewPrivate.h
575     WebGeolocationPosition.h
576     WebHTMLRepresentation.h
577     WebHTMLView.h
578     WebHTMLViewPrivate.h
579     WebHistory.h
580     WebHistoryItem.h
581     WebHistoryItemPrivate.h
582     WebHistoryPrivate.h
583     WebIconDatabasePrivate.h
584     WebInspectorPrivate.h
585     WebKitNSStringExtras.h
586     WebNSURLExtras.h
587     WebNavigationData.h
588     WebNotification.h
589     WebPluginDatabase.h
590     WebPolicyDelegate.h
591     WebPolicyDelegatePrivate.h
592     WebPreferenceKeysPrivate.h
593     WebPreferences.h
594     WebPreferencesPrivate.h
595     WebQuotaManager.h
596     WebScriptWorld.h
597     WebSecurityOriginPrivate.h
598     WebStorageManagerPrivate.h
599     WebTypesInternal.h
600     WebUIDelegate.h
601     WebUIDelegatePrivate.h
602     WebView.h
603     WebViewPrivate
604     WebViewPrivate.h
605 )
606 foreach (_file ${WebKitLegacyForwardingHeaders})
607     file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/${_file} "#import <WebKitLegacy/${_file}>")
608 endforeach ()
609
610 set(ObjCForwardingHeaders
611     DOMAbstractView.h
612     DOMAttr.h
613     DOMBeforeLoadEvent.h
614     DOMBlob.h
615     DOMCDATASection.h
616     DOMCSSCharsetRule.h
617     DOMCSSFontFaceRule.h
618     DOMCSSImportRule.h
619     DOMCSSKeyframeRule.h
620     DOMCSSKeyframesRule.h
621     DOMCSSMediaRule.h
622     DOMCSSPageRule.h
623     DOMCSSPrimitiveValue.h
624     DOMCSSRule.h
625     DOMCSSRuleList.h
626     DOMCSSStyleDeclaration.h
627     DOMCSSStyleRule.h
628     DOMCSSStyleSheet.h
629     DOMCSSSupportsRule.h
630     DOMCSSUnknownRule.h
631     DOMCSSValue.h
632     DOMCSSValueList.h
633     DOMCharacterData.h
634     DOMComment.h
635     DOMCounter.h
636     DOMDOMImplementation.h
637     DOMDOMNamedFlowCollection.h
638     DOMDOMTokenList.h
639     DOMDocument.h
640     DOMDocumentFragment.h
641     DOMDocumentType.h
642     DOMElement.h
643     DOMEntity.h
644     DOMEntityReference.h
645     DOMEvent.h
646     DOMEventException.h
647     DOMEventListener.h
648     DOMEventTarget.h
649     DOMFile.h
650     DOMFileList.h
651     DOMHTMLAnchorElement.h
652     DOMHTMLAppletElement.h
653     DOMHTMLAreaElement.h
654     DOMHTMLBRElement.h
655     DOMHTMLBaseElement.h
656     DOMHTMLBaseFontElement.h
657     DOMHTMLBodyElement.h
658     DOMHTMLButtonElement.h
659     DOMHTMLCanvasElement.h
660     DOMHTMLCollection.h
661     DOMHTMLDListElement.h
662     DOMHTMLDirectoryElement.h
663     DOMHTMLDivElement.h
664     DOMHTMLDocument.h
665     DOMHTMLElement.h
666     DOMHTMLEmbedElement.h
667     DOMHTMLFieldSetElement.h
668     DOMHTMLFontElement.h
669     DOMHTMLFormElement.h
670     DOMHTMLFrameElement.h
671     DOMHTMLFrameSetElement.h
672     DOMHTMLHRElement.h
673     DOMHTMLHeadElement.h
674     DOMHTMLHeadingElement.h
675     DOMHTMLHtmlElement.h
676     DOMHTMLIFrameElement.h
677     DOMHTMLImageElement.h
678     DOMHTMLInputElement.h
679     DOMHTMLInputElementPrivate.h
680     DOMHTMLLIElement.h
681     DOMHTMLLabelElement.h
682     DOMHTMLLegendElement.h
683     DOMHTMLLinkElement.h
684     DOMHTMLMapElement.h
685     DOMHTMLMarqueeElement.h
686     DOMHTMLMediaElement.h
687     DOMHTMLMenuElement.h
688     DOMHTMLMetaElement.h
689     DOMHTMLModElement.h
690     DOMHTMLOListElement.h
691     DOMHTMLObjectElement.h
692     DOMHTMLOptGroupElement.h
693     DOMHTMLOptionElement.h
694     DOMHTMLOptionsCollection.h
695     DOMHTMLParagraphElement.h
696     DOMHTMLParamElement.h
697     DOMHTMLPreElement.h
698     DOMHTMLQuoteElement.h
699     DOMHTMLScriptElement.h
700     DOMHTMLSelectElement.h
701     DOMHTMLStyleElement.h
702     DOMHTMLTableCaptionElement.h
703     DOMHTMLTableCellElement.h
704     DOMHTMLTableColElement.h
705     DOMHTMLTableElement.h
706     DOMHTMLTableRowElement.h
707     DOMHTMLTableSectionElement.h
708     DOMHTMLTextAreaElement.h
709     DOMHTMLTitleElement.h
710     DOMHTMLUListElement.h
711     DOMHTMLVideoElement.h
712     DOMImplementation.h
713     DOMKeyboardEvent.h
714     DOMMediaError.h
715     DOMMediaList.h
716     DOMMessageEvent.h
717     DOMMessagePort.h
718     DOMMouseEvent.h
719     DOMMutationEvent.h
720     DOMNamedNodeMap.h
721     DOMNode.h
722     DOMNodeFilter.h
723     DOMNodeIterator.h
724     DOMNodeList.h
725     DOMOverflowEvent.h
726     DOMProcessingInstruction.h
727     DOMProgressEvent.h
728     DOMRGBColor.h
729     DOMRange.h
730     DOMRangeException.h
731     DOMRect.h
732     DOMStyleSheet.h
733     DOMStyleSheetList.h
734     DOMText.h
735     DOMTextEvent.h
736     DOMTimeRanges.h
737     DOMTreeWalker.h
738     DOMUIEvent.h
739     DOMValidityState.h
740     DOMWebKitCSSFilterValue.h
741     DOMWebKitCSSRegionRule.h
742     DOMWebKitCSSTransformValue.h
743     DOMWebKitNamedFlow.h
744     DOMWheelEvent.h
745     DOMXPathException.h
746     DOMXPathExpression.h
747     DOMXPathNSResolver.h
748     DOMXPathResult.h
749 )
750 foreach (_file ${ObjCForwardingHeaders})
751     file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/${_file} "#import <WebKitLegacy/${_file}>")
752 endforeach ()
753
754 list(APPEND WebKit_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS
755     --platform=macOS
756 )
757
758 # FIXME: These should not be necessary.
759 file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/WKImageCG.h "#import <WebKit/Shared/API/c/cg/WKImageCG.h>")
760
761 set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
762
763 set(WebKit_OUTPUT_NAME WebKit)
764
765 # XPC Services
766
767 function(WEBKIT_DEFINE_XPC_SERVICES)
768     set(WebKit_XPC_SERVICE_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/Versions/A/XPCServices)
769     WEBKIT_CREATE_SYMLINK(WebProcess ${WebKit_XPC_SERVICE_DIR} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/XPCServices)
770
771     function(WEBKIT_XPC_SERVICE _target _bundle_identifier _info_plist _executable_name)
772         set(_service_dir ${WebKit_XPC_SERVICE_DIR}/${_bundle_identifier}.xpc/Contents)
773         make_directory(${_service_dir}/MacOS)
774         make_directory(${_service_dir}/_CodeSignature)
775         make_directory(${_service_dir}/Resources)
776
777         # FIXME: These version strings don't match Xcode's.
778         set(BUNDLE_VERSION ${WEBKIT_VERSION})
779         set(SHORT_VERSION_STRING ${WEBKIT_VERSION_MAJOR})
780         set(BUNDLE_VERSION ${WEBKIT_VERSION})
781         set(EXECUTABLE_NAME ${_executable_name})
782         set(PRODUCT_BUNDLE_IDENTIFIER ${_bundle_identifier})
783         set(PRODUCT_NAME ${_bundle_identifier})
784         configure_file(${_info_plist} ${_service_dir}/Info.plist)
785
786         set_target_properties(${_target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${_service_dir}/MacOS")
787     endfunction()
788
789     WEBKIT_XPC_SERVICE(WebProcess
790         "com.apple.WebKit.WebContent"
791         ${WEBKIT_DIR}/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist
792         ${WebKit_WebProcess_OUTPUT_NAME})
793
794     WEBKIT_XPC_SERVICE(NetworkProcess
795         "com.apple.WebKit.Networking"
796         ${WEBKIT_DIR}/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist
797         ${WebKit_NetworkProcess_OUTPUT_NAME})
798
799     WEBKIT_XPC_SERVICE(StorageProcess
800         "com.apple.WebKit.Storage"
801         ${WEBKIT_DIR}/StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist
802         ${WebKit_StorageProcess_OUTPUT_NAME})
803
804     add_custom_target(WebContentProcessNib COMMAND
805         ibtool --compile ${WebKit_XPC_SERVICE_DIR}/com.apple.WebKit.WebContent.xpc/Contents/Resources/WebContentProcess.nib ${WEBKIT_DIR}/Resources/WebContentProcess.xib
806         VERBATIM)
807     add_dependencies(WebKit WebContentProcessNib)
808 endfunction()