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