Add a WebViewDidMoveToWindowObserver for WKWebView
[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     "${DERIVED_SOURCES_WEBCORE_DIR}"
427 )
428
429 set(XPCService_SOURCES
430     Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm
431     Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm
432 )
433
434 set(WebProcess_SOURCES
435     WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm
436     ${XPCService_SOURCES}
437 )
438
439 set(PluginProcess_SOURCES
440     PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm
441     ${XPCService_SOURCES}
442 )
443
444 list(APPEND NetworkProcess_SOURCES
445     NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm
446     ${XPCService_SOURCES}
447 )
448
449 # FIXME: These should not have Development in production builds.
450 set(WebKit_WebProcess_OUTPUT_NAME com.apple.WebKit.WebContent.Development)
451 set(WebKit_NetworkProcess_OUTPUT_NAME com.apple.WebKit.Networking.Development)
452
453 add_definitions("-include WebKit2Prefix.h")
454
455 set(WebKit_FORWARDING_HEADERS_FILES
456     Platform/cocoa/WKCrashReporter.h
457
458     Shared/API/c/WKDiagnosticLoggingResultType.h
459
460     UIProcess/API/C/WKPageDiagnosticLoggingClient.h
461     UIProcess/API/C/WKPageNavigationClient.h
462     UIProcess/API/C/WKPageRenderingProgressEvents.h
463 )
464
465 list(APPEND WebKit_MESSAGES_IN_FILES
466     NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in
467
468     Shared/API/Cocoa/RemoteObjectRegistry.messages.in
469
470     UIProcess/ViewGestureController.messages.in
471
472     UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in
473
474     UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in
475
476     UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in
477
478     UIProcess/mac/SecItemShimProxy.messages.in
479
480     WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.messages.in
481     WebProcess/WebPage/ViewGestureGeometryCollector.messages.in
482 )
483
484 set(WebKit_FORWARDING_HEADERS_DIRECTORIES
485     Platform
486     Shared
487
488     NetworkProcess/Downloads
489
490     Platform/IPC
491
492     Shared/API
493     Shared/Cocoa
494
495     Shared/API/Cocoa
496     Shared/API/c
497
498     Shared/API/c/cf
499     Shared/API/c/mac
500
501     UIProcess
502     UIProcess/Cocoa
503
504     UIProcess/API/C
505
506     UIProcess/API/C/Cocoa
507     UIProcess/API/C/mac
508     UIProcess/API/cpp
509
510     WebProcess/WebPage
511
512     WebProcess/InjectedBundle/API/Cocoa
513     WebProcess/InjectedBundle/API/c
514     WebProcess/InjectedBundle/API/mac
515 )
516
517 WEBKIT_CREATE_FORWARDING_HEADERS(WebKit FILES ${WebKit_FORWARDING_HEADERS_FILES} DIRECTORIES ${WebKit_FORWARDING_HEADERS_DIRECTORIES})
518
519 # This is needed right now to import ObjC headers instead of including them.
520 # FIXME: Forwarding headers should be copies of actual headers.
521 file(GLOB ObjCHeaders UIProcess/API/Cocoa/*.h)
522 foreach (_file ${ObjCHeaders})
523     get_filename_component(_name ${_file} NAME)
524     if (NOT EXISTS ${FORWARDING_HEADERS_DIR}/WebKit/${_name})
525         file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/${_name} "#import <WebKit/UIProcess/API/Cocoa/${_name}>")
526     endif ()
527 endforeach ()
528
529 # FIXME: Forwarding headers should be complete copies of the header.
530 set(WebKitLegacyForwardingHeaders
531     DOM.h
532     DOMCore.h
533     DOMElement.h
534     DOMException.h
535     DOMObject.h
536     DOMPrivate.h
537     WebApplicationCache.h
538     WebCache.h
539     WebCoreStatistics.h
540     WebDOMOperations.h
541     WebDOMOperationsPrivate.h
542     WebDatabaseManagerPrivate.h
543     WebDataSource.h
544     WebDataSourcePrivate.h
545     WebDefaultPolicyDelegate.h
546     WebDeviceOrientation.h
547     WebDeviceOrientationProviderMock.h
548     WebDocument.h
549     WebDocumentPrivate.h
550     WebDynamicScrollBarsView.h
551     WebEditingDelegate.h
552     WebFrame.h
553     WebFramePrivate.h
554     WebFrameViewPrivate.h
555     WebGeolocationPosition.h
556     WebHTMLRepresentation.h
557     WebHTMLView.h
558     WebHTMLViewPrivate.h
559     WebHistory.h
560     WebHistoryItem.h
561     WebHistoryItemPrivate.h
562     WebHistoryPrivate.h
563     WebIconDatabasePrivate.h
564     WebInspectorPrivate.h
565     WebKitNSStringExtras.h
566     WebNSURLExtras.h
567     WebNavigationData.h
568     WebNotification.h
569     WebPluginDatabase.h
570     WebPolicyDelegate.h
571     WebPolicyDelegatePrivate.h
572     WebPreferenceKeysPrivate.h
573     WebPreferences.h
574     WebPreferencesPrivate.h
575     WebQuotaManager.h
576     WebScriptWorld.h
577     WebSecurityOriginPrivate.h
578     WebStorageManagerPrivate.h
579     WebTypesInternal.h
580     WebUIDelegate.h
581     WebUIDelegatePrivate.h
582     WebView.h
583     WebViewPrivate
584     WebViewPrivate.h
585 )
586 foreach (_file ${WebKitLegacyForwardingHeaders})
587     file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/${_file} "#import <WebKitLegacy/${_file}>")
588 endforeach ()
589
590 set(ObjCForwardingHeaders
591     DOMAbstractView.h
592     DOMAttr.h
593     DOMBeforeLoadEvent.h
594     DOMBlob.h
595     DOMCDATASection.h
596     DOMCSSCharsetRule.h
597     DOMCSSFontFaceRule.h
598     DOMCSSImportRule.h
599     DOMCSSKeyframeRule.h
600     DOMCSSKeyframesRule.h
601     DOMCSSMediaRule.h
602     DOMCSSPageRule.h
603     DOMCSSPrimitiveValue.h
604     DOMCSSRule.h
605     DOMCSSRuleList.h
606     DOMCSSStyleDeclaration.h
607     DOMCSSStyleRule.h
608     DOMCSSStyleSheet.h
609     DOMCSSSupportsRule.h
610     DOMCSSUnknownRule.h
611     DOMCSSValue.h
612     DOMCSSValueList.h
613     DOMCharacterData.h
614     DOMComment.h
615     DOMCounter.h
616     DOMDOMImplementation.h
617     DOMDOMNamedFlowCollection.h
618     DOMDOMTokenList.h
619     DOMDocument.h
620     DOMDocumentFragment.h
621     DOMDocumentType.h
622     DOMElement.h
623     DOMEntity.h
624     DOMEntityReference.h
625     DOMEvent.h
626     DOMEventException.h
627     DOMEventListener.h
628     DOMEventTarget.h
629     DOMFile.h
630     DOMFileList.h
631     DOMHTMLAnchorElement.h
632     DOMHTMLAppletElement.h
633     DOMHTMLAreaElement.h
634     DOMHTMLBRElement.h
635     DOMHTMLBaseElement.h
636     DOMHTMLBaseFontElement.h
637     DOMHTMLBodyElement.h
638     DOMHTMLButtonElement.h
639     DOMHTMLCanvasElement.h
640     DOMHTMLCollection.h
641     DOMHTMLDListElement.h
642     DOMHTMLDirectoryElement.h
643     DOMHTMLDivElement.h
644     DOMHTMLDocument.h
645     DOMHTMLElement.h
646     DOMHTMLEmbedElement.h
647     DOMHTMLFieldSetElement.h
648     DOMHTMLFontElement.h
649     DOMHTMLFormElement.h
650     DOMHTMLFrameElement.h
651     DOMHTMLFrameSetElement.h
652     DOMHTMLHRElement.h
653     DOMHTMLHeadElement.h
654     DOMHTMLHeadingElement.h
655     DOMHTMLHtmlElement.h
656     DOMHTMLIFrameElement.h
657     DOMHTMLImageElement.h
658     DOMHTMLInputElement.h
659     DOMHTMLInputElementPrivate.h
660     DOMHTMLLIElement.h
661     DOMHTMLLabelElement.h
662     DOMHTMLLegendElement.h
663     DOMHTMLLinkElement.h
664     DOMHTMLMapElement.h
665     DOMHTMLMarqueeElement.h
666     DOMHTMLMediaElement.h
667     DOMHTMLMenuElement.h
668     DOMHTMLMetaElement.h
669     DOMHTMLModElement.h
670     DOMHTMLOListElement.h
671     DOMHTMLObjectElement.h
672     DOMHTMLOptGroupElement.h
673     DOMHTMLOptionElement.h
674     DOMHTMLOptionsCollection.h
675     DOMHTMLParagraphElement.h
676     DOMHTMLParamElement.h
677     DOMHTMLPreElement.h
678     DOMHTMLQuoteElement.h
679     DOMHTMLScriptElement.h
680     DOMHTMLSelectElement.h
681     DOMHTMLStyleElement.h
682     DOMHTMLTableCaptionElement.h
683     DOMHTMLTableCellElement.h
684     DOMHTMLTableColElement.h
685     DOMHTMLTableElement.h
686     DOMHTMLTableRowElement.h
687     DOMHTMLTableSectionElement.h
688     DOMHTMLTextAreaElement.h
689     DOMHTMLTitleElement.h
690     DOMHTMLUListElement.h
691     DOMHTMLVideoElement.h
692     DOMImplementation.h
693     DOMKeyboardEvent.h
694     DOMMediaError.h
695     DOMMediaList.h
696     DOMMessageEvent.h
697     DOMMessagePort.h
698     DOMMouseEvent.h
699     DOMMutationEvent.h
700     DOMNamedNodeMap.h
701     DOMNode.h
702     DOMNodeFilter.h
703     DOMNodeIterator.h
704     DOMNodeList.h
705     DOMOverflowEvent.h
706     DOMProcessingInstruction.h
707     DOMProgressEvent.h
708     DOMRGBColor.h
709     DOMRange.h
710     DOMRangeException.h
711     DOMRect.h
712     DOMStyleSheet.h
713     DOMStyleSheetList.h
714     DOMText.h
715     DOMTextEvent.h
716     DOMTimeRanges.h
717     DOMTreeWalker.h
718     DOMUIEvent.h
719     DOMValidityState.h
720     DOMWebKitCSSFilterValue.h
721     DOMWebKitCSSRegionRule.h
722     DOMWebKitCSSTransformValue.h
723     DOMWebKitNamedFlow.h
724     DOMWheelEvent.h
725     DOMXPathException.h
726     DOMXPathExpression.h
727     DOMXPathNSResolver.h
728     DOMXPathResult.h
729 )
730 foreach (_file ${ObjCForwardingHeaders})
731     file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/${_file} "#import <WebKitLegacy/${_file}>")
732 endforeach ()
733
734 list(APPEND WebKit_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS
735     --platform=macOS
736 )
737
738 # FIXME: These should not be necessary.
739 file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/WKImageCG.h "#import <WebKit/Shared/API/c/cg/WKImageCG.h>")
740
741 set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
742
743 set(WebKit_OUTPUT_NAME WebKit)
744
745 # XPC Services
746
747 function(WEBKIT_DEFINE_XPC_SERVICES)
748     set(WebKit_XPC_SERVICE_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/Versions/A/XPCServices)
749     WEBKIT_CREATE_SYMLINK(WebProcess ${WebKit_XPC_SERVICE_DIR} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/XPCServices)
750
751     function(WEBKIT_XPC_SERVICE _target _bundle_identifier _info_plist _executable_name)
752         set(_service_dir ${WebKit_XPC_SERVICE_DIR}/${_bundle_identifier}.xpc/Contents)
753         make_directory(${_service_dir}/MacOS)
754         make_directory(${_service_dir}/_CodeSignature)
755         make_directory(${_service_dir}/Resources)
756
757         # FIXME: These version strings don't match Xcode's.
758         set(BUNDLE_VERSION ${WEBKIT_VERSION})
759         set(SHORT_VERSION_STRING ${WEBKIT_VERSION_MAJOR})
760         set(BUNDLE_VERSION ${WEBKIT_VERSION})
761         set(EXECUTABLE_NAME ${_executable_name})
762         set(PRODUCT_BUNDLE_IDENTIFIER ${_bundle_identifier})
763         set(PRODUCT_NAME ${_bundle_identifier})
764         configure_file(${_info_plist} ${_service_dir}/Info.plist)
765
766         set_target_properties(${_target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${_service_dir}/MacOS")
767     endfunction()
768
769     WEBKIT_XPC_SERVICE(WebProcess
770         "com.apple.WebKit.WebContent"
771         ${WEBKIT_DIR}/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist
772         ${WebKit_WebProcess_OUTPUT_NAME})
773
774     WEBKIT_XPC_SERVICE(NetworkProcess
775         "com.apple.WebKit.Networking"
776         ${WEBKIT_DIR}/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist
777         ${WebKit_NetworkProcess_OUTPUT_NAME})
778
779     add_custom_target(WebContentProcessNib COMMAND
780         ibtool --compile ${WebKit_XPC_SERVICE_DIR}/com.apple.WebKit.WebContent.xpc/Contents/Resources/WebContentProcess.nib ${WEBKIT_DIR}/Resources/WebContentProcess.xib
781         VERBATIM)
782     add_dependencies(WebKit WebContentProcessNib)
783 endfunction()