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