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