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