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