Fix Mac CMake build after r204717.
[WebKit-https.git] / Source / WebKit / PlatformMac.cmake
1 find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
2 find_library(QUARTZ_LIBRARY Quartz)
3 add_definitions(-iframework ${QUARTZ_LIBRARY}/Frameworks)
4 add_definitions(-iframework ${APPLICATIONSERVICES_LIBRARY}/Versions/Current/Frameworks)
5 link_directories(../../WebKitLibraries)
6
7 list(APPEND WebKit_INCLUDE_DIRECTORIES
8     "${DERIVED_SOURCES_DIR}"
9     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
10     "${DERIVED_SOURCES_WEBCORE_DIR}"
11     "${DERIVED_SOURCES_WEBKITLEGACY_DIR}"
12     "${JAVASCRIPTCORE_DIR}"
13     "${JAVASCRIPTCORE_DIR}/dfg"
14     "${WEBCORE_DIR}/accessibility/mac"
15     "${WEBCORE_DIR}/bridge"
16     "${WEBCORE_DIR}/bridge/jsc"
17     "${WEBCORE_DIR}/bridge/objc"
18     "${WEBCORE_DIR}/ForwardingHeaders/inspector"
19     "${WEBCORE_DIR}/html/track"
20     "${WEBCORE_DIR}/loader/archive/cf"
21     "${WEBCORE_DIR}/loader/cf"
22     "${WEBCORE_DIR}/loader/mac"
23     "${WEBCORE_DIR}/page/cocoa"
24     "${WEBCORE_DIR}/page/mac"
25     "${WEBCORE_DIR}/platform"
26     "${WEBCORE_DIR}/platform/cf"
27     "${WEBCORE_DIR}/platform/cocoa"
28     "${WEBCORE_DIR}/platform/graphics/avfoundation"
29     "${WEBCORE_DIR}/platform/graphics/avfoundation/cf"
30     "${WEBCORE_DIR}/platform/graphics/avfoundation/objc"
31     "${WEBCORE_DIR}/platform/graphics/ca"
32     "${WEBCORE_DIR}/platform/graphics/ca/mac"
33     "${WEBCORE_DIR}/platform/graphics/cocoa"
34     "${WEBCORE_DIR}/platform/graphics/cg"
35     "${WEBCORE_DIR}/platform/graphics/opentype"
36     "${WEBCORE_DIR}/platform/graphics/mac"
37     "${WEBCORE_DIR}/platform/mac"
38     "${WEBCORE_DIR}/platform/network/cocoa"
39     "${WEBCORE_DIR}/platform/network/cf"
40     "${WEBCORE_DIR}/platform/network/mac"
41     "${WEBCORE_DIR}/platform/text/cf"
42     "${WEBCORE_DIR}/platform/text/mac"
43     "${WEBCORE_DIR}/plugins/mac"
44     "${WEBCORE_DIR}/rendering/shapes"
45     "${WTF_DIR}"
46     ../../WebKitLibraries
47 )
48
49 list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
50     mac
51     mac/Carbon
52     mac/DefaultDelegates
53     mac/DOM
54     mac/History
55     mac/icu
56     mac/Misc
57     mac/Panels
58     mac/Plugins
59     mac/Plugins/Hosted
60     mac/Storage
61     mac/WebCoreSupport
62     mac/WebInspector
63     mac/WebView
64 )
65
66 list(APPEND WebKit_SOURCES
67     cf/WebCoreSupport/WebInspectorClientCF.cpp
68
69     mac/Carbon/CarbonUtils.m
70     mac/Carbon/CarbonWindowAdapter.mm
71     mac/Carbon/CarbonWindowContentView.m
72     mac/Carbon/CarbonWindowFrame.m
73     mac/Carbon/HIViewAdapter.m
74     mac/Carbon/HIWebView.mm
75
76     mac/DOM/DOM.mm
77     mac/DOM/DOMAbstractView.mm
78     mac/DOM/DOMAttr.mm
79     mac/DOM/DOMBlob.mm
80     mac/DOM/DOMCDATASection.mm
81     mac/DOM/DOMCharacterData.mm
82     mac/DOM/DOMComment.mm
83     mac/DOM/DOMCounter.mm
84     mac/DOM/DOMCSS.mm
85     mac/DOM/DOMCSSCharsetRule.mm
86     mac/DOM/DOMCSSFontFaceRule.mm
87     mac/DOM/DOMCSSImportRule.mm
88     mac/DOM/DOMCSSMediaRule.mm
89     mac/DOM/DOMCSSPageRule.mm
90     mac/DOM/DOMCSSPrimitiveValue.mm
91     mac/DOM/DOMCSSRule.mm
92     mac/DOM/DOMCSSRuleList.mm
93     mac/DOM/DOMCSSStyleDeclaration.mm
94     mac/DOM/DOMCSSStyleRule.mm
95     mac/DOM/DOMCSSStyleSheet.mm
96     mac/DOM/DOMCSSUnknownRule.mm
97     mac/DOM/DOMCSSValue.mm
98     mac/DOM/DOMCSSValueList.mm
99     mac/DOM/DOMCustomXPathNSResolver.mm
100     mac/DOM/DOMDOMImplementation.mm
101     mac/DOM/DOMDOMTokenList.mm
102     mac/DOM/DOMDocument.mm
103     mac/DOM/DOMDocumentFragment.mm
104     mac/DOM/DOMDocumentType.mm
105     mac/DOM/DOMElement.mm
106     mac/DOM/DOMEntityReference.mm
107     mac/DOM/DOMEvent.mm
108     mac/DOM/DOMEvents.mm
109     mac/DOM/DOMFile.mm
110     mac/DOM/DOMFileList.mm
111     mac/DOM/DOMHTML.mm
112     mac/DOM/DOMHTMLAnchorElement.mm
113     mac/DOM/DOMHTMLAppletElement.mm
114     mac/DOM/DOMHTMLAreaElement.mm
115     mac/DOM/DOMHTMLBRElement.mm
116     mac/DOM/DOMHTMLBaseElement.mm
117     mac/DOM/DOMHTMLBaseFontElement.mm
118     mac/DOM/DOMHTMLBodyElement.mm
119     mac/DOM/DOMHTMLButtonElement.mm
120     mac/DOM/DOMHTMLCanvasElement.mm
121     mac/DOM/DOMHTMLCollection.mm
122     mac/DOM/DOMHTMLDListElement.mm
123     mac/DOM/DOMHTMLDirectoryElement.mm
124     mac/DOM/DOMHTMLDivElement.mm
125     mac/DOM/DOMHTMLDocument.mm
126     mac/DOM/DOMHTMLElement.mm
127     mac/DOM/DOMHTMLEmbedElement.mm
128     mac/DOM/DOMHTMLFieldSetElement.mm
129     mac/DOM/DOMHTMLFontElement.mm
130     mac/DOM/DOMHTMLFormElement.mm
131     mac/DOM/DOMHTMLFrameElement.mm
132     mac/DOM/DOMHTMLFrameSetElement.mm
133     mac/DOM/DOMHTMLHRElement.mm
134     mac/DOM/DOMHTMLHeadElement.mm
135     mac/DOM/DOMHTMLHeadingElement.mm
136     mac/DOM/DOMHTMLHtmlElement.mm
137     mac/DOM/DOMHTMLIFrameElement.mm
138     mac/DOM/DOMHTMLImageElement.mm
139     mac/DOM/DOMHTMLInputElement.mm
140     mac/DOM/DOMHTMLLIElement.mm
141     mac/DOM/DOMHTMLLabelElement.mm
142     mac/DOM/DOMHTMLLegendElement.mm
143     mac/DOM/DOMHTMLLinkElement.mm
144     mac/DOM/DOMHTMLMapElement.mm
145     mac/DOM/DOMHTMLMarqueeElement.mm
146     mac/DOM/DOMHTMLMediaElement.mm
147     mac/DOM/DOMHTMLMenuElement.mm
148     mac/DOM/DOMHTMLMetaElement.mm
149     mac/DOM/DOMHTMLModElement.mm
150     mac/DOM/DOMHTMLOListElement.mm
151     mac/DOM/DOMHTMLObjectElement.mm
152     mac/DOM/DOMHTMLOptGroupElement.mm
153     mac/DOM/DOMHTMLOptionElement.mm
154     mac/DOM/DOMHTMLOptionsCollection.mm
155     mac/DOM/DOMHTMLParagraphElement.mm
156     mac/DOM/DOMHTMLParamElement.mm
157     mac/DOM/DOMHTMLPreElement.mm
158     mac/DOM/DOMHTMLQuoteElement.mm
159     mac/DOM/DOMHTMLScriptElement.mm
160     mac/DOM/DOMHTMLSelectElement.mm
161     mac/DOM/DOMHTMLStyleElement.mm
162     mac/DOM/DOMHTMLTableCaptionElement.mm
163     mac/DOM/DOMHTMLTableCellElement.mm
164     mac/DOM/DOMHTMLTableColElement.mm
165     mac/DOM/DOMHTMLTableElement.mm
166     mac/DOM/DOMHTMLTableRowElement.mm
167     mac/DOM/DOMHTMLTableSectionElement.mm
168     mac/DOM/DOMHTMLTextAreaElement.mm
169     mac/DOM/DOMHTMLTitleElement.mm
170     mac/DOM/DOMHTMLUListElement.mm
171     mac/DOM/DOMHTMLVideoElement.mm
172     mac/DOM/DOMInternal.mm
173     mac/DOM/DOMKeyboardEvent.mm
174     mac/DOM/DOMMediaError.mm
175     mac/DOM/DOMMediaList.mm
176     mac/DOM/DOMMouseEvent.mm
177     mac/DOM/DOMMutationEvent.mm
178     mac/DOM/DOMNamedNodeMap.mm
179     mac/DOM/DOMNode.mm
180     mac/DOM/DOMNodeIterator.mm
181     mac/DOM/DOMNodeList.mm
182     mac/DOM/DOMObject.mm
183     mac/DOM/DOMOverflowEvent.mm
184     mac/DOM/DOMProcessingInstruction.mm
185     mac/DOM/DOMProgressEvent.mm
186     mac/DOM/DOMRGBColor.mm
187     mac/DOM/DOMRange.mm
188     mac/DOM/DOMRect.mm
189     mac/DOM/DOMStyleSheet.mm
190     mac/DOM/DOMStyleSheetList.mm
191     mac/DOM/DOMText.mm
192     mac/DOM/DOMTextEvent.mm
193     mac/DOM/DOMTimeRanges.mm
194     mac/DOM/DOMTreeWalker.mm
195     mac/DOM/DOMUIEvent.mm
196     mac/DOM/DOMUIKitExtensions.mm
197     mac/DOM/DOMUtility.mm
198     mac/DOM/DOMWheelEvent.mm
199     mac/DOM/DOMXPath.mm
200     mac/DOM/DOMXPathExpression.mm
201     mac/DOM/DOMXPathResult.mm
202     mac/DOM/ExceptionHandlers.mm
203     mac/DOM/ObjCEventListener.mm
204     mac/DOM/ObjCNodeFilterCondition.mm
205
206     mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm
207     mac/DefaultDelegates/WebDefaultEditingDelegate.m
208     mac/DefaultDelegates/WebDefaultPolicyDelegate.m
209     mac/DefaultDelegates/WebDefaultUIDelegate.m
210
211     mac/History/BinaryPropertyList.cpp
212     mac/History/HistoryPropertyList.mm
213     mac/History/WebBackForwardList.mm
214     mac/History/WebHistory.mm
215     mac/History/WebHistoryItem.mm
216     mac/History/WebURLsWithTitles.m
217
218     mac/Misc/WebCache.mm
219     mac/Misc/WebCoreStatistics.mm
220     mac/Misc/WebDownload.mm
221     mac/Misc/WebElementDictionary.mm
222     mac/Misc/WebIconDatabase.mm
223     mac/Misc/WebKitErrors.m
224     mac/Misc/WebKitLogging.m
225     mac/Misc/WebKitNSStringExtras.mm
226     mac/Misc/WebKitStatistics.m
227     mac/Misc/WebKitVersionChecks.m
228     mac/Misc/WebLocalizableStrings.mm
229     mac/Misc/WebLocalizableStringsInternal.mm
230     mac/Misc/WebNSControlExtras.m
231     mac/Misc/WebNSDataExtras.m
232     mac/Misc/WebNSDictionaryExtras.m
233     mac/Misc/WebNSEventExtras.m
234     mac/Misc/WebNSFileManagerExtras.mm
235     mac/Misc/WebNSImageExtras.m
236     mac/Misc/WebNSObjectExtras.mm
237     mac/Misc/WebNSPasteboardExtras.mm
238     mac/Misc/WebNSPrintOperationExtras.m
239     mac/Misc/WebNSURLExtras.mm
240     mac/Misc/WebNSURLRequestExtras.m
241     mac/Misc/WebNSUserDefaultsExtras.mm
242     mac/Misc/WebNSViewExtras.m
243     mac/Misc/WebNSWindowExtras.m
244     mac/Misc/WebSharingServicePickerController.mm
245     mac/Misc/WebStringTruncator.mm
246     mac/Misc/WebUserContentURLPattern.mm
247
248     mac/Panels/WebAuthenticationPanel.m
249     mac/Panels/WebPanelAuthenticationHandler.m
250
251     mac/Plugins/WebBaseNetscapePluginView.mm
252     mac/Plugins/WebBasePluginPackage.mm
253     mac/Plugins/WebNetscapePluginEventHandler.mm
254     mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
255     mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
256     mac/Plugins/WebNetscapePluginPackage.mm
257     mac/Plugins/WebNetscapePluginStream.mm
258     mac/Plugins/WebNetscapePluginView.mm
259     mac/Plugins/WebPluginContainerCheck.mm
260     mac/Plugins/WebPluginController.mm
261     mac/Plugins/WebPluginDatabase.mm
262     mac/Plugins/WebPluginPackage.mm
263     mac/Plugins/WebPluginRequest.m
264     mac/Plugins/npapi.mm
265
266     mac/Plugins/Hosted/HostedNetscapePluginStream.mm
267     mac/Plugins/Hosted/NetscapePluginHostManager.mm
268     mac/Plugins/Hosted/NetscapePluginHostProxy.mm
269     mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
270     mac/Plugins/Hosted/ProxyInstance.mm
271     mac/Plugins/Hosted/ProxyRuntimeObject.mm
272     mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
273     mac/Plugins/Hosted/WebKitPluginAgent.defs
274     mac/Plugins/Hosted/WebKitPluginAgentReply.defs
275     mac/Plugins/Hosted/WebKitPluginClient.defs
276     mac/Plugins/Hosted/WebKitPluginHost.defs
277     mac/Plugins/Hosted/WebKitPluginHostTypes.defs
278     mac/Plugins/Hosted/WebTextInputWindowController.m
279
280     mac/Storage/WebDatabaseManager.mm
281     mac/Storage/WebDatabaseManagerClient.mm
282     mac/Storage/WebDatabaseProvider.mm
283     mac/Storage/WebDatabaseQuotaManager.mm
284     mac/Storage/WebStorageManager.mm
285     mac/Storage/WebStorageTrackerClient.mm
286
287     mac/WebCoreSupport/CorrectionPanel.mm
288     mac/WebCoreSupport/PopupMenuMac.mm
289     mac/WebCoreSupport/SearchPopupMenuMac.mm
290     mac/WebCoreSupport/WebAlternativeTextClient.mm
291     mac/WebCoreSupport/WebApplicationCache.mm
292     mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
293     mac/WebCoreSupport/WebChromeClient.mm
294     mac/WebCoreSupport/WebContextMenuClient.mm
295     mac/WebCoreSupport/WebDeviceOrientationClient.mm
296     mac/WebCoreSupport/WebDragClient.mm
297     mac/WebCoreSupport/WebEditorClient.mm
298     mac/WebCoreSupport/WebFrameLoaderClient.mm
299     mac/WebCoreSupport/WebFrameNetworkingContext.mm
300     mac/WebCoreSupport/WebGeolocationClient.mm
301     mac/WebCoreSupport/WebIconDatabaseClient.mm
302     mac/WebCoreSupport/WebInspectorClient.mm
303     mac/WebCoreSupport/WebJavaScriptTextInputPanel.m
304     mac/WebCoreSupport/WebKitFullScreenListener.mm
305     mac/WebCoreSupport/WebNotificationClient.mm
306     mac/WebCoreSupport/WebOpenPanelResultListener.mm
307     mac/WebCoreSupport/WebPlatformStrategies.mm
308     mac/WebCoreSupport/WebPluginInfoProvider.mm
309     mac/WebCoreSupport/WebProgressTrackerClient.mm
310     mac/WebCoreSupport/WebSecurityOrigin.mm
311     mac/WebCoreSupport/WebSelectionServiceController.mm
312     mac/WebCoreSupport/WebSystemInterface.mm
313     mac/WebCoreSupport/WebUserMediaClient.mm
314     mac/WebCoreSupport/WebVisitedLinkStore.mm
315
316     mac/WebInspector/WebInspector.mm
317     mac/WebInspector/WebInspectorFrontend.mm
318     mac/WebInspector/WebNodeHighlight.mm
319     mac/WebInspector/WebNodeHighlightView.mm
320     mac/WebInspector/WebNodeHighlighter.mm
321
322     mac/WebView/WebArchive.mm
323     mac/WebView/WebClipView.mm
324     mac/WebView/WebDashboardRegion.mm
325     mac/WebView/WebDataSource.mm
326     mac/WebView/WebDelegateImplementationCaching.mm
327     mac/WebView/WebDeviceOrientation.mm
328     mac/WebView/WebDeviceOrientationProviderMock.mm
329     mac/WebView/WebDocumentLoaderMac.mm
330     mac/WebView/WebDynamicScrollBarsView.mm
331     mac/WebView/WebFormDelegate.m
332     mac/WebView/WebFrame.mm
333     mac/WebView/WebFrameView.mm
334     mac/WebView/WebFullScreenController.mm
335     mac/WebView/WebGeolocationPosition.mm
336     mac/WebView/WebHTMLRepresentation.mm
337     mac/WebView/WebHTMLView.mm
338     mac/WebView/WebImmediateActionController.mm
339     mac/WebView/WebIndicateLayer.mm
340     mac/WebView/WebJSPDFDoc.mm
341     mac/WebView/WebNavigationData.mm
342     mac/WebView/WebNotification.mm
343     mac/WebView/WebPDFDocumentExtras.mm
344     mac/WebView/WebPDFRepresentation.mm
345     mac/WebView/WebPDFView.mm
346     mac/WebView/WebPolicyDelegate.mm
347     mac/WebView/WebPreferences.mm
348     mac/WebView/WebResource.mm
349     mac/WebView/WebScriptDebugDelegate.mm
350     mac/WebView/WebScriptDebugger.mm
351     mac/WebView/WebScriptWorld.mm
352     mac/WebView/WebTextCompletionController.mm
353     mac/WebView/WebTextIterator.mm
354     mac/WebView/WebView.mm
355     mac/WebView/WebViewData.mm
356 )
357
358 set(WebKit_LIBRARY_TYPE SHARED)
359
360 set(WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES
361     mac/DOM
362     mac/DefaultDelegates
363     mac/History
364     mac/Misc
365     mac/Panels
366     mac/Plugins
367     mac/WebCoreSupport
368     mac/WebInspector
369     mac/WebView
370 )
371
372 set(WebKitLegacy_FORWARDING_HEADERS_FILES
373     mac/DOM/WebDOMOperations.h
374
375     mac/History/WebHistory.h
376     mac/History/WebHistoryItem.h
377
378     mac/Misc/WebNSURLExtras.h
379
380     mac/Panels/WebPanelAuthenticationHandler.h
381
382     mac/Plugins/WebBasePluginPackage.h
383
384     mac/WebCoreSupport/WebKeyGenerator.h
385
386     mac/WebInspector/WebInspector.h
387
388     mac/WebView/WebFrame.h
389     mac/WebView/WebView.h
390
391     ${WEBCORE_DIR}/plugins/npfunctions.h
392 )
393
394 add_definitions("-include WebKitPrefix.h")
395
396 set(C99_FILES
397     ${WEBKIT_DIR}/mac/Carbon/CarbonUtils.m
398     ${WEBKIT_DIR}/mac/Carbon/CarbonWindowContentView.m
399     ${WEBKIT_DIR}/mac/Carbon/CarbonWindowFrame.m
400     ${WEBKIT_DIR}/mac/Carbon/HIViewAdapter.m
401
402     mac/DefaultDelegates/WebDefaultEditingDelegate.m
403     mac/DefaultDelegates/WebDefaultPolicyDelegate.m
404     mac/DefaultDelegates/WebDefaultUIDelegate.m
405
406     mac/Misc/WebKitErrors.m
407     mac/Misc/WebKitLogging.m
408     mac/Misc/WebKitStatistics.m
409     mac/Misc/WebKitSystemBits.m
410     mac/Misc/WebKitVersionChecks.m
411     mac/Misc/WebNSArrayExtras.m
412     mac/Misc/WebNSControlExtras.m
413     mac/Misc/WebNSDataExtras.m
414     mac/Misc/WebNSDictionaryExtras.m
415     mac/Misc/WebNSEventExtras.m
416     mac/Misc/WebNSImageExtras.m
417     mac/Misc/WebNSPrintOperationExtras.m
418     mac/Misc/WebNSURLRequestExtras.m
419     mac/Misc/WebNSViewExtras.m
420     mac/Misc/WebNSWindowExtras.m
421
422     mac/Panels/WebAuthenticationPanel.m
423     mac/Panels/WebPanelAuthenticationHandler.m
424
425     mac/Plugins/WebPluginRequest.m
426     mac/Plugins/WebPluginsPrivate.m
427
428     mac/Plugins/Hosted/WebTextInputWindowController.m
429
430     mac/WebCoreSupport/WebJavaScriptTextInputPanel.m
431
432     mac/WebView/WebFormDelegate.m
433 )
434
435 foreach (_file ${WebKit_SOURCES})
436     list(FIND C99_FILES ${_file} _c99_index)
437     if (${_c99_index} EQUAL -1)
438         set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++14")
439     else ()
440         set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS -std=c99)
441     endif ()
442 endforeach ()
443
444 file(COPY
445     mac/Plugins/Hosted/WebKitPluginAgent.defs
446     mac/Plugins/Hosted/WebKitPluginAgentReply.defs
447     mac/Plugins/Hosted/WebKitPluginClient.defs
448     mac/Plugins/Hosted/WebKitPluginHost.defs
449     mac/Plugins/Hosted/WebKitPluginHostTypes.defs
450     mac/Plugins/Hosted/WebKitPluginHostTypes.h
451 DESTINATION ${DERIVED_SOURCES_WEBKITLEGACY_DIR})
452
453 add_custom_command(
454     OUTPUT
455         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentReplyServer.c
456         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentReplyUser.c
457         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentServer.c
458         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentUser.c
459         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostServer.c
460         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostUser.c
461     MAIN_DEPENDENCY mac/Plugins/Hosted/WebKitPluginAgent.defs
462     WORKING_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
463     COMMAND mig -I.. WebKitPluginAgent.defs WebKitPluginAgentReply.defs WebKitPluginHost.defs
464     VERBATIM)
465 add_custom_command(
466     OUTPUT
467         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientServer.c
468         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientUser.c
469     MAIN_DEPENDENCY mac/Plugins/Hosted/WebKitPluginAgent.defs
470     WORKING_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
471     COMMAND mig -I.. -sheader WebKitPluginClientServer.h WebKitPluginClient.defs
472     VERBATIM)
473 list(APPEND WebKit_SOURCES
474     ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentUser.c
475     ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientServer.c
476     ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostUser.c
477 )
478
479 WEBKIT_CREATE_FORWARDING_HEADERS(WebKitLegacy DIRECTORIES ${WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES} FILES ${WebKitLegacy_FORWARDING_HEADERS_FILES})
480 WEBKIT_CREATE_FORWARDING_HEADERS(WebKit DIRECTORIES ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKitLegacy)
481
482 # FIXME: Forwarding headers should be copies of actual headers.
483 file(GLOB ObjCHeaders ${WEBCORE_DIR}/plugins/*.h)
484 list(APPEND ObjCHeaders
485     WebKitAvailiability.h
486     WebScriptObject.h
487 )
488 foreach (_file ${ObjCHeaders})
489     get_filename_component(_name ${_file} NAME)
490     if (NOT EXISTS ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKitLegacy/${_name})
491         file(WRITE ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKitLegacy/${_name} "#import <WebCore/${_name}>")
492     endif ()
493 endforeach ()
494
495 set(WebKit_OUTPUT_NAME WebKitLegacy)
496
497 set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")