Progress towards CMake on Mac
[WebKit-https.git] / Source / WebKit2 / PlatformMac.cmake
1 add_definitions(-ObjC++)
2
3 if ("${CURRENT_OSX_VERSION}" MATCHES "10.9")
4 set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceMavericks.a)
5 elif ("${CURRENT_OSX_VERSION}" MATCHES "10.10")
6 set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceYosemite.a)
7 else ()
8 set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceElCapitan.a)
9 endif ()
10 link_directories(../../WebKitLibraries)
11
12 find_library(ACCELERATE_LIBRARY accelerate)
13 find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
14 find_library(AUDIOUNIT_LIBRARY AudioUnit)
15 find_library(CARBON_LIBRARY Carbon)
16 find_library(COCOA_LIBRARY Cocoa)
17 find_library(COREAUDIO_LIBRARY CoreAudio)
18 find_library(DISKARBITRATION_LIBRARY DiskArbitration)
19 find_library(IOKIT_LIBRARY IOKit)
20 find_library(IOSURFACE_LIBRARY IOSurface)
21 find_library(OPENGL_LIBRARY OpenGL)
22 find_library(QUARTZ_LIBRARY Quartz)
23 find_library(QUARTZCORE_LIBRARY QuartzCore)
24 find_library(SECURITY_LIBRARY Security)
25 find_library(SQLITE3_LIBRARY sqlite3)
26 find_library(XML2_LIBRARY XML2)
27 find_package(ZLIB REQUIRED)
28
29 add_definitions(-iframework ${QUARTZ_LIBRARY}/Frameworks)
30
31 list(APPEND WebKit2_LIBRARIES
32     ${ACCELERATE_LIBRARY}
33     ${AUDIOTOOLBOX_LIBRARY}
34     ${AUDIOUNIT_LIBRARY}
35     ${CARBON_LIBRARY}
36     ${COCOA_LIBRARY}
37     ${COREAUDIO_LIBRARY}
38     ${DISKARBITRATION_LIBRARY}
39     ${IOKIT_LIBRARY}
40     ${IOSURFACE_LIBRARY}
41     ${OPENGL_LIBRARY}
42     ${QUARTZ_LIBRARY}
43     ${QUARTZCORE_LIBRARY}
44     ${SECURITY_LIBRARY}
45     ${SQLITE3_LIBRARY}
46     ${WEBKITSYSTEMINTERFACE_LIBRARY}
47     ${XML2_LIBRARY}
48     ${ZLIB_LIBRARIES}
49 )
50
51 list(APPEND WebKit2_SOURCES
52     NetworkProcess/cocoa/NetworkProcessCocoa.mm
53
54     NetworkProcess/mac/NetworkDiskCacheMonitor.mm
55     NetworkProcess/mac/NetworkProcessMac.mm
56     NetworkProcess/mac/NetworkResourceLoaderMac.mm
57     NetworkProcess/mac/RemoteNetworkingContext.mm
58
59     Shared/API/Cocoa/RemoteObjectRegistry.mm
60     Shared/API/Cocoa/WKBrowsingContextHandle.mm
61     Shared/API/Cocoa/WKRemoteObject.mm
62     Shared/API/Cocoa/WKRemoteObjectCoder.mm
63     Shared/API/Cocoa/WebKit.m
64     Shared/API/Cocoa/_WKFrameHandle.mm
65     Shared/API/Cocoa/_WKHitTestResult.mm
66     Shared/API/Cocoa/_WKNSFileManagerExtras.mm
67     Shared/API/Cocoa/_WKRemoteObjectInterface.mm
68     Shared/API/Cocoa/_WKRemoteObjectRegistry.mm
69
70     Shared/API/c/cf/WKErrorCF.cpp
71     Shared/API/c/cf/WKStringCF.mm
72     Shared/API/c/cf/WKURLCF.mm
73
74     Shared/API/c/cg/WKImageCG.cpp
75
76     Shared/API/c/mac/WKCertificateInfoMac.mm
77     Shared/API/c/mac/WKObjCTypeWrapperRef.mm
78     Shared/API/c/mac/WKURLRequestNS.mm
79     Shared/API/c/mac/WKURLResponseNS.mm
80     Shared/API/c/mac/WKWebArchive.cpp
81     Shared/API/c/mac/WKWebArchiveResource.cpp
82
83     UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm
84     UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm
85     UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm
86     UIProcess/API/Cocoa/LegacyBundleForClass.mm
87     UIProcess/API/Cocoa/WKBackForwardList.mm
88     UIProcess/API/Cocoa/WKBackForwardListItem.mm
89     UIProcess/API/Cocoa/WKBrowsingContextController.mm
90     UIProcess/API/Cocoa/WKError.mm
91     UIProcess/API/Cocoa/WKFrameInfo.mm
92     UIProcess/API/Cocoa/WKNavigation.mm
93     UIProcess/API/Cocoa/WKNavigationAction.mm
94     UIProcess/API/Cocoa/WKNavigationResponse.mm
95     UIProcess/API/Cocoa/WKPreferences.mm
96     UIProcess/API/Cocoa/WKProcessPool.mm
97     UIProcess/API/Cocoa/WKScriptMessage.mm
98     UIProcess/API/Cocoa/WKSecurityOrigin.mm
99     UIProcess/API/Cocoa/WKUserContentController.mm
100     UIProcess/API/Cocoa/WKUserScript.mm
101     UIProcess/API/Cocoa/WKWebView.mm
102     UIProcess/API/Cocoa/WKWebViewConfiguration.mm
103     UIProcess/API/Cocoa/WKWebsiteDataRecord.mm
104     UIProcess/API/Cocoa/WKWebsiteDataStore.mm
105     UIProcess/API/Cocoa/WKWindowFeatures.mm
106     UIProcess/API/Cocoa/_WKActivatedElementInfo.mm
107     UIProcess/API/Cocoa/_WKDownload.mm
108     UIProcess/API/Cocoa/_WKElementAction.mm
109     UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm
110     UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
111     UIProcess/API/Cocoa/_WKSessionState.mm
112     UIProcess/API/Cocoa/_WKThumbnailView.mm
113     UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm
114     UIProcess/API/Cocoa/_WKUserContentFilter.mm
115     UIProcess/API/Cocoa/_WKVisitedLinkStore.mm
116
117     UIProcess/API/mac/WKView.mm
118
119     UIProcess/Cocoa/DiagnosticLoggingClient.mm
120     UIProcess/Cocoa/DownloadClient.mm
121     UIProcess/Cocoa/FindClient.mm
122     UIProcess/Cocoa/NavigationState.mm
123     UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm
124     UIProcess/Cocoa/SessionStateCoding.mm
125     UIProcess/Cocoa/UIDelegate.mm
126     UIProcess/Cocoa/VersionChecks.mm
127     UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm
128     UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm
129     UIProcess/Cocoa/WebPageProxyCocoa.mm
130     UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
131     UIProcess/Cocoa/WebProcessPoolCocoa.mm
132     UIProcess/Cocoa/WebProcessProxyCocoa.mm
133
134     UIProcess/mac/CorrectionPanel.mm
135     UIProcess/mac/LegacySessionStateCoding.cpp
136     UIProcess/mac/PageClientImpl.mm
137     UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm
138     UIProcess/mac/RemoteLayerTreeHost.mm
139     UIProcess/mac/SecItemShimProxy.cpp
140     UIProcess/mac/ServicesController.mm
141     UIProcess/mac/TextCheckerMac.mm
142     UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
143     UIProcess/mac/ViewGestureControllerMac.mm
144     UIProcess/mac/ViewSnapshotStore.mm
145     UIProcess/mac/WKFullKeyboardAccessWatcher.mm
146     UIProcess/mac/WKFullScreenWindowController.mm
147     UIProcess/mac/WKImmediateActionController.mm
148     UIProcess/mac/WKPrintingView.mm
149     UIProcess/mac/WKSharingServicePickerDelegate.mm
150     UIProcess/mac/WKTextInputWindowController.mm
151     UIProcess/mac/WKViewLayoutStrategy.mm
152     UIProcess/mac/WebColorPickerMac.mm
153     UIProcess/mac/WebContextMenuProxyMac.mm
154     UIProcess/mac/WebCookieManagerProxyMac.mm
155     UIProcess/mac/WebInspectorProxyMac.mm
156     UIProcess/mac/WebPageProxyMac.mm
157     UIProcess/mac/WebPopupMenuProxyMac.mm
158     UIProcess/mac/WebPreferencesMac.mm
159     UIProcess/mac/WebProcessProxyMac.mm
160     UIProcess/mac/WindowServerConnection.mm
161 )
162
163 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2_DIR})
164
165 list(APPEND WebKit2_INCLUDE_DIRECTORIES
166     "${WEBCORE_DIR}/platform/cf"
167     "${WEBCORE_DIR}/platform/mac"
168     "${WEBCORE_DIR}/platform/network/cf"
169     "${WEBCORE_DIR}/platform/network/cocoa"
170     "${WEBCORE_DIR}/platform/spi/mac"
171     "${WEBCORE_DIR}/platform/graphics/cg"
172     "${WEBCORE_DIR}/platform/graphics/opentype"
173     "${WEBKIT2_DIR}/NetworkProcess/cocoa"
174     "${WEBKIT2_DIR}/NetworkProcess/mac"
175     "${WEBKIT2_DIR}/UIProcess/mac"
176     "${WEBKIT2_DIR}/UIProcess/API/C/mac"
177     "${WEBKIT2_DIR}/UIProcess/API/Cocoa"
178     "${WEBKIT2_DIR}/UIProcess/API/mac"
179     "${WEBKIT2_DIR}/UIProcess/Cocoa"
180     "${WEBKIT2_DIR}/UIProcess/Scrolling"
181     "${WEBKIT2_DIR}/Platform/mac"
182     "${WEBKIT2_DIR}/Platform/IPC/mac"
183     "${WEBKIT2_DIR}/Platform/spi/Cocoa"
184     "${WEBKIT2_DIR}/Shared/API/Cocoa"
185     "${WEBKIT2_DIR}/Shared/API/c/cf"
186     "${WEBKIT2_DIR}/Shared/API/c/cg"
187     "${WEBKIT2_DIR}/Shared/API/c/mac"
188     "${WEBKIT2_DIR}/Shared/cf"
189     "${WEBKIT2_DIR}/Shared/Cocoa"
190     "${WEBKIT2_DIR}/Shared/mac"
191     "${WEBKIT2_DIR}/Shared/Plugins/mac"
192     "${WEBKIT2_DIR}/Shared/Scrolling"
193     "${WEBKIT2_DIR}/WebProcess/Plugins/PDF"
194     "${WEBKIT2_DIR}/WebProcess/Scrolling"
195     "${WEBKIT2_DIR}/WebProcess/WebPage/mac"
196     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/mac"
197     "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
198 )
199
200 set(WEBKIT2_EXTRA_DEPENDENCIES
201      WebKit2-forwarding-headers
202 )
203 set(WebProcess_SOURCES
204      WebProcess/mac/SecItemShimLibrary.mm
205 )
206
207 list(APPEND NetworkProcess_SOURCES
208      ${NetworkProcess_COMMON_SOURCES}
209 )
210
211 list(APPEND DatabaseProcess_SOURCES
212     DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm
213 )
214
215 add_definitions("-include WebKit2Prefix.h")
216
217 set(WebKit2_FORWARDING_HEADERS_FILES
218     Shared/API/c/WKDiagnosticLoggingResultType.h
219
220     UIProcess/API/C/WKPageDiagnosticLoggingClient.h
221     UIProcess/API/C/WKPageNavigationClient.h
222     UIProcess/API/C/WKPageRenderingProgressEvents.h
223 )
224
225 list(APPEND WebKit2_MESSAGES_IN_FILES
226     Shared/API/Cocoa/RemoteObjectRegistry.messages.in
227
228     Shared/mac/SecItemShim.messages.in
229
230     UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in
231     UIProcess/mac/SecItemShimProxy.messages.in
232     UIProcess/mac/ViewGestureController.messages.in
233
234     WebProcess/WebPage/ViewGestureGeometryCollector.messages.in
235 )
236
237 set(WebKit2_FORWARDING_HEADERS_DIRECTORIES
238     Shared/API/Cocoa
239     Shared/API/c
240
241     Shared/API/c/mac
242
243     UIProcess/Cocoa
244
245     UIProcess/API/C
246     UIProcess/API/Cocoa
247
248     WebProcess/WebPage
249
250     WebProcess/InjectedBundle/API/c
251 )
252
253 WEBKIT_CREATE_FORWARDING_HEADERS(WebKit FILES ${WebKit2_FORWARDING_HEADERS_FILES} DIRECTORIES ${WebKit2_FORWARDING_HEADERS_DIRECTORIES})