Progress towards CMake on Mac.
[WebKit-https.git] / Source / WebKit / PlatformMac.cmake
1 find_library(ACCELERATE_LIBRARY accelerate)
2 find_library(AUDIOUNIT_LIBRARY AudioUnit)
3 find_library(CARBON_LIBRARY Carbon)
4 find_library(COCOA_LIBRARY Cocoa)
5 find_library(DISKARBITRATION_LIBRARY DiskArbitration)
6 find_library(IOKIT_LIBRARY IOKit)
7 find_library(OPENGL_LIBRARY OpenGL)
8 find_library(QUARTZCORE_LIBRARY QuartzCore)
9 find_library(SQLITE3_LIBRARY sqlite3)
10 find_library(XML2_LIBRARY XML2)
11 find_package(ZLIB REQUIRED)
12
13 if ("${CURRENT_OSX_VERSION}" MATCHES "10.9")
14 set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceMavericks.a)
15 else ()
16 set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceYosemite.a)
17 endif ()
18 link_directories(../../WebKitLibraries)
19
20 list(APPEND WebKit_LIBRARIES
21     ${ACCELERATE_LIBRARY}
22     ${AUDIOUNIT_LIBRARY}
23     ${CARBON_LIBRARY}
24     ${COCOA_LIBRARY}
25     ${DISKARBITRATION_LIBRARY}
26     ${IOKIT_LIBRARY}
27     ${OPENGL_LIBRARY}
28     ${QUARTZCORE_LIBRARY}
29     ${SQLITE3_LIBRARY}
30     ${WEBKITSYSTEMINTERFACE_LIBRARY}
31     ${XML2_LIBRARY}
32 )
33
34 list(APPEND WebKit_INCLUDE_DIRECTORIES
35     "${JAVASCRIPTCORE_DIR}/dfg"
36     "${WEBCORE_DIR}/accessibility/mac"
37     "${WEBCORE_DIR}/bindings/objc"
38     "${WEBCORE_DIR}/bridge"
39     "${WEBCORE_DIR}/bridge/jsc"
40     "${WEBCORE_DIR}/bridge/objc"
41     "${WEBCORE_DIR}/loader/archive/cf"
42     "${WEBCORE_DIR}/loader/cf"
43     "${WEBCORE_DIR}/loader/mac"
44     "${WEBCORE_DIR}/page/cocoa"
45     "${WEBCORE_DIR}/page/mac"
46     "${WEBCORE_DIR}/platform/cf"
47     "${WEBCORE_DIR}/platform/cocoa"
48     "${WEBCORE_DIR}/platform/graphics/avfoundation"
49     "${WEBCORE_DIR}/platform/graphics/avfoundation/cf"
50     "${WEBCORE_DIR}/platform/graphics/avfoundation/objc"
51     "${WEBCORE_DIR}/platform/graphics/ca"
52     "${WEBCORE_DIR}/platform/graphics/ca/mac"
53     "${WEBCORE_DIR}/platform/graphics/cocoa"
54     "${WEBCORE_DIR}/platform/graphics/cg"
55     "${WEBCORE_DIR}/platform/graphics/opentype"
56     "${WEBCORE_DIR}/platform/graphics/mac"
57     "${WEBCORE_DIR}/platform/mac"
58     "${WEBCORE_DIR}/platform/network/cocoa"
59     "${WEBCORE_DIR}/platform/network/cf"
60     "${WEBCORE_DIR}/platform/network/mac"
61     "${WEBCORE_DIR}/platform/text/cf"
62     "${WEBCORE_DIR}/platform/text/mac"
63     "${WEBCORE_DIR}/plugins/mac"
64
65     mac
66     mac/Carbon
67     mac/DefaultDelegates
68     mac/DOM
69     mac/History
70     mac/icu/unicode
71     mac/Misc
72     mac/Panels
73     mac/Plugins
74     mac/Plugins/Hosted
75     mac/Storage
76     mac/WebCoreSupport
77     mac/WebInspector
78     mac/WebView
79     Storage
80 )
81
82 list(APPEND WebKit_SOURCES
83     mac/Carbon/CarbonUtils.m
84     mac/Carbon/CarbonWindowAdapter.mm
85     mac/Carbon/CarbonWindowContentView.m
86     mac/Carbon/CarbonWindowFrame.m
87     mac/Carbon/HIViewAdapter.m
88     mac/Carbon/HIWebView.mm
89
90     mac/History/BinaryPropertyList.cpp
91     mac/History/HistoryPropertyList.mm
92     mac/History/WebBackForwardList.mm
93     mac/History/WebHistory.mm
94     mac/History/WebHistoryItem.mm
95     mac/History/WebURLsWithTitles.m
96
97     mac/Misc/OldWebAssertions.c
98     mac/Misc/WebCache.mm
99     mac/Misc/WebCoreStatistics.mm
100     mac/Misc/WebDownload.mm
101     mac/Misc/WebElementDictionary.mm
102     mac/Misc/WebIconDatabase.mm
103     mac/Misc/WebKitErrors.m
104     mac/Misc/WebKitLogging.m
105     mac/Misc/WebKitNSStringExtras.mm
106     mac/Misc/WebKitStatistics.m
107     mac/Misc/WebKitSystemBits.m
108     mac/Misc/WebKitVersionChecks.m
109     mac/Misc/WebLocalizableStrings.mm
110     mac/Misc/WebLocalizableStringsInternal.mm
111     mac/Misc/WebNSArrayExtras.m
112     mac/Misc/WebNSControlExtras.m
113     mac/Misc/WebNSDataExtras.m
114     mac/Misc/WebNSDictionaryExtras.m
115     mac/Misc/WebNSEventExtras.m
116     mac/Misc/WebNSFileManagerExtras.mm
117     mac/Misc/WebNSImageExtras.m
118     mac/Misc/WebNSObjectExtras.mm
119     mac/Misc/WebNSPasteboardExtras.mm
120     mac/Misc/WebNSPrintOperationExtras.m
121     mac/Misc/WebNSURLExtras.mm
122     mac/Misc/WebNSURLRequestExtras.m
123     mac/Misc/WebNSUserDefaultsExtras.mm
124     mac/Misc/WebNSViewExtras.m
125     mac/Misc/WebNSWindowExtras.m
126     mac/Misc/WebSharingServicePickerController.mm
127     mac/Misc/WebStringTruncator.mm
128     mac/Misc/WebUserContentURLPattern.mm
129
130     mac/Panels/WebAuthenticationPanel.m
131     mac/Panels/WebPanelAuthenticationHandler.m
132
133     mac/Plugins/WebBaseNetscapePluginView.mm
134     mac/Plugins/WebBasePluginPackage.mm
135     mac/Plugins/WebNetscapeContainerCheckContextInfo.mm
136     mac/Plugins/WebNetscapeContainerCheckPrivate.mm
137     mac/Plugins/WebNetscapePluginEventHandler.mm
138     mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
139     mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
140     mac/Plugins/WebNetscapePluginPackage.mm
141     mac/Plugins/WebNetscapePluginStream.mm
142     mac/Plugins/WebNetscapePluginView.mm
143     mac/Plugins/WebPluginContainerCheck.mm
144     mac/Plugins/WebPluginController.mm
145     mac/Plugins/WebPluginDatabase.mm
146     mac/Plugins/WebPluginPackage.mm
147     mac/Plugins/WebPluginRequest.m
148     mac/Plugins/WebPluginsPrivate.m
149     mac/Plugins/npapi.mm
150
151     mac/Plugins/Hosted/HostedNetscapePluginStream.mm
152     mac/Plugins/Hosted/NetscapePluginHostManager.mm
153     mac/Plugins/Hosted/NetscapePluginHostProxy.mm
154     mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
155     mac/Plugins/Hosted/ProxyInstance.mm
156     mac/Plugins/Hosted/ProxyRuntimeObject.mm
157     mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
158     mac/Plugins/Hosted/WebKitPluginAgent.defs
159     mac/Plugins/Hosted/WebKitPluginAgentReply.defs
160     mac/Plugins/Hosted/WebKitPluginClient.defs
161     mac/Plugins/Hosted/WebKitPluginHost.defs
162     mac/Plugins/Hosted/WebKitPluginHostTypes.defs
163     mac/Plugins/Hosted/WebTextInputWindowController.m
164
165     mac/Storage/WebDatabaseManager.mm
166     mac/Storage/WebDatabaseManagerClient.mm
167     mac/Storage/WebDatabaseQuotaManager.mm
168     mac/Storage/WebStorageManager.mm
169     mac/Storage/WebStorageTrackerClient.mm
170
171     mac/WebCoreSupport/CorrectionPanel.mm
172     mac/WebCoreSupport/PopupMenuMac.mm
173     mac/WebCoreSupport/SearchPopupMenuMac.mm
174     mac/WebCoreSupport/WebAlternativeTextClient.mm
175     mac/WebCoreSupport/WebApplicationCache.mm
176     mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
177     mac/WebCoreSupport/WebChromeClient.mm
178     mac/WebCoreSupport/WebContextMenuClient.mm
179     mac/WebCoreSupport/WebDeviceOrientationClient.mm
180     mac/WebCoreSupport/WebDragClient.mm
181     mac/WebCoreSupport/WebEditorClient.mm
182     mac/WebCoreSupport/WebFrameLoaderClient.mm
183     mac/WebCoreSupport/WebFrameNetworkingContext.mm
184     mac/WebCoreSupport/WebGeolocationClient.mm
185     mac/WebCoreSupport/WebIconDatabaseClient.mm
186     mac/WebCoreSupport/WebInspectorClient.mm
187     mac/WebCoreSupport/WebJavaScriptTextInputPanel.m
188     mac/WebCoreSupport/WebKeyGenerator.mm
189     mac/WebCoreSupport/WebKitFullScreenListener.mm
190     mac/WebCoreSupport/WebNotificationClient.mm
191     mac/WebCoreSupport/WebOpenPanelResultListener.mm
192     mac/WebCoreSupport/WebPlatformStrategies.mm
193     mac/WebCoreSupport/WebProgressTrackerClient.mm
194     mac/WebCoreSupport/WebSecurityOrigin.mm
195     mac/WebCoreSupport/WebSystemInterface.mm
196     mac/WebCoreSupport/WebUserMediaClient.mm
197     mac/WebCoreSupport/WebViewGroup.mm
198
199     mac/WebInspector/WebInspector.mm
200     mac/WebInspector/WebInspectorFrontend.mm
201     mac/WebInspector/WebNodeHighlight.mm
202     mac/WebInspector/WebNodeHighlightView.mm
203     mac/WebInspector/WebNodeHighlighter.mm
204
205     mac/WebView/WebArchive.mm
206     mac/WebView/WebClipView.mm
207     mac/WebView/WebDashboardRegion.mm
208     mac/WebView/WebDataSource.mm
209     mac/WebView/WebDelegateImplementationCaching.mm
210     mac/WebView/WebDeviceOrientation.mm
211     mac/WebView/WebDeviceOrientationProviderMock.mm
212     mac/WebView/WebDocumentLoaderMac.mm
213     mac/WebView/WebDynamicScrollBarsView.mm
214     mac/WebView/WebFormDelegate.m
215     mac/WebView/WebFrame.mm
216     mac/WebView/WebFrameView.mm
217     mac/WebView/WebFullScreenController.mm
218     mac/WebView/WebGeolocationPosition.mm
219     mac/WebView/WebHTMLRepresentation.mm
220     mac/WebView/WebHTMLView.mm
221     mac/WebView/WebIndicateLayer.mm
222     mac/WebView/WebJSPDFDoc.mm
223     mac/WebView/WebNavigationData.mm
224     mac/WebView/WebNotification.mm
225     mac/WebView/WebPDFDocumentExtras.mm
226     mac/WebView/WebPDFRepresentation.mm
227     mac/WebView/WebPDFView.mm
228     mac/WebView/WebPolicyDelegate.mm
229     mac/WebView/WebPreferences.mm
230     mac/WebView/WebResource.mm
231     mac/WebView/WebScriptDebugDelegate.mm
232     mac/WebView/WebScriptDebugger.mm
233     mac/WebView/WebScriptWorld.mm
234     mac/WebView/WebTextCompletionController.mm
235     mac/WebView/WebTextIterator.mm
236     mac/WebView/WebView.mm
237     mac/WebView/WebViewData.mm
238 )
239
240 set(WebKit_LIBRARY_TYPE SHARED)
241
242 set(WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES
243     mac/DOM
244     mac/History
245     mac/Misc
246     mac/Panels
247     mac/Plugins
248     mac/WebCoreSupport
249     mac/WebInspector
250     mac/WebView
251     ${DERIVED_SOURCES_WEBCORE_DIR}
252     ${WEBCORE_DIR}/bindings/objc
253     ${WEBCORE_DIR}/plugins
254 )
255
256 set(WebKitLegacy_FORWARDING_HEADERS_FILES
257     mac/DOM/WebDOMOperations.h
258
259     mac/History/WebHistory.h
260     mac/History/WebHistoryItem.h
261
262     mac/Misc/WebNSURLExtras.h
263
264     mac/Panels/WebPanelAuthenticationHandler.h
265
266     mac/Plugins/WebBasePluginPackage.h
267
268     mac/WebCoreSupport/WebKeyGenerator.h
269
270     mac/WebInspector/WebInspector.h
271
272     mac/WebView/WebFrame.h
273     mac/WebView/WebView.h
274
275     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMRange.h
276
277     ${WEBCORE_DIR}/bindings/objc/DOMCore.h
278     ${WEBCORE_DIR}/bindings/objc/DOMExtensions.h
279
280     ${WEBCORE_DIR}/plugins/npfunctions.h
281 )
282
283 add_definitions("-include WebKitPrefix.h")
284
285 set_source_files_properties(
286     ${WEBKIT_DIR}/mac/Carbon/CarbonUtils.m
287     ${WEBKIT_DIR}/mac/Carbon/CarbonWindowContentView.m
288     ${WEBKIT_DIR}/mac/Carbon/CarbonWindowFrame.m
289     ${WEBKIT_DIR}/mac/Carbon/HIViewAdapter.m
290     mac/History/WebURLsWithTitles.m
291
292     mac/Misc/OldWebAssertions.c
293
294     mac/Misc/WebKitErrors.m
295     mac/Misc/WebKitLogging.m
296     mac/Misc/WebKitStatistics.m
297     mac/Misc/WebKitSystemBits.m
298     mac/Misc/WebKitVersionChecks.m
299     mac/Misc/WebNSArrayExtras.m
300     mac/Misc/WebNSControlExtras.m
301     mac/Misc/WebNSDataExtras.m
302     mac/Misc/WebNSDictionaryExtras.m
303     mac/Misc/WebNSEventExtras.m
304     mac/Misc/WebNSImageExtras.m
305     mac/Misc/WebNSPrintOperationExtras.m
306     mac/Misc/WebNSURLRequestExtras.m
307     mac/Misc/WebNSViewExtras.m
308     mac/Misc/WebNSWindowExtras.m
309
310     mac/Panels/WebAuthenticationPanel.m
311     mac/Panels/WebPanelAuthenticationHandler.m
312
313     mac/Plugins/WebPluginRequest.m
314     mac/Plugins/WebPluginsPrivate.m
315
316     mac/Plugins/Hosted/WebTextInputWindowController.m
317
318     mac/WebCoreSupport/WebJavaScriptTextInputPanel.m
319
320     mac/WebView/WebFormDelegate.m
321 PROPERTIES COMPILE_FLAGS -std=c99)
322
323 WEBKIT_CREATE_FORWARDING_HEADERS(WebKitLegacy DIRECTORIES ${WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES} FILES ${WebKitLegacy_FORWARDING_HEADERS_FILES})