a6cfe1de86edec09da5ed95c9a7397a81d85ae7b
[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
165     UIProcess/Automation/WebAutomationSession.cpp
166
167     UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm
168
169     UIProcess/Automation/mac/WebAutomationSessionMac.mm
170
171     UIProcess/API/APIUserScript.cpp
172     UIProcess/API/APIUserStyleSheet.cpp
173     UIProcess/API/APIWebsiteDataRecord.cpp
174
175     UIProcess/API/C/mac/WKContextPrivateMac.mm
176     UIProcess/API/C/mac/WKPagePrivateMac.mm
177
178     UIProcess/API/Cocoa/APIContentRuleListStoreCocoa.mm
179     UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm
180     UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm
181     UIProcess/API/Cocoa/LegacyBundleForClass.mm
182     UIProcess/API/Cocoa/WKBackForwardList.mm
183     UIProcess/API/Cocoa/WKBackForwardListItem.mm
184     UIProcess/API/Cocoa/WKBrowsingContextController.mm
185     UIProcess/API/Cocoa/WKBrowsingContextGroup.mm
186     UIProcess/API/Cocoa/WKConnection.mm
187     UIProcess/API/Cocoa/WKContentRuleList.mm
188     UIProcess/API/Cocoa/WKContentRuleListStore.mm
189     UIProcess/API/Cocoa/WKError.mm
190     UIProcess/API/Cocoa/WKFrameInfo.mm
191     UIProcess/API/Cocoa/WKHTTPCookieStore.mm
192     UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm
193     UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm
194     UIProcess/API/Cocoa/WKNavigation.mm
195     UIProcess/API/Cocoa/WKNavigationAction.mm
196     UIProcess/API/Cocoa/WKNavigationData.mm
197     UIProcess/API/Cocoa/WKNavigationResponse.mm
198     UIProcess/API/Cocoa/WKOpenPanelParameters.mm
199     UIProcess/API/Cocoa/WKPreferences.mm
200     UIProcess/API/Cocoa/WKPreviewActionItem.mm
201     UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm
202     UIProcess/API/Cocoa/WKPreviewElementInfo.mm
203     UIProcess/API/Cocoa/WKProcessGroup.mm
204     UIProcess/API/Cocoa/WKProcessPool.mm
205     UIProcess/API/Cocoa/WKScriptMessage.mm
206     UIProcess/API/Cocoa/WKSecurityOrigin.mm
207     UIProcess/API/Cocoa/WKTypeRefWrapper.mm
208     UIProcess/API/Cocoa/WKURLSchemeTask.mm
209     UIProcess/API/Cocoa/WKUserContentController.mm
210     UIProcess/API/Cocoa/WKUserScript.mm
211     UIProcess/API/Cocoa/WKWebView.mm
212     UIProcess/API/Cocoa/WKWebViewConfiguration.mm
213     UIProcess/API/Cocoa/WKWebsiteDataRecord.mm
214     UIProcess/API/Cocoa/WKWebsiteDataStore.mm
215     UIProcess/API/Cocoa/WKWindowFeatures.mm
216     UIProcess/API/Cocoa/_WKActivatedElementInfo.mm
217     UIProcess/API/Cocoa/_WKApplicationManifest.mm
218     UIProcess/API/Cocoa/_WKAttachment.mm
219     UIProcess/API/Cocoa/_WKAutomationSession.mm
220     UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.mm
221     UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm
222     UIProcess/API/Cocoa/_WKDownload.mm
223     UIProcess/API/Cocoa/_WKElementAction.mm
224     UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm
225     UIProcess/API/Cocoa/_WKExperimentalFeature.mm
226     UIProcess/API/Cocoa/_WKLinkIconParameters.mm
227     UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
228     UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm
229     UIProcess/API/Cocoa/_WKSessionState.mm
230     UIProcess/API/Cocoa/_WKThumbnailView.mm
231     UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm
232     UIProcess/API/Cocoa/_WKUserContentFilter.mm
233     UIProcess/API/Cocoa/_WKUserContentWorld.mm
234     UIProcess/API/Cocoa/_WKUserInitiatedAction.mm
235     UIProcess/API/Cocoa/_WKUserStyleSheet.mm
236     UIProcess/API/Cocoa/_WKVisitedLinkStore.mm
237     UIProcess/API/Cocoa/_WKWebsiteDataSize.mm
238     UIProcess/API/Cocoa/_WKWebsiteDataStore.mm
239     UIProcess/API/Cocoa/_WKWebsitePolicies.mm
240
241     UIProcess/API/mac/WKView.mm
242
243     UIProcess/Cocoa/AutomationClient.mm
244     UIProcess/Cocoa/AutomationSessionClient.mm
245     UIProcess/Cocoa/DiagnosticLoggingClient.mm
246     UIProcess/Cocoa/DownloadClient.mm
247     UIProcess/Cocoa/FindClient.mm
248     UIProcess/Cocoa/FullscreenClient.mm
249     UIProcess/Cocoa/IconLoadingDelegate.mm
250     UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm
251     UIProcess/Cocoa/NavigationState.mm
252     UIProcess/Cocoa/PageClientImplCocoa.mm
253     UIProcess/Cocoa/SessionStateCoding.mm
254     UIProcess/Cocoa/UIDelegate.mm
255     UIProcess/Cocoa/VersionChecks.mm
256     UIProcess/Cocoa/ViewGestureController.cpp
257     UIProcess/Cocoa/WKFullKeyboardAccessWatcher.mm
258     UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm
259     UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm
260     UIProcess/Cocoa/WebPageProxyCocoa.mm
261     UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
262     UIProcess/Cocoa/WebProcessPoolCocoa.mm
263     UIProcess/Cocoa/WebProcessProxyCocoa.mm
264     UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm
265     UIProcess/Cocoa/WebViewImpl.mm
266
267     UIProcess/Launcher/mac/ProcessLauncherMac.mm
268
269     UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp
270
271     UIProcess/Plugins/mac/PluginInfoStoreMac.mm
272     UIProcess/Plugins/mac/PluginProcessManagerMac.mm
273     UIProcess/Plugins/mac/PluginProcessProxyMac.mm
274
275     UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm
276     UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
277     UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp
278     UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
279     UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
280
281     UIProcess/WebStorage/StorageManager.cpp
282
283     UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
284
285     UIProcess/mac/CorrectionPanel.mm
286     UIProcess/mac/LegacySessionStateCoding.cpp
287     UIProcess/mac/PageClientImplMac.mm
288     UIProcess/mac/RemoteWebInspectorProxyMac.mm
289     UIProcess/mac/SecItemShimProxy.cpp
290     UIProcess/mac/ServicesController.mm
291     UIProcess/mac/TextCheckerMac.mm
292     UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
293     UIProcess/mac/ViewGestureControllerMac.mm
294     UIProcess/mac/ViewSnapshotStore.mm
295     UIProcess/mac/WKFullScreenWindowController.mm
296     UIProcess/mac/WKImmediateActionController.mm
297     UIProcess/mac/WKInspectorViewController.mm
298     UIProcess/mac/WKInspectorWKWebView.mm
299     UIProcess/mac/WKPrintingView.mm
300     UIProcess/mac/WKSharingServicePickerDelegate.mm
301     UIProcess/mac/WKTextFinderClient.mm
302     UIProcess/mac/WKTextInputWindowController.mm
303     UIProcess/mac/WKViewLayoutStrategy.mm
304     UIProcess/mac/WebColorPickerMac.mm
305     UIProcess/mac/WebContextMenuProxyMac.mm
306     UIProcess/mac/WebCookieManagerProxyMac.mm
307     UIProcess/mac/WebInspectorProxyMac.mm
308     UIProcess/mac/WebPageProxyMac.mm
309     UIProcess/mac/WebPopupMenuProxyMac.mm
310     UIProcess/mac/WebPreferencesMac.mm
311     UIProcess/mac/WebProcessProxyMac.mm
312     UIProcess/mac/WindowServerConnection.mm
313
314     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm
315     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm
316     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm
317     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm
318     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm
319     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm
320     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm
321
322     WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm
323     WebProcess/InjectedBundle/API/mac/WKDOMElement.mm
324     WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm
325     WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
326     WebProcess/InjectedBundle/API/mac/WKDOMRange.mm
327     WebProcess/InjectedBundle/API/mac/WKDOMText.mm
328     WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm
329     WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm
330     WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
331
332     WebProcess/InjectedBundle/mac/InjectedBundleMac.mm
333
334     WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
335
336     WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
337     WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm
338
339     WebProcess/Plugins/PDF/PDFPlugin.mm
340     WebProcess/Plugins/PDF/PDFPluginAnnotation.mm
341     WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm
342     WebProcess/Plugins/PDF/PDFPluginPasswordField.mm
343     WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm
344
345     WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.cpp
346     WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm
347     WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp
348     WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm
349     WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp
350     WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm
351     WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm
352     WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
353     WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm
354
355     WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp
356     WebProcess/WebCoreSupport/WebValidationMessageClient.cpp
357
358     WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp
359     WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm
360     WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
361     WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm
362     WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
363     WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm
364
365     WebProcess/WebPage/ViewGestureGeometryCollector.cpp
366
367     WebProcess/WebPage/Cocoa/WebPageCocoa.mm
368
369     WebProcess/WebPage/mac/PageBannerMac.mm
370     WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
371     WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm
372     WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm
373     WebProcess/WebPage/mac/WebInspectorUIMac.mm
374     WebProcess/WebPage/mac/WebPageMac.mm
375
376     WebProcess/cocoa/WebProcessCocoa.mm
377
378     WebProcess/mac/SecItemShimLibrary.mm
379 )
380
381 list(APPEND WebKit_INCLUDE_DIRECTORIES
382     "${WEBKIT_DIR}/NetworkProcess/cocoa"
383     "${WEBKIT_DIR}/NetworkProcess/mac"
384     "${WEBKIT_DIR}/PluginProcess/mac"
385     "${WEBKIT_DIR}/UIProcess/mac"
386     "${WEBKIT_DIR}/UIProcess/API/C/mac"
387     "${WEBKIT_DIR}/UIProcess/API/Cocoa"
388     "${WEBKIT_DIR}/UIProcess/API/mac"
389     "${WEBKIT_DIR}/UIProcess/Cocoa"
390     "${WEBKIT_DIR}/UIProcess/Launcher/mac"
391     "${WEBKIT_DIR}/UIProcess/RemoteLayerTree"
392     "${WEBKIT_DIR}/UIProcess/RemoteLayerTree/ios"
393     "${WEBKIT_DIR}/UIProcess/ios"
394     "${WEBKIT_DIR}/Platform/cg"
395     "${WEBKIT_DIR}/Platform/classifier"
396     "${WEBKIT_DIR}/Platform/classifier/cocoa"
397     "${WEBKIT_DIR}/Platform/cocoa"
398     "${WEBKIT_DIR}/Platform/mac"
399     "${WEBKIT_DIR}/Platform/unix"
400     "${WEBKIT_DIR}/Platform/spi/Cocoa"
401     "${WEBKIT_DIR}/Platform/spi/mac"
402     "${WEBKIT_DIR}/Platform/IPC/mac"
403     "${WEBKIT_DIR}/Platform/spi/Cocoa"
404     "${WEBKIT_DIR}/Shared/API/Cocoa"
405     "${WEBKIT_DIR}/Shared/API/c/cf"
406     "${WEBKIT_DIR}/Shared/API/c/cg"
407     "${WEBKIT_DIR}/Shared/API/c/mac"
408     "${WEBKIT_DIR}/Shared/cf"
409     "${WEBKIT_DIR}/Shared/Cocoa"
410     "${WEBKIT_DIR}/Shared/EntryPointUtilities/mac/XPCService"
411     "${WEBKIT_DIR}/Shared/mac"
412     "${WEBKIT_DIR}/Shared/Plugins/mac"
413     "${WEBKIT_DIR}/Shared/Scrolling"
414     "${WEBKIT_DIR}/WebProcess/cocoa"
415     "${WEBKIT_DIR}/WebProcess/mac"
416     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/Cocoa"
417     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/mac"
418     "${WEBKIT_DIR}/WebProcess/Plugins/PDF"
419     "${WEBKIT_DIR}/WebProcess/Plugins/Netscape/mac"
420     "${WEBKIT_DIR}/WebProcess/WebPage/Cocoa"
421     "${WEBKIT_DIR}/WebProcess/WebPage/RemoteLayerTree"
422     "${WEBKIT_DIR}/WebProcess/WebPage/mac"
423     "${WEBKIT_DIR}/WebProcess/WebCoreSupport/mac"
424     "${FORWARDING_HEADERS_DIR}/WebCore"
425     "${DERIVED_SOURCES_WEBCORE_DIR}"
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/Cocoa/VideoFullscreenManagerProxy.messages.in
470     UIProcess/Cocoa/ViewGestureController.messages.in
471
472     UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in
473
474     UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in
475
476     UIProcess/mac/SecItemShimProxy.messages.in
477
478     WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.messages.in
479     WebProcess/WebPage/ViewGestureGeometryCollector.messages.in
480 )
481
482 set(WebKit_FORWARDING_HEADERS_DIRECTORIES
483     Platform
484     Shared
485
486     NetworkProcess/Downloads
487
488     Platform/IPC
489
490     Shared/API
491     Shared/Cocoa
492
493     Shared/API/Cocoa
494     Shared/API/c
495
496     Shared/API/c/cf
497     Shared/API/c/mac
498
499     UIProcess
500     UIProcess/Cocoa
501
502     UIProcess/API/C
503
504     UIProcess/API/C/Cocoa
505     UIProcess/API/C/mac
506     UIProcess/API/cpp
507
508     WebProcess/WebPage
509
510     WebProcess/InjectedBundle/API/Cocoa
511     WebProcess/InjectedBundle/API/c
512     WebProcess/InjectedBundle/API/mac
513 )
514
515 WEBKIT_CREATE_FORWARDING_HEADERS(WebKit FILES ${WebKit_FORWARDING_HEADERS_FILES} DIRECTORIES ${WebKit_FORWARDING_HEADERS_DIRECTORIES})
516
517 # This is needed right now to import ObjC headers instead of including them.
518 # FIXME: Forwarding headers should be copies of actual headers.
519 file(GLOB ObjCHeaders UIProcess/API/Cocoa/*.h)
520 foreach (_file ${ObjCHeaders})
521     get_filename_component(_name ${_file} NAME)
522     if (NOT EXISTS ${FORWARDING_HEADERS_DIR}/WebKit/${_name})
523         file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/${_name} "#import <WebKit/UIProcess/API/Cocoa/${_name}>")
524     endif ()
525 endforeach ()
526
527 # FIXME: Forwarding headers should be complete copies of the header.
528 set(WebKitLegacyForwardingHeaders
529     DOM.h
530     DOMCore.h
531     DOMElement.h
532     DOMException.h
533     DOMObject.h
534     DOMPrivate.h
535     WebApplicationCache.h
536     WebCache.h
537     WebCoreStatistics.h
538     WebDOMOperations.h
539     WebDOMOperationsPrivate.h
540     WebDatabaseManagerPrivate.h
541     WebDataSource.h
542     WebDataSourcePrivate.h
543     WebDefaultPolicyDelegate.h
544     WebDeviceOrientation.h
545     WebDeviceOrientationProviderMock.h
546     WebDocument.h
547     WebDocumentPrivate.h
548     WebDynamicScrollBarsView.h
549     WebEditingDelegate.h
550     WebFrame.h
551     WebFramePrivate.h
552     WebFrameViewPrivate.h
553     WebGeolocationPosition.h
554     WebHTMLRepresentation.h
555     WebHTMLView.h
556     WebHTMLViewPrivate.h
557     WebHistory.h
558     WebHistoryItem.h
559     WebHistoryItemPrivate.h
560     WebHistoryPrivate.h
561     WebIconDatabasePrivate.h
562     WebInspectorPrivate.h
563     WebKitNSStringExtras.h
564     WebNSURLExtras.h
565     WebNavigationData.h
566     WebNotification.h
567     WebPluginDatabase.h
568     WebPolicyDelegate.h
569     WebPolicyDelegatePrivate.h
570     WebPreferenceKeysPrivate.h
571     WebPreferences.h
572     WebPreferencesPrivate.h
573     WebQuotaManager.h
574     WebScriptWorld.h
575     WebSecurityOriginPrivate.h
576     WebStorageManagerPrivate.h
577     WebTypesInternal.h
578     WebUIDelegate.h
579     WebUIDelegatePrivate.h
580     WebView.h
581     WebViewPrivate
582     WebViewPrivate.h
583 )
584 foreach (_file ${WebKitLegacyForwardingHeaders})
585     file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/${_file} "#import <WebKitLegacy/${_file}>")
586 endforeach ()
587
588 set(ObjCForwardingHeaders
589     DOMAbstractView.h
590     DOMAttr.h
591     DOMBeforeLoadEvent.h
592     DOMBlob.h
593     DOMCDATASection.h
594     DOMCSSCharsetRule.h
595     DOMCSSFontFaceRule.h
596     DOMCSSImportRule.h
597     DOMCSSKeyframeRule.h
598     DOMCSSKeyframesRule.h
599     DOMCSSMediaRule.h
600     DOMCSSPageRule.h
601     DOMCSSPrimitiveValue.h
602     DOMCSSRule.h
603     DOMCSSRuleList.h
604     DOMCSSStyleDeclaration.h
605     DOMCSSStyleRule.h
606     DOMCSSStyleSheet.h
607     DOMCSSSupportsRule.h
608     DOMCSSUnknownRule.h
609     DOMCSSValue.h
610     DOMCSSValueList.h
611     DOMCharacterData.h
612     DOMComment.h
613     DOMCounter.h
614     DOMDOMImplementation.h
615     DOMDOMNamedFlowCollection.h
616     DOMDOMTokenList.h
617     DOMDocument.h
618     DOMDocumentFragment.h
619     DOMDocumentType.h
620     DOMElement.h
621     DOMEntity.h
622     DOMEntityReference.h
623     DOMEvent.h
624     DOMEventException.h
625     DOMEventListener.h
626     DOMEventTarget.h
627     DOMFile.h
628     DOMFileList.h
629     DOMHTMLAnchorElement.h
630     DOMHTMLAppletElement.h
631     DOMHTMLAreaElement.h
632     DOMHTMLBRElement.h
633     DOMHTMLBaseElement.h
634     DOMHTMLBaseFontElement.h
635     DOMHTMLBodyElement.h
636     DOMHTMLButtonElement.h
637     DOMHTMLCanvasElement.h
638     DOMHTMLCollection.h
639     DOMHTMLDListElement.h
640     DOMHTMLDirectoryElement.h
641     DOMHTMLDivElement.h
642     DOMHTMLDocument.h
643     DOMHTMLElement.h
644     DOMHTMLEmbedElement.h
645     DOMHTMLFieldSetElement.h
646     DOMHTMLFontElement.h
647     DOMHTMLFormElement.h
648     DOMHTMLFrameElement.h
649     DOMHTMLFrameSetElement.h
650     DOMHTMLHRElement.h
651     DOMHTMLHeadElement.h
652     DOMHTMLHeadingElement.h
653     DOMHTMLHtmlElement.h
654     DOMHTMLIFrameElement.h
655     DOMHTMLImageElement.h
656     DOMHTMLInputElement.h
657     DOMHTMLInputElementPrivate.h
658     DOMHTMLLIElement.h
659     DOMHTMLLabelElement.h
660     DOMHTMLLegendElement.h
661     DOMHTMLLinkElement.h
662     DOMHTMLMapElement.h
663     DOMHTMLMarqueeElement.h
664     DOMHTMLMediaElement.h
665     DOMHTMLMenuElement.h
666     DOMHTMLMetaElement.h
667     DOMHTMLModElement.h
668     DOMHTMLOListElement.h
669     DOMHTMLObjectElement.h
670     DOMHTMLOptGroupElement.h
671     DOMHTMLOptionElement.h
672     DOMHTMLOptionsCollection.h
673     DOMHTMLParagraphElement.h
674     DOMHTMLParamElement.h
675     DOMHTMLPreElement.h
676     DOMHTMLQuoteElement.h
677     DOMHTMLScriptElement.h
678     DOMHTMLSelectElement.h
679     DOMHTMLStyleElement.h
680     DOMHTMLTableCaptionElement.h
681     DOMHTMLTableCellElement.h
682     DOMHTMLTableColElement.h
683     DOMHTMLTableElement.h
684     DOMHTMLTableRowElement.h
685     DOMHTMLTableSectionElement.h
686     DOMHTMLTextAreaElement.h
687     DOMHTMLTitleElement.h
688     DOMHTMLUListElement.h
689     DOMHTMLVideoElement.h
690     DOMImplementation.h
691     DOMKeyboardEvent.h
692     DOMMediaError.h
693     DOMMediaList.h
694     DOMMessageEvent.h
695     DOMMessagePort.h
696     DOMMouseEvent.h
697     DOMMutationEvent.h
698     DOMNamedNodeMap.h
699     DOMNode.h
700     DOMNodeFilter.h
701     DOMNodeIterator.h
702     DOMNodeList.h
703     DOMOverflowEvent.h
704     DOMProcessingInstruction.h
705     DOMProgressEvent.h
706     DOMRGBColor.h
707     DOMRange.h
708     DOMRangeException.h
709     DOMRect.h
710     DOMStyleSheet.h
711     DOMStyleSheetList.h
712     DOMText.h
713     DOMTextEvent.h
714     DOMTimeRanges.h
715     DOMTreeWalker.h
716     DOMUIEvent.h
717     DOMValidityState.h
718     DOMWebKitCSSFilterValue.h
719     DOMWebKitCSSRegionRule.h
720     DOMWebKitCSSTransformValue.h
721     DOMWebKitNamedFlow.h
722     DOMWheelEvent.h
723     DOMXPathException.h
724     DOMXPathExpression.h
725     DOMXPathNSResolver.h
726     DOMXPathResult.h
727 )
728 foreach (_file ${ObjCForwardingHeaders})
729     file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/${_file} "#import <WebKitLegacy/${_file}>")
730 endforeach ()
731
732 list(APPEND WebKit_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS
733     --platform=macOS
734 )
735
736 # FIXME: These should not be necessary.
737 file(WRITE ${FORWARDING_HEADERS_DIR}/WebKit/WKImageCG.h "#import <WebKit/Shared/API/c/cg/WKImageCG.h>")
738
739 set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
740
741 set(WebKit_OUTPUT_NAME WebKit)
742
743 # XPC Services
744
745 function(WEBKIT_DEFINE_XPC_SERVICES)
746     set(WebKit_XPC_SERVICE_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/Versions/A/XPCServices)
747     WEBKIT_CREATE_SYMLINK(WebProcess ${WebKit_XPC_SERVICE_DIR} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/XPCServices)
748
749     function(WEBKIT_XPC_SERVICE _target _bundle_identifier _info_plist _executable_name)
750         set(_service_dir ${WebKit_XPC_SERVICE_DIR}/${_bundle_identifier}.xpc/Contents)
751         make_directory(${_service_dir}/MacOS)
752         make_directory(${_service_dir}/_CodeSignature)
753         make_directory(${_service_dir}/Resources)
754
755         # FIXME: These version strings don't match Xcode's.
756         set(BUNDLE_VERSION ${WEBKIT_VERSION})
757         set(SHORT_VERSION_STRING ${WEBKIT_VERSION_MAJOR})
758         set(BUNDLE_VERSION ${WEBKIT_VERSION})
759         set(EXECUTABLE_NAME ${_executable_name})
760         set(PRODUCT_BUNDLE_IDENTIFIER ${_bundle_identifier})
761         set(PRODUCT_NAME ${_bundle_identifier})
762         configure_file(${_info_plist} ${_service_dir}/Info.plist)
763
764         set_target_properties(${_target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${_service_dir}/MacOS")
765     endfunction()
766
767     WEBKIT_XPC_SERVICE(WebProcess
768         "com.apple.WebKit.WebContent"
769         ${WEBKIT_DIR}/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist
770         ${WebKit_WebProcess_OUTPUT_NAME})
771
772     WEBKIT_XPC_SERVICE(NetworkProcess
773         "com.apple.WebKit.Networking"
774         ${WEBKIT_DIR}/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist
775         ${WebKit_NetworkProcess_OUTPUT_NAME})
776
777     add_custom_target(WebContentProcessNib COMMAND
778         ibtool --compile ${WebKit_XPC_SERVICE_DIR}/com.apple.WebKit.WebContent.xpc/Contents/Resources/WebContentProcess.nib ${WEBKIT_DIR}/Resources/WebContentProcess.xib
779         VERBATIM)
780     add_dependencies(WebKit WebContentProcessNib)
781 endfunction()