Fix Mac CMake build after r206261
[WebKit.git] / Source / WebKit2 / CMakeLists.txt
1 set_property(DIRECTORY . PROPERTY FOLDER "WebKit2")
2
3 set(WebKit2_INCLUDE_DIRECTORIES
4     "${JAVASCRIPTCORE_DIR}/llint"
5     "${WEBKIT2_DIR}"
6     "${WEBKIT2_DIR}/DatabaseProcess"
7     "${WEBKIT2_DIR}/DatabaseProcess/IndexedDB"
8     "${WEBKIT2_DIR}/NetworkProcess"
9     "${WEBKIT2_DIR}/NetworkProcess/CustomProtocols"
10     "${WEBKIT2_DIR}/NetworkProcess/Downloads"
11     "${WEBKIT2_DIR}/NetworkProcess/FileAPI"
12     "${WEBKIT2_DIR}/NetworkProcess/cache"
13     "${WEBKIT2_DIR}/Platform"
14     "${WEBKIT2_DIR}/Platform/IPC"
15     "${WEBKIT2_DIR}/PluginProcess"
16     "${WEBKIT2_DIR}/Shared"
17     "${WEBKIT2_DIR}/Shared/API"
18     "${WEBKIT2_DIR}/Shared/API/c"
19     "${WEBKIT2_DIR}/Shared/Authentication"
20     "${WEBKIT2_DIR}/Shared/CoreIPCSupport"
21     "${WEBKIT2_DIR}/Shared/Databases"
22     "${WEBKIT2_DIR}/Shared/Databases/IndexedDB"
23     "${WEBKIT2_DIR}/Shared/FileAPI"
24     "${WEBKIT2_DIR}/Shared/Gamepad"
25     "${WEBKIT2_DIR}/Shared/Plugins"
26     "${WEBKIT2_DIR}/Shared/Plugins/Netscape"
27     "${WEBKIT2_DIR}/Shared/Plugins/Netscape/x11"
28     "${WEBKIT2_DIR}/Shared/WebsiteData"
29     "${WEBKIT2_DIR}/UIProcess"
30     "${WEBKIT2_DIR}/UIProcess/API"
31     "${WEBKIT2_DIR}/UIProcess/API/C"
32     "${WEBKIT2_DIR}/UIProcess/API/cpp"
33     "${WEBKIT2_DIR}/UIProcess/ApplePay"
34     "${WEBKIT2_DIR}/UIProcess/Authentication"
35     "${WEBKIT2_DIR}/UIProcess/Automation"
36     "${WEBKIT2_DIR}/UIProcess/Databases"
37     "${WEBKIT2_DIR}/UIProcess/Downloads"
38     "${WEBKIT2_DIR}/UIProcess/Gamepad"
39     "${WEBKIT2_DIR}/UIProcess/InspectorServer"
40     "${WEBKIT2_DIR}/UIProcess/Launcher"
41     "${WEBKIT2_DIR}/UIProcess/Network"
42     "${WEBKIT2_DIR}/UIProcess/Network/CustomProtocols"
43     "${WEBKIT2_DIR}/UIProcess/Notifications"
44     "${WEBKIT2_DIR}/UIProcess/Plugins"
45     "${WEBKIT2_DIR}/UIProcess/Storage"
46     "${WEBKIT2_DIR}/UIProcess/UserContent"
47     "${WEBKIT2_DIR}/UIProcess/WebsiteData"
48     "${WEBKIT2_DIR}/WebProcess"
49     "${WEBKIT2_DIR}/WebProcess/ApplePay"
50     "${WEBKIT2_DIR}/WebProcess/ApplicationCache"
51     "${WEBKIT2_DIR}/WebProcess/Automation"
52     "${WEBKIT2_DIR}/WebProcess/Battery"
53     "${WEBKIT2_DIR}/WebProcess/Cookies"
54     "${WEBKIT2_DIR}/WebProcess/Databases"
55     "${WEBKIT2_DIR}/WebProcess/Databases/IndexedDB"
56     "${WEBKIT2_DIR}/WebProcess/FileAPI"
57     "${WEBKIT2_DIR}/WebProcess/FullScreen"
58     "${WEBKIT2_DIR}/WebProcess/Gamepad"
59     "${WEBKIT2_DIR}/WebProcess/Geolocation"
60     "${WEBKIT2_DIR}/WebProcess/IconDatabase"
61     "${WEBKIT2_DIR}/WebProcess/InjectedBundle"
62     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API"
63     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c"
64     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/DOM"
65     "${WEBKIT2_DIR}/WebProcess/Launching"
66     "${WEBKIT2_DIR}/WebProcess/MediaCache"
67     "${WEBKIT2_DIR}/WebProcess/MediaStream"
68     "${WEBKIT2_DIR}/WebProcess/Network"
69     "${WEBKIT2_DIR}/WebProcess/Notifications"
70     "${WEBKIT2_DIR}/WebProcess/OriginData"
71     "${WEBKIT2_DIR}/WebProcess/Plugins"
72     "${WEBKIT2_DIR}/WebProcess/Plugins/Netscape"
73     "${WEBKIT2_DIR}/WebProcess/ResourceCache"
74     "${WEBKIT2_DIR}/WebProcess/Storage"
75     "${WEBKIT2_DIR}/WebProcess/UserContent"
76     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport"
77     "${WEBKIT2_DIR}/WebProcess/WebPage"
78     "${WEBCORE_DIR}"
79     "${WEBCORE_DIR}/Modules/battery"
80     "${WEBCORE_DIR}/Modules/indexeddb"
81     "${WEBCORE_DIR}/Modules/indexeddb/client"
82     "${WEBCORE_DIR}/Modules/indexeddb/server"
83     "${WEBCORE_DIR}/Modules/indexeddb/shared"
84     "${WEBCORE_DIR}/Modules/mediastream"
85     "${WEBCORE_DIR}/Modules/networkinfo"
86     "${WEBCORE_DIR}/Modules/notifications"
87     "${WEBCORE_DIR}/Modules/streams"
88     "${WEBCORE_DIR}/Modules/vibration"
89     "${WEBCORE_DIR}/Modules/webdatabase"
90     "${WEBCORE_DIR}/accessibility"
91     "${WEBCORE_DIR}/bindings/generic"
92     "${WEBCORE_DIR}/bindings/js"
93     "${WEBCORE_DIR}/bindings"
94     "${WEBCORE_DIR}/bridge"
95     "${WEBCORE_DIR}/bridge/jsc"
96     "${WEBCORE_DIR}/contentextensions"
97     "${WEBCORE_DIR}/css"
98     "${WEBCORE_DIR}/css/parser"
99     "${WEBCORE_DIR}/dom"
100     "${WEBCORE_DIR}/dom/default"
101     "${WEBCORE_DIR}/editing"
102     "${WEBCORE_DIR}/fileapi"
103     "${WEBCORE_DIR}/history"
104     "${WEBCORE_DIR}/html"
105     "${WEBCORE_DIR}/html/shadow"
106     "${WEBCORE_DIR}/html/track"
107     "${WEBCORE_DIR}/inspector"
108     "${WEBCORE_DIR}/loader"
109     "${WEBCORE_DIR}/loader/archive"
110     "${WEBCORE_DIR}/loader/icon"
111     "${WEBCORE_DIR}/loader/cache"
112     "${WEBCORE_DIR}/page"
113     "${WEBCORE_DIR}/page/animation"
114     "${WEBCORE_DIR}/page/csp"
115     "${WEBCORE_DIR}/page/scrolling"
116     "${WEBCORE_DIR}/platform"
117     "${WEBCORE_DIR}/platform/animation"
118     "${WEBCORE_DIR}/platform/audio"
119     "${WEBCORE_DIR}/platform/gamepad"
120     "${WEBCORE_DIR}/platform/graphics"
121     "${WEBCORE_DIR}/platform/graphics/filters"
122     "${WEBCORE_DIR}/platform/graphics/harfbuzz"
123     "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
124     "${WEBCORE_DIR}/platform/graphics/surfaces"
125     "${WEBCORE_DIR}/platform/graphics/texmap"
126     "${WEBCORE_DIR}/platform/graphics/transforms"
127     "${WEBCORE_DIR}/platform/mediastream"
128     "${WEBCORE_DIR}/platform/network"
129     "${WEBCORE_DIR}/platform/spi/cf"
130     "${WEBCORE_DIR}/platform/sql"
131     "${WEBCORE_DIR}/platform/text"
132     "${WEBCORE_DIR}/plugins"
133     "${WEBCORE_DIR}/rendering"
134     "${WEBCORE_DIR}/rendering/line"
135     "${WEBCORE_DIR}/rendering/shapes"
136     "${WEBCORE_DIR}/rendering/style"
137     "${WEBCORE_DIR}/storage"
138     "${WEBCORE_DIR}/style"
139     "${WEBCORE_DIR}/svg"
140     "${WEBCORE_DIR}/svg/graphics"
141     "${WEBCORE_DIR}/svg/properties"
142     "${WEBCORE_DIR}/workers"
143     "${JAVASCRIPTCORE_DIR}"
144     "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
145     "${JAVASCRIPTCORE_DIR}/API"
146     "${JAVASCRIPTCORE_DIR}/assembler"
147     "${JAVASCRIPTCORE_DIR}/bytecode"
148     "${JAVASCRIPTCORE_DIR}/bytecompiler"
149     "${JAVASCRIPTCORE_DIR}/collector/handles"
150     "${JAVASCRIPTCORE_DIR}/dfg"
151     "${JAVASCRIPTCORE_DIR}/disassembler"
152     "${JAVASCRIPTCORE_DIR}/heap"
153     "${JAVASCRIPTCORE_DIR}/interpreter"
154     "${JAVASCRIPTCORE_DIR}/jit"
155     "${JAVASCRIPTCORE_DIR}/parser"
156     "${JAVASCRIPTCORE_DIR}/profiler"
157     "${JAVASCRIPTCORE_DIR}/runtime"
158     "${WTF_DIR}"
159     "${DERIVED_SOURCES_DIR}"
160     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
161     "${DERIVED_SOURCES_WEBCORE_DIR}"
162     "${DERIVED_SOURCES_WEBKIT2_DIR}"
163     "${DERIVED_SOURCES_WEBKIT2_DIR}/include"
164     "${CMAKE_BINARY_DIR}"
165     "${CMAKE_SOURCE_DIR}/Source"
166     "${CMAKE_SOURCE_DIR}/WebKitLibraries"
167 )
168
169 set(PROTOCOL_GENERATOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
170
171 set(WebKit2_SYSTEM_INCLUDE_DIRECTORIES
172     ${ICU_INCLUDE_DIRS}
173 )
174
175 if (ENABLE_GRAPHICS_CONTEXT_3D)
176     list(APPEND WebKit2_INCLUDE_DIRECTORIES
177         "${THIRDPARTY_DIR}/ANGLE"
178         "${THIRDPARTY_DIR}/ANGLE/include/KHR"
179     )
180 endif ()
181
182 set(NetworkProcess_COMMON_SOURCES
183     NetworkProcess/NetworkConnectionToWebProcess.cpp
184     NetworkProcess/NetworkLoad.cpp
185     NetworkProcess/NetworkProcess.cpp
186     NetworkProcess/NetworkProcessPlatformStrategies.cpp
187     NetworkProcess/NetworkResourceLoader.cpp
188
189     NetworkProcess/FileAPI/NetworkBlobRegistry.cpp
190
191     NetworkProcess/cache/NetworkCache.cpp
192     NetworkProcess/cache/NetworkCacheBlobStorage.cpp
193     NetworkProcess/cache/NetworkCacheCoders.cpp
194     NetworkProcess/cache/NetworkCacheData.cpp
195     NetworkProcess/cache/NetworkCacheDecoder.cpp
196     NetworkProcess/cache/NetworkCacheEncoder.cpp
197     NetworkProcess/cache/NetworkCacheEntry.cpp
198     NetworkProcess/cache/NetworkCacheFileSystem.cpp
199     NetworkProcess/cache/NetworkCacheKey.cpp
200     NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp
201     NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp
202     NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp
203     NetworkProcess/cache/NetworkCacheStatistics.cpp
204     NetworkProcess/cache/NetworkCacheStorage.cpp
205 )
206
207 set(WebKit2_SOURCES
208     DatabaseProcess/DatabaseProcess.cpp
209     DatabaseProcess/DatabaseToWebProcessConnection.cpp
210
211     DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp
212
213     NetworkProcess/NetworkProcessCreationParameters.cpp
214     NetworkProcess/NetworkResourceLoadParameters.cpp
215
216     NetworkProcess/Downloads/Download.cpp
217     NetworkProcess/Downloads/DownloadManager.cpp
218
219     Platform/Logging.cpp
220     Platform/Module.cpp
221
222     Platform/IPC/ArgumentCoders.cpp
223     Platform/IPC/Attachment.cpp
224     Platform/IPC/Connection.cpp
225     Platform/IPC/DataReference.cpp
226     Platform/IPC/Decoder.cpp
227     Platform/IPC/Encoder.cpp
228     Platform/IPC/MessageReceiverMap.cpp
229     Platform/IPC/MessageSender.cpp
230     Platform/IPC/StringReference.cpp
231
232     PluginProcess/PluginControllerProxy.cpp
233     PluginProcess/PluginCreationParameters.cpp
234     PluginProcess/PluginProcess.cpp
235     PluginProcess/WebProcessConnection.cpp
236
237     Shared/ActivityAssertion.cpp
238     Shared/AsyncRequest.cpp
239     Shared/BlobDataFileReferenceWithSandboxExtension.cpp
240     Shared/CacheModel.cpp
241     Shared/ChildProcess.cpp
242     Shared/ContextMenuContextData.cpp
243     Shared/EditorState.cpp
244     Shared/FontInfo.cpp
245     Shared/FrameInfoData.cpp
246     Shared/LayerTreeContext.cpp
247     Shared/LoadParameters.cpp
248     Shared/NavigationActionData.cpp
249     Shared/PlatformPopupMenuData.cpp
250     Shared/PrintInfo.cpp
251     Shared/SessionState.cpp
252     Shared/SessionTracker.cpp
253     Shared/ShareableBitmap.cpp
254     Shared/ShareableResource.cpp
255     Shared/StatisticsData.cpp
256     Shared/UpdateInfo.cpp
257     Shared/UserData.cpp
258     Shared/VisitedLinkTable.cpp
259     Shared/WebBackForwardListItem.cpp
260     Shared/WebBatteryStatus.cpp
261     Shared/WebCompiledContentExtension.cpp
262     Shared/WebCompiledContentExtensionData.cpp
263     Shared/WebConnection.cpp
264     Shared/WebConnectionClient.cpp
265     Shared/WebContextMenuItem.cpp
266     Shared/WebContextMenuItemData.cpp
267     Shared/WebCoreArgumentCoders.cpp
268     Shared/WebEvent.cpp
269     Shared/WebEventConversion.cpp
270     Shared/WebGeolocationPosition.cpp
271     Shared/WebHitTestResultData.cpp
272     Shared/WebImage.cpp
273     Shared/WebKeyboardEvent.cpp
274     Shared/WebKit2Initialize.cpp
275     Shared/WebMediaSessionMetadata.cpp
276     Shared/WebMemorySampler.cpp
277     Shared/WebMouseEvent.cpp
278     Shared/WebPageCreationParameters.cpp
279     Shared/WebPageGroupData.cpp
280     Shared/WebPlatformTouchPoint.cpp
281     Shared/WebPopupItem.cpp
282     Shared/WebPreferencesKeys.cpp
283     Shared/WebPreferencesStore.cpp
284     Shared/WebProcessCreationParameters.cpp
285     Shared/WebRenderLayer.cpp
286     Shared/WebRenderObject.cpp
287     Shared/WebTouchEvent.cpp
288     Shared/WebUserContentControllerDataTypes.cpp
289     Shared/WebWheelEvent.cpp
290
291     Shared/API/APIArray.cpp
292     Shared/API/APIData.cpp
293     Shared/API/APIDictionary.cpp
294     Shared/API/APIError.cpp
295     Shared/API/APIFrameHandle.cpp
296     Shared/API/APIGeometry.cpp
297     Shared/API/APIObject.cpp
298     Shared/API/APIPageGroupHandle.cpp
299     Shared/API/APIPageHandle.cpp
300     Shared/API/APIURLRequest.cpp
301     Shared/API/APIURLResponse.cpp
302
303     Shared/API/c/WKArray.cpp
304     Shared/API/c/WKCertificateInfo.cpp
305     Shared/API/c/WKConnectionRef.cpp
306     Shared/API/c/WKContextMenuItem.cpp
307     Shared/API/c/WKData.cpp
308     Shared/API/c/WKDeprecatedFunctions.cpp
309     Shared/API/c/WKDictionary.cpp
310     Shared/API/c/WKErrorRef.cpp
311     Shared/API/c/WKGeometry.cpp
312     Shared/API/c/WKImage.cpp
313     Shared/API/c/WKMutableArray.cpp
314     Shared/API/c/WKMutableDictionary.cpp
315     Shared/API/c/WKNumber.cpp
316     Shared/API/c/WKPluginInformation.cpp
317     Shared/API/c/WKRenderLayer.cpp
318     Shared/API/c/WKRenderObject.cpp
319     Shared/API/c/WKSecurityOriginRef.cpp
320     Shared/API/c/WKSerializedScriptValue.cpp
321     Shared/API/c/WKString.cpp
322     Shared/API/c/WKType.cpp
323     Shared/API/c/WKURL.cpp
324     Shared/API/c/WKURLRequest.cpp
325     Shared/API/c/WKURLResponse.cpp
326     Shared/API/c/WKUserContentURLPattern.cpp
327
328     Shared/Authentication/AuthenticationManager.cpp
329
330     Shared/Databases/DatabaseProcessCreationParameters.cpp
331
332     Shared/Databases/IndexedDB/IDBUtilities.cpp
333     Shared/Databases/IndexedDB/WebIDBResult.cpp
334
335     Shared/Gamepad/GamepadData.cpp
336
337     Shared/Plugins/NPIdentifierData.cpp
338     Shared/Plugins/NPObjectMessageReceiver.cpp
339     Shared/Plugins/NPObjectProxy.cpp
340     Shared/Plugins/NPRemoteObjectMap.cpp
341     Shared/Plugins/NPVariantData.cpp
342     Shared/Plugins/PluginProcessCreationParameters.cpp
343
344     Shared/Plugins/Netscape/NetscapePluginModule.cpp
345     Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp
346     Shared/Plugins/Netscape/PluginInformation.cpp
347
348     Shared/WebsiteData/WebsiteData.cpp
349
350     UIProcess/ChildProcessProxy.cpp
351     UIProcess/DrawingAreaProxy.cpp
352     UIProcess/FrameLoadState.cpp
353     UIProcess/GeolocationPermissionRequestManagerProxy.cpp
354     UIProcess/GeolocationPermissionRequestProxy.cpp
355     UIProcess/PageLoadState.cpp
356     UIProcess/ProcessAssertion.cpp
357     UIProcess/ProcessThrottler.cpp
358     UIProcess/RemoteWebInspectorProxy.cpp
359     UIProcess/ResponsivenessTimer.cpp
360     UIProcess/StatisticsRequest.cpp
361     UIProcess/TextCheckerCompletion.cpp
362     UIProcess/UserMediaPermissionCheckProxy.cpp
363     UIProcess/UserMediaPermissionRequestManagerProxy.cpp
364     UIProcess/UserMediaPermissionRequestProxy.cpp
365     UIProcess/VisitedLinkStore.cpp
366     UIProcess/WebBackForwardList.cpp
367     UIProcess/WebBatteryManagerProxy.cpp
368     UIProcess/WebBatteryProvider.cpp
369     UIProcess/WebColorPicker.cpp
370     UIProcess/WebConnectionToWebProcess.cpp
371     UIProcess/WebContextClient.cpp
372     UIProcess/WebContextConnectionClient.cpp
373     UIProcess/WebContextInjectedBundleClient.cpp
374     UIProcess/WebContextMenuProxy.cpp
375     UIProcess/WebCookieManagerProxy.cpp
376     UIProcess/WebCookieManagerProxyClient.cpp
377     UIProcess/WebEditCommandProxy.cpp
378     UIProcess/WebFormClient.cpp
379     UIProcess/WebFormSubmissionListenerProxy.cpp
380     UIProcess/WebFrameListenerProxy.cpp
381     UIProcess/WebFramePolicyListenerProxy.cpp
382     UIProcess/WebFrameProxy.cpp
383     UIProcess/WebFullScreenManagerProxy.cpp
384     UIProcess/WebGeolocationManagerProxy.cpp
385     UIProcess/WebGeolocationProvider.cpp
386     UIProcess/WebGrammarDetail.cpp
387     UIProcess/WebIconDatabase.cpp
388     UIProcess/WebIconDatabaseClient.cpp
389     UIProcess/WebInspectorProxy.cpp
390     UIProcess/WebInspectorUtilities.cpp
391     UIProcess/WebNavigationState.cpp
392     UIProcess/WebOpenPanelResultListenerProxy.cpp
393     UIProcess/WebPageDiagnosticLoggingClient.cpp
394     UIProcess/WebPageGroup.cpp
395     UIProcess/WebPageInjectedBundleClient.cpp
396     UIProcess/WebPageProxy.cpp
397     UIProcess/WebPasteboardProxy.cpp
398     UIProcess/WebPreferences.cpp
399     UIProcess/WebProcessLifetimeObserver.cpp
400     UIProcess/WebProcessLifetimeTracker.cpp
401     UIProcess/WebProcessPool.cpp
402     UIProcess/WebProcessProxy.cpp
403     UIProcess/WebVibrationProvider.cpp
404     UIProcess/WebVibrationProxy.cpp
405     UIProcess/WebViewportAttributes.cpp
406
407     UIProcess/API/APIExperimentalFeature.cpp
408     UIProcess/API/APIFrameInfo.cpp
409     UIProcess/API/APIHitTestResult.cpp
410     UIProcess/API/APINavigation.cpp
411     UIProcess/API/APINavigationData.cpp
412     UIProcess/API/APIPageConfiguration.cpp
413     UIProcess/API/APIProcessPoolConfiguration.cpp
414     UIProcess/API/APIOpenPanelParameters.cpp
415     UIProcess/API/APISession.cpp
416     UIProcess/API/APISessionState.cpp
417     UIProcess/API/APIUserContentExtension.cpp
418     UIProcess/API/APIUserContentExtensionStore.cpp
419     UIProcess/API/APIUserContentWorld.cpp
420     UIProcess/API/APIUserScript.cpp
421     UIProcess/API/APIUserStyleSheet.cpp
422     UIProcess/API/APIWebsiteDataStore.cpp
423     UIProcess/API/APIWindowFeatures.cpp
424
425     UIProcess/API/C/WKApplicationCacheManager.cpp
426     UIProcess/API/C/WKAuthenticationChallenge.cpp
427     UIProcess/API/C/WKAuthenticationDecisionListener.cpp
428     UIProcess/API/C/WKBackForwardListItemRef.cpp
429     UIProcess/API/C/WKBackForwardListRef.cpp
430     UIProcess/API/C/WKBatteryManager.cpp
431     UIProcess/API/C/WKBatteryStatus.cpp
432     UIProcess/API/C/WKContext.cpp
433     UIProcess/API/C/WKContextConfigurationRef.cpp
434     UIProcess/API/C/WKCookieManager.cpp
435     UIProcess/API/C/WKCredential.cpp
436     UIProcess/API/C/WKDownload.cpp
437     UIProcess/API/C/WKFormSubmissionListener.cpp
438     UIProcess/API/C/WKFrame.cpp
439     UIProcess/API/C/WKFrameHandleRef.cpp
440     UIProcess/API/C/WKFrameInfoRef.cpp
441     UIProcess/API/C/WKFramePolicyListener.cpp
442     UIProcess/API/C/WKGeolocationManager.cpp
443     UIProcess/API/C/WKGeolocationPermissionRequest.cpp
444     UIProcess/API/C/WKGeolocationPosition.cpp
445     UIProcess/API/C/WKGrammarDetail.cpp
446     UIProcess/API/C/WKHitTestResult.cpp
447     UIProcess/API/C/WKIconDatabase.cpp
448     UIProcess/API/C/WKInspector.cpp
449     UIProcess/API/C/WKKeyValueStorageManager.cpp
450     UIProcess/API/C/WKMediaSessionMetadata.cpp
451     UIProcess/API/C/WKNavigationActionRef.cpp
452     UIProcess/API/C/WKNavigationDataRef.cpp
453     UIProcess/API/C/WKNavigationRef.cpp
454     UIProcess/API/C/WKNavigationResponseRef.cpp
455     UIProcess/API/C/WKNotification.cpp
456     UIProcess/API/C/WKNotificationManager.cpp
457     UIProcess/API/C/WKNotificationPermissionRequest.cpp
458     UIProcess/API/C/WKOpenPanelParametersRef.cpp
459     UIProcess/API/C/WKOpenPanelResultListener.cpp
460     UIProcess/API/C/WKPage.cpp
461     UIProcess/API/C/WKPageConfigurationRef.cpp
462     UIProcess/API/C/WKPageGroup.cpp
463     UIProcess/API/C/WKPreferences.cpp
464     UIProcess/API/C/WKProtectionSpace.cpp
465     UIProcess/API/C/WKResourceCacheManager.cpp
466     UIProcess/API/C/WKSessionStateRef.cpp
467     UIProcess/API/C/WKTextChecker.cpp
468     UIProcess/API/C/WKUserContentControllerRef.cpp
469     UIProcess/API/C/WKUserMediaPermissionCheck.cpp
470     UIProcess/API/C/WKUserMediaPermissionRequest.cpp
471     UIProcess/API/C/WKVibration.cpp
472     UIProcess/API/C/WKViewportAttributes.cpp
473     UIProcess/API/C/WKWebsiteDataStoreRef.cpp
474     UIProcess/API/C/WKWindowFeaturesRef.cpp
475
476     UIProcess/Authentication/AuthenticationChallengeProxy.cpp
477     UIProcess/Authentication/AuthenticationDecisionListener.cpp
478     UIProcess/Authentication/WebCredential.cpp
479     UIProcess/Authentication/WebProtectionSpace.cpp
480
481     UIProcess/Automation/WebAutomationSession.cpp
482
483     UIProcess/Databases/DatabaseProcessProxy.cpp
484
485     UIProcess/Downloads/DownloadProxy.cpp
486     UIProcess/Downloads/DownloadProxyMap.cpp
487
488     UIProcess/Gamepad/UIGamepad.cpp
489     UIProcess/Gamepad/UIGamepadProvider.cpp
490
491     UIProcess/InspectorServer/HTTPRequest.cpp
492     UIProcess/InspectorServer/WebInspectorServer.cpp
493     UIProcess/InspectorServer/WebSocketServer.cpp
494     UIProcess/InspectorServer/WebSocketServerConnection.cpp
495
496     UIProcess/Launcher/ProcessLauncher.cpp
497
498     UIProcess/Network/NetworkProcessProxy.cpp
499
500     UIProcess/Notifications/NotificationPermissionRequest.cpp
501     UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp
502     UIProcess/Notifications/WebNotification.cpp
503     UIProcess/Notifications/WebNotificationManagerProxy.cpp
504     UIProcess/Notifications/WebNotificationProvider.cpp
505
506     UIProcess/Plugins/PlugInAutoStartProvider.cpp
507     UIProcess/Plugins/PluginInfoStore.cpp
508     UIProcess/Plugins/PluginProcessManager.cpp
509     UIProcess/Plugins/PluginProcessProxy.cpp
510
511     UIProcess/Storage/LocalStorageDatabase.cpp
512     UIProcess/Storage/LocalStorageDatabaseTracker.cpp
513
514     UIProcess/UserContent/WebScriptMessageHandler.cpp
515     UIProcess/UserContent/WebUserContentControllerProxy.cpp
516
517     UIProcess/WebsiteData/WebsiteDataRecord.cpp
518     UIProcess/WebsiteData/WebsiteDataStore.cpp
519
520     WebProcess/WebConnectionToUIProcess.cpp
521     WebProcess/WebProcess.cpp
522
523     WebProcess/Automation/WebAutomationSessionProxy.cpp
524
525     WebProcess/Battery/WebBatteryManager.cpp
526
527     WebProcess/Cookies/WebCookieManager.cpp
528
529     WebProcess/Databases/WebDatabaseProvider.cpp
530     WebProcess/Databases/WebToDatabaseProcessConnection.cpp
531
532     WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
533
534     WebProcess/FileAPI/BlobRegistryProxy.cpp
535
536     WebProcess/FullScreen/WebFullScreenManager.cpp
537
538     WebProcess/Gamepad/WebGamepad.cpp
539     WebProcess/Gamepad/WebGamepadProvider.cpp
540
541     WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp
542     WebProcess/Geolocation/WebGeolocationManager.cpp
543
544     WebProcess/IconDatabase/WebIconDatabaseProxy.cpp
545
546     WebProcess/InjectedBundle/InjectedBundle.cpp
547     WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp
548     WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp
549     WebProcess/InjectedBundle/InjectedBundleClient.cpp
550     WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp
551     WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
552     WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp
553     WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp
554     WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp
555     WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp
556     WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp
557     WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp
558     WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
559     WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp
560     WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp
561     WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
562     WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp
563
564     WebProcess/InjectedBundle/API/c/WKBundle.cpp
565     WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp
566     WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
567     WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp
568     WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
569     WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
570     WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp
571     WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp
572     WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
573     WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
574     WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp
575     WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp
576     WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp
577     WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp
578
579     WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp
580     WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp
581     WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
582     WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp
583
584     WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp
585
586     WebProcess/Network/NetworkProcessConnection.cpp
587     WebProcess/Network/WebLoaderStrategy.cpp
588     WebProcess/Network/WebResourceLoader.cpp
589     WebProcess/Network/WebSocketProvider.cpp
590
591     WebProcess/Notifications/NotificationPermissionRequestManager.cpp
592     WebProcess/Notifications/WebNotificationManager.cpp
593
594     WebProcess/Plugins/Plugin.cpp
595     WebProcess/Plugins/PluginProcessConnection.cpp
596     WebProcess/Plugins/PluginProcessConnectionManager.cpp
597     WebProcess/Plugins/PluginProxy.cpp
598     WebProcess/Plugins/PluginView.cpp
599     WebProcess/Plugins/WebPluginInfoProvider.cpp
600
601     WebProcess/Plugins/Netscape/JSNPMethod.cpp
602     WebProcess/Plugins/Netscape/JSNPObject.cpp
603     WebProcess/Plugins/Netscape/NPJSObject.cpp
604     WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp
605     WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp
606     WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
607     WebProcess/Plugins/Netscape/NetscapePlugin.cpp
608     WebProcess/Plugins/Netscape/NetscapePluginNone.cpp
609     WebProcess/Plugins/Netscape/NetscapePluginStream.cpp
610
611     WebProcess/Storage/StorageAreaImpl.cpp
612     WebProcess/Storage/StorageAreaMap.cpp
613     WebProcess/Storage/StorageNamespaceImpl.cpp
614     WebProcess/Storage/WebStorageNamespaceProvider.cpp
615
616     WebProcess/UserContent/WebUserContentController.cpp
617
618     WebProcess/WebCoreSupport/SessionStateConversion.cpp
619     WebProcess/WebCoreSupport/WebBatteryClient.cpp
620     WebProcess/WebCoreSupport/WebChromeClient.cpp
621     WebProcess/WebCoreSupport/WebColorChooser.cpp
622     WebProcess/WebCoreSupport/WebContextMenuClient.cpp
623     WebProcess/WebCoreSupport/WebDeviceProximityClient.cpp
624     WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp
625     WebProcess/WebCoreSupport/WebDragClient.cpp
626     WebProcess/WebCoreSupport/WebEditorClient.cpp
627     WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
628     WebProcess/WebCoreSupport/WebGeolocationClient.cpp
629     WebProcess/WebCoreSupport/WebInspectorClient.cpp
630     WebProcess/WebCoreSupport/WebNotificationClient.cpp
631     WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
632     WebProcess/WebCoreSupport/WebPlugInClient.cpp
633     WebProcess/WebCoreSupport/WebPopupMenu.cpp
634     WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp
635     WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
636     WebProcess/WebCoreSupport/WebUserMediaClient.cpp
637     WebProcess/WebCoreSupport/WebVibrationClient.cpp
638
639     WebProcess/WebPage/DrawingArea.cpp
640     WebProcess/WebPage/EventDispatcher.cpp
641     WebProcess/WebPage/FindController.cpp
642     WebProcess/WebPage/LayerTreeHost.cpp
643     WebProcess/WebPage/PageBanner.cpp
644     WebProcess/WebPage/RemoteWebInspectorUI.cpp
645     WebProcess/WebPage/VisitedLinkTableController.cpp
646     WebProcess/WebPage/WebBackForwardListProxy.cpp
647     WebProcess/WebPage/WebContextMenu.cpp
648     WebProcess/WebPage/WebDocumentLoader.cpp
649     WebProcess/WebPage/WebFrame.cpp
650     WebProcess/WebPage/WebInspector.cpp
651     WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp
652     WebProcess/WebPage/WebInspectorUI.cpp
653     WebProcess/WebPage/WebOpenPanelResultListener.cpp
654     WebProcess/WebPage/WebPage.cpp
655     WebProcess/WebPage/WebPageGroupProxy.cpp
656     WebProcess/WebPage/WebPageOverlay.cpp
657     WebProcess/WebPage/WebUndoStep.cpp
658
659
660
661     ${NetworkProcess_COMMON_SOURCES}
662 )
663
664 set(WebKit2_MESSAGES_IN_FILES
665     DatabaseProcess/DatabaseProcess.messages.in
666     DatabaseProcess/DatabaseToWebProcessConnection.messages.in
667
668     DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in
669
670     NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in
671
672     NetworkProcess/NetworkConnectionToWebProcess.messages.in
673     NetworkProcess/NetworkProcess.messages.in
674     NetworkProcess/NetworkResourceLoader.messages.in
675
676     PluginProcess/PluginControllerProxy.messages.in
677     PluginProcess/PluginProcess.messages.in
678     PluginProcess/WebProcessConnection.messages.in
679
680     Shared/ChildProcess.messages.in
681     Shared/WebConnection.messages.in
682
683     Shared/Authentication/AuthenticationManager.messages.in
684
685     Shared/Plugins/NPObjectMessageReceiver.messages.in
686
687     UIProcess/DrawingAreaProxy.messages.in
688     UIProcess/RemoteWebInspectorProxy.messages.in
689     UIProcess/VisitedLinkStore.messages.in
690     UIProcess/WebBatteryManagerProxy.messages.in
691     UIProcess/WebCookieManagerProxy.messages.in
692     UIProcess/WebFullScreenManagerProxy.messages.in
693     UIProcess/WebGeolocationManagerProxy.messages.in
694     UIProcess/WebIconDatabase.messages.in
695     UIProcess/WebInspectorProxy.messages.in
696     UIProcess/WebPageProxy.messages.in
697     UIProcess/WebPasteboardProxy.messages.in
698     UIProcess/WebProcessPool.messages.in
699     UIProcess/WebProcessProxy.messages.in
700     UIProcess/WebResourceLoadStatisticsStore.messages.in
701     UIProcess/WebVibrationProxy.messages.in
702
703     UIProcess/Automation/WebAutomationSession.messages.in
704
705     UIProcess/Databases/DatabaseProcessProxy.messages.in
706
707     UIProcess/Downloads/DownloadProxy.messages.in
708
709     UIProcess/Network/NetworkProcessProxy.messages.in
710
711     UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in
712
713     UIProcess/Plugins/PluginProcessProxy.messages.in
714
715     UIProcess/Storage/StorageManager.messages.in
716
717     UIProcess/UserContent/WebUserContentControllerProxy.messages.in
718
719     WebProcess/WebProcess.messages.in
720
721     WebProcess/Automation/WebAutomationSessionProxy.messages.in
722
723     WebProcess/Battery/WebBatteryManager.messages.in
724
725     WebProcess/Cookies/WebCookieManager.messages.in
726
727     WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in
728
729     WebProcess/FullScreen/WebFullScreenManager.messages.in
730
731     WebProcess/Geolocation/WebGeolocationManager.messages.in
732
733     WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in
734
735     WebProcess/Network/NetworkProcessConnection.messages.in
736     WebProcess/Network/WebResourceLoader.messages.in
737
738     WebProcess/Notifications/WebNotificationManager.messages.in
739
740     WebProcess/Plugins/PluginProcessConnection.messages.in
741     WebProcess/Plugins/PluginProcessConnectionManager.messages.in
742     WebProcess/Plugins/PluginProxy.messages.in
743
744     WebProcess/Storage/StorageAreaMap.messages.in
745
746     WebProcess/UserContent/WebUserContentController.messages.in
747
748     WebProcess/WebPage/DrawingArea.messages.in
749     WebProcess/WebPage/EventDispatcher.messages.in
750     WebProcess/WebPage/RemoteWebInspectorUI.messages.in
751     WebProcess/WebPage/VisitedLinkTableController.messages.in
752     WebProcess/WebPage/WebInspector.messages.in
753     WebProcess/WebPage/WebInspectorUI.messages.in
754     WebProcess/WebPage/WebPage.messages.in
755 )
756
757 set(WebProcess_LIBRARIES
758     WebKit2
759 )
760
761 set(NetworkProcess_LIBRARIES
762     WebKit2
763 )
764
765 set(DatabaseProcess_LIBRARIES
766     WebKit2
767 )
768
769 if (APPLE)
770     set(WebKit2_LIBRARIES
771         PRIVATE WebCore
772         PUBLIC JavaScriptCore
773     )
774 else ()
775     set(WebKit2_LIBRARIES
776         JavaScriptCore
777         WebCore
778     )
779 endif ()
780
781 set(PluginProcess_LIBRARIES
782     WebKit2
783 )
784
785 if (WIN32 AND INTERNAL_BUILD)
786     set(JavaScriptCore_SCRIPTS_DIR "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore/Scripts")
787 else ()
788     set(JavaScriptCore_SCRIPTS_DIR "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/Scripts")
789 endif ()
790
791 # librt is needed for shm_open on Linux.
792 find_library(LIBRT_LIBRARIES NAMES rt)
793 mark_as_advanced(LIBRT_LIBRARIES)
794 if (LIBRT_LIBRARIES)
795     list(APPEND WebKit2_LIBRARIES ${LIBRT_LIBRARIES})
796 endif ()
797
798 macro(ADD_WEBKIT2_PREFIX_HEADER _target)
799     if (WebKit2_USE_PREFIX_HEADER)
800         get_target_property(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
801         if (${OLD_COMPILE_FLAGS} STREQUAL "OLD_COMPILE_FLAGS-NOTFOUND")
802             set(OLD_COMPILE_FLAGS "")
803         endif ()
804         set_target_properties(${_target} PROPERTIES COMPILE_FLAGS "${OLD_COMPILE_FLAGS} -include ${WEBKIT2_DIR}/WebKit2Prefix.h")
805     endif ()
806 endmacro()
807
808 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
809
810 GENERATE_WEBKIT2_MESSAGE_SOURCES(WebKit2_DERIVED_SOURCES "${WebKit2_MESSAGES_IN_FILES}")
811
812 set(WebKit2_AUTOMATION_PROTOCOL_GENERATOR_SCRIPTS
813     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py
814     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/cpp_generator.py
815     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/cpp_generator_templates.py
816     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_header.py
817     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_implementation.py
818     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_header.py
819     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_implementation.py
820     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generator.py
821     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generator_templates.py
822     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/models.py
823 )
824
825 set(WebKit2_AUTOMATION_PROTOCOL_GENERATOR_INPUTS
826     ${WEBKIT2_DIR}/UIProcess/Automation/Automation.json
827 )
828
829 add_custom_command(
830     OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationBackendDispatchers.h ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationBackendDispatchers.cpp ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationProtocolObjects.h ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationProtocolObjects.cpp
831     MAIN_DEPENDENCY ${WebKit2_AUTOMATION_PROTOCOL_GENERATOR_INPUTS}
832     DEPENDS ${WebKit2_AUTOMATION_PROTOCOL_GENERATOR_SCRIPTS}
833     COMMAND ${PYTHON_EXECUTABLE} ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py --outputDir "${DERIVED_SOURCES_WEBKIT2_DIR}" --framework WebKit --backend ${WebKit2_AUTOMATION_PROTOCOL_GENERATOR_INPUTS}
834     VERBATIM)
835
836 list(APPEND WebKit2_HEADERS
837     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationBackendDispatchers.h
838     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationProtocolObjects.h
839 )
840
841 list(APPEND WebKit2_SOURCES
842     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationBackendDispatchers.cpp
843     ${DERIVED_SOURCES_WEBKIT2_DIR}/AutomationProtocolObjects.cpp
844 )
845
846 add_custom_command(
847     OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxyScriptSource.h ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js
848     MAIN_DEPENDENCY ${WEBKIT2_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js
849     DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py
850     COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__InjectedScript_WebAutomationSessionProxy.js" > ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js
851     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${WEBKIT2_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js >> ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js
852     COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl WebAutomationSessionProxyScriptSource ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxyScriptSource.h
853     VERBATIM)
854
855 list(APPEND WebKit2_HEADERS
856     ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxyScriptSource.h
857 )
858
859 list(APPEND WebKit2_SOURCES ${WebKit2_DERIVED_SOURCES})
860
861 WEBKIT_FRAMEWORK(WebKit2)
862 add_dependencies(WebKit2 WebCore ${WEBKIT2_EXTRA_DEPENDENCIES})
863 add_webkit2_prefix_header(WebKit2)
864
865 if (NOT APPLE)
866     target_link_libraries(WebKit2 -Wl,--start-group WebCore WebCoreDerivedSources -Wl,--end-group)
867 endif ()
868
869 # Suppress unused parameter warnings for sources in WebKit2.
870 ADD_TARGET_PROPERTIES(WebKit2 COMPILE_FLAGS "-Wno-unused-parameter")
871
872 if (WebKit2_VERSION_SCRIPT)
873     ADD_TARGET_PROPERTIES(WebKit2 LINK_FLAGS "${WebKit2_VERSION_SCRIPT}")
874 endif ()
875
876 add_executable(WebProcess ${WebProcess_SOURCES})
877 add_webkit2_prefix_header(WebProcess)
878 target_link_libraries(WebProcess ${WebProcess_LIBRARIES})
879
880 if (WebKit2_WebProcess_OUTPUT_NAME)
881     set_target_properties(WebProcess PROPERTIES OUTPUT_NAME ${WebKit2_WebProcess_OUTPUT_NAME})
882 endif ()
883
884 add_executable(NetworkProcess ${NetworkProcess_SOURCES})
885 add_webkit2_prefix_header(NetworkProcess)
886 target_link_libraries(NetworkProcess ${NetworkProcess_LIBRARIES})
887
888 if (WebKit2_NetworkProcess_OUTPUT_NAME)
889     set_target_properties(NetworkProcess PROPERTIES OUTPUT_NAME ${WebKit2_NetworkProcess_OUTPUT_NAME})
890 endif ()
891
892 if (ENABLE_PLUGIN_PROCESS AND NOT "${PORT}" STREQUAL "Mac")
893     add_definitions(-DENABLE_PLUGIN_PROCESS=1)
894     add_executable(PluginProcess ${PluginProcess_SOURCES})
895     add_webkit2_prefix_header(PluginProcess)
896     target_link_libraries(PluginProcess ${PluginProcess_LIBRARIES})
897     install(TARGETS PluginProcess DESTINATION "${LIBEXEC_INSTALL_DIR}")
898
899     if (WebKit2_PluginProcess_OUTPUT_NAME)
900       set_target_properties(PluginProcess PROPERTIES OUTPUT_NAME ${WebKit2_PluginProcess_OUTPUT_NAME})
901     endif ()
902 endif ()
903
904 if (ENABLE_DATABASE_PROCESS AND NOT "${PORT}" STREQUAL "Mac")
905     add_definitions(-DENABLE_DATABASE_PROCESS=1)
906     add_executable(DatabaseProcess ${DatabaseProcess_SOURCES})
907     add_webkit2_prefix_header(DatabaseProcess)
908     target_link_libraries(DatabaseProcess ${DatabaseProcess_LIBRARIES})
909     install(TARGETS DatabaseProcess DESTINATION "${LIBEXEC_INSTALL_DIR}")
910
911     if (WebKit2_DatabaseProcess_OUTPUT_NAME)
912         set_target_properties(DatabaseProcess PROPERTIES OUTPUT_NAME ${WebKit2_DatabaseProcess_OUTPUT_NAME})
913     endif ()
914 endif ()
915
916 if ("${PORT}" STREQUAL "Mac")
917     set(_web_xpc_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/XPCServices/com.apple.WebKit.WebContent.Development.xpc/Contents)
918     make_directory(${_web_xpc_dir}/MacOS)
919     make_directory(${_web_xpc_dir}/Resources)
920     make_directory(${_web_xpc_dir}/_CodeSignature)
921
922     add_custom_target(WebContentProcessNib COMMAND
923         ibtool --compile ${_web_xpc_dir}/Resources/WebContentProcess.nib ${WEBKIT2_DIR}/Resources/WebContentProcess.xib
924         VERBATIM)
925     add_dependencies(WebKit2 WebContentProcessNib)
926
927     # FIXME: This shouldn't be two operations.
928     file(COPY ${WEBKIT2_DIR}/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist DESTINATION ${_web_xpc_dir})
929     file(RENAME ${_web_xpc_dir}/Info-OSX.plist ${_web_xpc_dir}/Info.plist)
930
931     set_target_properties(WebProcess PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${_web_xpc_dir}/MacOS")
932
933
934     set(_net_xpc_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/XPCServices/com.apple.WebKit.Networking.Development.xpc/Contents)
935     make_directory(${_net_xpc_dir}/MacOS)
936     make_directory(${_net_xpc_dir}/_CodeSignature)
937
938     # FIXME: This shouldn't be two operations.
939     file(COPY ${WEBKIT2_DIR}/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist DESTINATION ${_net_xpc_dir})
940     file(RENAME ${_net_xpc_dir}/Info-OSX.plist ${_net_xpc_dir}/Info.plist)
941
942     set_target_properties(NetworkProcess PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${_net_xpc_dir}/MacOS")
943 else ()
944     POPULATE_LIBRARY_VERSION(WEBKIT2)
945     set_target_properties(WebKit2 PROPERTIES VERSION ${WEBKIT2_VERSION} SOVERSION ${WEBKIT2_VERSION_MAJOR})
946
947     install(TARGETS WebKit2 WebProcess NetworkProcess
948         LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
949         RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}"
950     )
951 endif ()