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