Fix CMake build.
[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/BackForwardList.mm
212     mac/History/BinaryPropertyList.cpp
213     mac/History/HistoryPropertyList.mm
214     mac/History/WebBackForwardList.mm
215     mac/History/WebHistory.mm
216     mac/History/WebHistoryItem.mm
217     mac/History/WebURLsWithTitles.m
218
219     mac/Misc/WebCache.mm
220     mac/Misc/WebCoreStatistics.mm
221     mac/Misc/WebDownload.mm
222     mac/Misc/WebElementDictionary.mm
223     mac/Misc/WebIconDatabase.mm
224     mac/Misc/WebKitErrors.m
225     mac/Misc/WebKitLogging.m
226     mac/Misc/WebKitNSStringExtras.mm
227     mac/Misc/WebKitStatistics.m
228     mac/Misc/WebKitVersionChecks.m
229     mac/Misc/WebLocalizableStrings.mm
230     mac/Misc/WebLocalizableStringsInternal.mm
231     mac/Misc/WebNSControlExtras.m
232     mac/Misc/WebNSDataExtras.m
233     mac/Misc/WebNSDictionaryExtras.m
234     mac/Misc/WebNSEventExtras.m
235     mac/Misc/WebNSFileManagerExtras.mm
236     mac/Misc/WebNSImageExtras.m
237     mac/Misc/WebNSObjectExtras.mm
238     mac/Misc/WebNSPasteboardExtras.mm
239     mac/Misc/WebNSPrintOperationExtras.m
240     mac/Misc/WebNSURLExtras.mm
241     mac/Misc/WebNSURLRequestExtras.m
242     mac/Misc/WebNSUserDefaultsExtras.mm
243     mac/Misc/WebNSViewExtras.m
244     mac/Misc/WebNSWindowExtras.m
245     mac/Misc/WebSharingServicePickerController.mm
246     mac/Misc/WebStringTruncator.mm
247     mac/Misc/WebUserContentURLPattern.mm
248
249     mac/Panels/WebAuthenticationPanel.m
250     mac/Panels/WebPanelAuthenticationHandler.m
251
252     mac/Plugins/WebBaseNetscapePluginView.mm
253     mac/Plugins/WebBasePluginPackage.mm
254     mac/Plugins/WebNetscapePluginEventHandler.mm
255     mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
256     mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
257     mac/Plugins/WebNetscapePluginPackage.mm
258     mac/Plugins/WebNetscapePluginStream.mm
259     mac/Plugins/WebNetscapePluginView.mm
260     mac/Plugins/WebPluginContainerCheck.mm
261     mac/Plugins/WebPluginController.mm
262     mac/Plugins/WebPluginDatabase.mm
263     mac/Plugins/WebPluginPackage.mm
264     mac/Plugins/WebPluginRequest.m
265     mac/Plugins/npapi.mm
266
267     mac/Plugins/Hosted/HostedNetscapePluginStream.mm
268     mac/Plugins/Hosted/NetscapePluginHostManager.mm
269     mac/Plugins/Hosted/NetscapePluginHostProxy.mm
270     mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
271     mac/Plugins/Hosted/ProxyInstance.mm
272     mac/Plugins/Hosted/ProxyRuntimeObject.mm
273     mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
274     mac/Plugins/Hosted/WebKitPluginAgent.defs
275     mac/Plugins/Hosted/WebKitPluginAgentReply.defs
276     mac/Plugins/Hosted/WebKitPluginClient.defs
277     mac/Plugins/Hosted/WebKitPluginHost.defs
278     mac/Plugins/Hosted/WebKitPluginHostTypes.defs
279     mac/Plugins/Hosted/WebTextInputWindowController.m
280
281     mac/Storage/WebDatabaseManager.mm
282     mac/Storage/WebDatabaseManagerClient.mm
283     mac/Storage/WebDatabaseProvider.mm
284     mac/Storage/WebDatabaseQuotaManager.mm
285     mac/Storage/WebStorageManager.mm
286     mac/Storage/WebStorageTrackerClient.mm
287
288     mac/WebCoreSupport/CorrectionPanel.mm
289     mac/WebCoreSupport/PopupMenuMac.mm
290     mac/WebCoreSupport/SearchPopupMenuMac.mm
291     mac/WebCoreSupport/WebAlternativeTextClient.mm
292     mac/WebCoreSupport/WebApplicationCache.mm
293     mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
294     mac/WebCoreSupport/WebChromeClient.mm
295     mac/WebCoreSupport/WebContextMenuClient.mm
296     mac/WebCoreSupport/WebDeviceOrientationClient.mm
297     mac/WebCoreSupport/WebDragClient.mm
298     mac/WebCoreSupport/WebEditorClient.mm
299     mac/WebCoreSupport/WebFrameLoaderClient.mm
300     mac/WebCoreSupport/WebFrameNetworkingContext.mm
301     mac/WebCoreSupport/WebGeolocationClient.mm
302     mac/WebCoreSupport/WebIconDatabaseClient.mm
303     mac/WebCoreSupport/WebInspectorClient.mm
304     mac/WebCoreSupport/WebJavaScriptTextInputPanel.m
305     mac/WebCoreSupport/WebKitFullScreenListener.mm
306     mac/WebCoreSupport/WebNotificationClient.mm
307     mac/WebCoreSupport/WebOpenPanelResultListener.mm
308     mac/WebCoreSupport/WebPlatformStrategies.mm
309     mac/WebCoreSupport/WebPluginInfoProvider.mm
310     mac/WebCoreSupport/WebProgressTrackerClient.mm
311     mac/WebCoreSupport/WebSecurityOrigin.mm
312     mac/WebCoreSupport/WebSelectionServiceController.mm
313     mac/WebCoreSupport/WebSystemInterface.mm
314     mac/WebCoreSupport/WebUserMediaClient.mm
315     mac/WebCoreSupport/WebVisitedLinkStore.mm
316
317     mac/WebInspector/WebInspector.mm
318     mac/WebInspector/WebInspectorFrontend.mm
319     mac/WebInspector/WebNodeHighlight.mm
320     mac/WebInspector/WebNodeHighlightView.mm
321     mac/WebInspector/WebNodeHighlighter.mm
322
323     mac/WebView/WebArchive.mm
324     mac/WebView/WebClipView.mm
325     mac/WebView/WebDashboardRegion.mm
326     mac/WebView/WebDataSource.mm
327     mac/WebView/WebDelegateImplementationCaching.mm
328     mac/WebView/WebDeviceOrientation.mm
329     mac/WebView/WebDeviceOrientationProviderMock.mm
330     mac/WebView/WebDocumentLoaderMac.mm
331     mac/WebView/WebDynamicScrollBarsView.mm
332     mac/WebView/WebFormDelegate.m
333     mac/WebView/WebFrame.mm
334     mac/WebView/WebFrameView.mm
335     mac/WebView/WebFullScreenController.mm
336     mac/WebView/WebGeolocationPosition.mm
337     mac/WebView/WebHTMLRepresentation.mm
338     mac/WebView/WebHTMLView.mm
339     mac/WebView/WebImmediateActionController.mm
340     mac/WebView/WebIndicateLayer.mm
341     mac/WebView/WebJSPDFDoc.mm
342     mac/WebView/WebNavigationData.mm
343     mac/WebView/WebNotification.mm
344     mac/WebView/WebPDFDocumentExtras.mm
345     mac/WebView/WebPDFRepresentation.mm
346     mac/WebView/WebPDFView.mm
347     mac/WebView/WebPolicyDelegate.mm
348     mac/WebView/WebPreferences.mm
349     mac/WebView/WebResource.mm
350     mac/WebView/WebScriptDebugDelegate.mm
351     mac/WebView/WebScriptDebugger.mm
352     mac/WebView/WebScriptWorld.mm
353     mac/WebView/WebTextCompletionController.mm
354     mac/WebView/WebTextIterator.mm
355     mac/WebView/WebView.mm
356     mac/WebView/WebViewData.mm
357 )
358
359 set(WebKit_LIBRARY_TYPE SHARED)
360
361 set(WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES
362     mac/DOM
363     mac/DefaultDelegates
364     mac/History
365     mac/Misc
366     mac/Panels
367     mac/Plugins
368     mac/WebCoreSupport
369     mac/WebInspector
370     mac/WebView
371 )
372
373 set(WebKitLegacy_FORWARDING_HEADERS_FILES
374     mac/DOM/WebDOMOperations.h
375
376     mac/History/WebHistory.h
377     mac/History/WebHistoryItem.h
378
379     mac/Misc/WebNSURLExtras.h
380
381     mac/Panels/WebPanelAuthenticationHandler.h
382
383     mac/Plugins/WebBasePluginPackage.h
384
385     mac/WebCoreSupport/WebKeyGenerator.h
386
387     mac/WebInspector/WebInspector.h
388
389     mac/WebView/WebFrame.h
390     mac/WebView/WebView.h
391
392     ${WEBCORE_DIR}/plugins/npfunctions.h
393 )
394
395 add_definitions("-include WebKitPrefix.h")
396
397 set(C99_FILES
398     ${WEBKIT_DIR}/mac/Carbon/CarbonUtils.m
399     ${WEBKIT_DIR}/mac/Carbon/CarbonWindowContentView.m
400     ${WEBKIT_DIR}/mac/Carbon/CarbonWindowFrame.m
401     ${WEBKIT_DIR}/mac/Carbon/HIViewAdapter.m
402
403     mac/DefaultDelegates/WebDefaultEditingDelegate.m
404     mac/DefaultDelegates/WebDefaultPolicyDelegate.m
405     mac/DefaultDelegates/WebDefaultUIDelegate.m
406
407     mac/Misc/WebKitErrors.m
408     mac/Misc/WebKitLogging.m
409     mac/Misc/WebKitStatistics.m
410     mac/Misc/WebKitSystemBits.m
411     mac/Misc/WebKitVersionChecks.m
412     mac/Misc/WebNSArrayExtras.m
413     mac/Misc/WebNSControlExtras.m
414     mac/Misc/WebNSDataExtras.m
415     mac/Misc/WebNSDictionaryExtras.m
416     mac/Misc/WebNSEventExtras.m
417     mac/Misc/WebNSImageExtras.m
418     mac/Misc/WebNSPrintOperationExtras.m
419     mac/Misc/WebNSURLRequestExtras.m
420     mac/Misc/WebNSViewExtras.m
421     mac/Misc/WebNSWindowExtras.m
422
423     mac/Panels/WebAuthenticationPanel.m
424     mac/Panels/WebPanelAuthenticationHandler.m
425
426     mac/Plugins/WebPluginRequest.m
427     mac/Plugins/WebPluginsPrivate.m
428
429     mac/Plugins/Hosted/WebTextInputWindowController.m
430
431     mac/WebCoreSupport/WebJavaScriptTextInputPanel.m
432
433     mac/WebView/WebFormDelegate.m
434 )
435
436 foreach (_file ${WebKit_SOURCES})
437     list(FIND C99_FILES ${_file} _c99_index)
438     if (${_c99_index} EQUAL -1)
439         set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++14")
440     else ()
441         set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS -std=c99)
442     endif ()
443 endforeach ()
444
445 file(COPY
446     mac/Plugins/Hosted/WebKitPluginAgent.defs
447     mac/Plugins/Hosted/WebKitPluginAgentReply.defs
448     mac/Plugins/Hosted/WebKitPluginClient.defs
449     mac/Plugins/Hosted/WebKitPluginHost.defs
450     mac/Plugins/Hosted/WebKitPluginHostTypes.defs
451     mac/Plugins/Hosted/WebKitPluginHostTypes.h
452 DESTINATION ${DERIVED_SOURCES_WEBKITLEGACY_DIR})
453
454 add_custom_command(
455     OUTPUT
456         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentReplyServer.c
457         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentReplyUser.c
458         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentServer.c
459         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentUser.c
460         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostServer.c
461         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostUser.c
462     MAIN_DEPENDENCY mac/Plugins/Hosted/WebKitPluginAgent.defs
463     WORKING_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
464     COMMAND mig -I.. WebKitPluginAgent.defs WebKitPluginAgentReply.defs WebKitPluginHost.defs
465     VERBATIM)
466 add_custom_command(
467     OUTPUT
468         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientServer.c
469         ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientUser.c
470     MAIN_DEPENDENCY mac/Plugins/Hosted/WebKitPluginAgent.defs
471     WORKING_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
472     COMMAND mig -I.. -sheader WebKitPluginClientServer.h WebKitPluginClient.defs
473     VERBATIM)
474 list(APPEND WebKit_SOURCES
475     ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentUser.c
476     ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientServer.c
477     ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostUser.c
478 )
479
480 WEBKIT_CREATE_FORWARDING_HEADERS(WebKitLegacy DIRECTORIES ${WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES} FILES ${WebKitLegacy_FORWARDING_HEADERS_FILES})
481 WEBKIT_CREATE_FORWARDING_HEADERS(WebKit DIRECTORIES ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKitLegacy)
482
483 # FIXME: Forwarding headers should be copies of actual headers.
484 file(GLOB ObjCHeaders ${WEBCORE_DIR}/plugins/*.h)
485 list(APPEND ObjCHeaders
486     WebKitAvailability.h
487     WebScriptObject.h
488 )
489 foreach (_file ${ObjCHeaders})
490     get_filename_component(_name ${_file} NAME)
491     if (NOT EXISTS ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKitLegacy/${_name})
492         file(WRITE ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKitLegacy/${_name} "#import <WebCore/${_name}>")
493     endif ()
494 endforeach ()
495
496 set(WebKit_OUTPUT_NAME WebKitLegacy)
497
498 set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")