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