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