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