[GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
[WebKit-https.git] / Source / WebKit / PlatformGTK.cmake
1 include(InspectorGResources.cmake)
2
3 set(WebKit_OUTPUT_NAME webkit2gtk-${WEBKITGTK_API_VERSION})
4 set(WebKit_WebProcess_OUTPUT_NAME WebKitWebProcess)
5 set(WebKit_NetworkProcess_OUTPUT_NAME WebKitNetworkProcess)
6 set(WebKit_PluginProcess_OUTPUT_NAME WebKitPluginProcess)
7
8 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR})
9 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_DIR})
10 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR})
11
12 configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h)
13 configure_file(gtk/webkit2gtk.pc.in ${WebKit2_PKGCONFIG_FILE} @ONLY)
14 configure_file(gtk/webkit2gtk-web-extension.pc.in ${WebKit2WebExtension_PKGCONFIG_FILE} @ONLY)
15
16 add_definitions(-DBUILDING_WEBKIT)
17 add_definitions(-DWEBKIT2_COMPILATION)
18 add_definitions(-DWEBKIT_DOM_USE_UNSTABLE_API)
19
20 add_definitions(-DPKGLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
21 add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
22 add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
23 add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
24
25 if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
26     WEBKIT_ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/webkitglib-symbols.map")
27 endif ()
28
29 set(WebKit_USE_PREFIX_HEADER ON)
30
31 list(APPEND WebKit_UNIFIED_SOURCE_LIST_FILES
32     "SourcesGTK.txt"
33 )
34
35 list(APPEND WebKit_MESSAGES_IN_FILES
36     NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in
37
38     UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in
39 )
40
41 list(APPEND WebKit_DERIVED_SOURCES
42     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
43     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.c
44
45     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
46     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.cpp
47 )
48
49 if (ENABLE_WAYLAND_TARGET)
50     list(APPEND WebKit_DERIVED_SOURCES
51         ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandClientProtocol.c
52     )
53 endif ()
54
55 set(WebKit2GTK_INSTALLED_HEADERS
56     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
57     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h
58     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitApplicationInfo.h
59     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitAuthenticationRequest.h
60     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitAutocleanups.h
61     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitAutomationSession.h
62     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitBackForwardList.h
63     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitBackForwardListItem.h
64     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitColorChooserRequest.h
65     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitCredential.h
66     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
67     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
68     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
69     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitCookieManager.h
70     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitDefines.h
71     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitDeviceInfoPermissionRequest.h
72     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitDownload.h
73     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEditingCommands.h
74     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEditorState.h
75     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitError.h
76     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitFaviconDatabase.h
77     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitFileChooserRequest.h
78     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitFindController.h
79     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitFormSubmissionRequest.h
80     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitForwardDeclarations.h
81     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
82     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
83     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.h
84     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitJavascriptResult.h
85     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitMimeInfo.h
86     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitNavigationAction.h
87     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
88     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitNetworkProxySettings.h
89     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitNotificationPermissionRequest.h
90     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitNotification.h
91     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitOptionMenu.h
92     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitOptionMenuItem.h
93     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitPermissionRequest.h
94     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitPlugin.h
95     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitPolicyDecision.h
96     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitPrintCustomWidget.h
97     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitPrintOperation.h
98     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitResponsePolicyDecision.h
99     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitScriptDialog.h
100     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitSecurityManager.h
101     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitSecurityOrigin.h
102     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitSettings.h
103     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
104     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
105     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURISchemeRequest.h
106     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIUtilities.h
107     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitUserContent.h
108     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitUserContentManager.h
109     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h
110     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebContext.h
111     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebInspector.h
112     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebResource.h
113     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebView.h
114     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebViewBase.h
115     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebViewSessionState.h
116     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebsiteData.h
117     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebsiteDataManager.h
118     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWindowProperties.h
119     ${WEBKIT_DIR}/UIProcess/API/gtk/webkit2.h
120 )
121
122 set(WebKit2WebExtension_INSTALLED_HEADERS
123     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.h
124     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.h
125     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitFrame.h
126     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h
127     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.h
128     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h
129     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionAutocleanups.h
130     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.h
131     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
132     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
133 )
134
135 set(WebKitDOM_INSTALLED_HEADERS
136     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h
137     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h
138     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h
139     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h
140     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h
141     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h
142     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h
143     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h
144     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h
145     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h
146     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h
147     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h
148     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h
149     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h
150     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h
151     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCustom.h
152     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCustomUnstable.h
153     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.h
154     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h
155     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentUnstable.h
156     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h
157     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h
158     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentUnstable.h
159     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h
160     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h
161     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h
162     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h
163     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowUnstable.h
164     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h
165     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementUnstable.h
166     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h
167     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h
168     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h
169     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h
170     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h
171     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h
172     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h
173     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h
174     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h
175     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h
176     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h
177     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h
178     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h
179     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h
180     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h
181     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h
182     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h
183     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h
184     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementUnstable.h
185     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h
186     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h
187     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h
188     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h
189     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h
190     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h
191     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h
192     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h
193     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h
194     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h
195     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h
196     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h
197     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h
198     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h
199     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h
200     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h
201     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h
202     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h
203     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h
204     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h
205     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h
206     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h
207     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h
208     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h
209     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h
210     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h
211     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h
212     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h
213     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h
214     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h
215     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h
216     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h
217     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h
218     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h
219     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h
220     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h
221     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h
222     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h
223     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h
224     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h
225     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h
226     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h
227     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h
228     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h
229     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h
230     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h
231     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h
232     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.h
233     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h
234     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h
235     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h
236     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h
237     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h
238     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h
239     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRangeUnstable.h
240     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h
241     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h
242     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h
243     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h
244     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h
245     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h
246     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h
247     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.h
248     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h
249 )
250
251 set(WebKitDOM_GTKDOC_HEADERS
252     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h
253     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h
254     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h
255     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h
256     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h
257     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h
258     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h
259     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h
260     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h
261     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h
262     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h
263     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h
264     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCustom.h
265     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.h
266     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h
267     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h
268     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h
269     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h
270     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h
271     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h
272     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h
273     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h
274     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h
275     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h
276     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h
277     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h
278     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h
279     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h
280     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h
281     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h
282     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h
283     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h
284     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h
285     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h
286     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h
287     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h
288     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h
289     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h
290     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h
291     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h
292     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h
293     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h
294     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h
295     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h
296     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h
297     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h
298     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h
299     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h
300     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h
301     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h
302     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h
303     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h
304     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h
305     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h
306     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h
307     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h
308     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h
309     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h
310     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h
311     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h
312     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h
313     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h
314     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h
315     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h
316     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h
317     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h
318     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h
319     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h
320     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h
321     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h
322     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h
323     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h
324     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h
325     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h
326     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h
327     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h
328     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h
329     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h
330     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h
331     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h
332     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h
333     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h
334     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h
335     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h
336     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h
337     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h
338     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h
339     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.h
340     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h
341     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h
342     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h
343     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h
344     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h
345     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h
346     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h
347     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h
348     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h
349     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h
350     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h
351     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h
352     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h
353     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.h
354     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h
355 )
356
357 # This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore.
358 list(INSERT WebKit_INCLUDE_DIRECTORIES 0
359     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
360     "${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}"
361     "${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}"
362     "${DERIVED_SOURCES_WEBKIT2GTK_DIR}"
363 )
364
365 list(APPEND WebKit_INCLUDE_DIRECTORIES
366     "${DERIVED_SOURCES_JAVASCRIPCOREGTK_DIR}"
367     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/"
368     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib"
369     "${WEBKIT_DIR}/PluginProcess/unix"
370     "${WEBKIT_DIR}/NetworkProcess/CustomProtocols/soup"
371     "${WEBKIT_DIR}/NetworkProcess/gtk"
372     "${WEBKIT_DIR}/NetworkProcess/soup"
373     "${WEBKIT_DIR}/NetworkProcess/unix"
374     "${WEBKIT_DIR}/Platform/IPC/glib"
375     "${WEBKIT_DIR}/Platform/IPC/unix"
376     "${WEBKIT_DIR}/Platform/classifier"
377     "${WEBKIT_DIR}/Shared/API/c/gtk"
378     "${WEBKIT_DIR}/Shared/API/glib"
379     "${WEBKIT_DIR}/Shared/CoordinatedGraphics"
380     "${WEBKIT_DIR}/Shared/CoordinatedGraphics/threadedcompositor"
381     "${WEBKIT_DIR}/Shared/Plugins/unix"
382     "${WEBKIT_DIR}/Shared/glib"
383     "${WEBKIT_DIR}/Shared/gtk"
384     "${WEBKIT_DIR}/Shared/linux"
385     "${WEBKIT_DIR}/Shared/soup"
386     "${WEBKIT_DIR}/Shared/unix"
387     "${WEBKIT_DIR}/UIProcess/API/C/cairo"
388     "${WEBKIT_DIR}/UIProcess/API/C/gtk"
389     "${WEBKIT_DIR}/UIProcess/API/glib"
390     "${WEBKIT_DIR}/UIProcess/API/gtk"
391     "${WEBKIT_DIR}/UIProcess/Network/CustomProtocols/soup"
392     "${WEBKIT_DIR}/UIProcess/Plugins/gtk"
393     "${WEBKIT_DIR}/UIProcess/glib"
394     "${WEBKIT_DIR}/UIProcess/gstreamer"
395     "${WEBKIT_DIR}/UIProcess/gtk"
396     "${WEBKIT_DIR}/UIProcess/linux"
397     "${WEBKIT_DIR}/UIProcess/soup"
398     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib"
399     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/DOM"
400     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk"
401     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM"
402     "${WEBKIT_DIR}/WebProcess/Plugins/Netscape/unix"
403     "${WEBKIT_DIR}/WebProcess/Plugins/Netscape/x11"
404     "${WEBKIT_DIR}/WebProcess/gtk"
405     "${WEBKIT_DIR}/WebProcess/soup"
406     "${WEBKIT_DIR}/WebProcess/unix"
407     "${WEBKIT_DIR}/WebProcess/WebCoreSupport/gtk"
408     "${WEBKIT_DIR}/WebProcess/WebCoreSupport/soup"
409     "${WEBKIT_DIR}/WebProcess/WebPage/CoordinatedGraphics"
410     "${WEBKIT_DIR}/WebProcess/WebPage/atk"
411     "${WEBKIT_DIR}/WebProcess/WebPage/gtk"
412 )
413
414 list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
415     ${CAIRO_INCLUDE_DIRS}
416     ${ENCHANT_INCLUDE_DIRS}
417     ${GSTREAMER_INCLUDE_DIRS}
418     ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
419     ${HARFBUZZ_INCLUDE_DIRS}
420     ${LIBSOUP_INCLUDE_DIRS}
421 )
422
423 if (USE_LIBNOTIFY)
424 list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
425     ${LIBNOTIFY_INCLUDE_DIRS}
426 )
427 endif ()
428
429 set(WebKitCommonIncludeDirectories ${WebKit_INCLUDE_DIRECTORIES})
430 set(WebKitCommonSystemIncludeDirectories ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
431
432 list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
433     ${GLIB_INCLUDE_DIRS}
434     ${GTK_INCLUDE_DIRS}
435     ${GTK_UNIX_PRINT_INCLUDE_DIRS}
436 )
437
438 list(APPEND WebProcess_SOURCES
439     WebProcess/EntryPoint/unix/WebProcessMain.cpp
440 )
441
442 list(APPEND NetworkProcess_SOURCES
443     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
444 )
445
446 set(SharedWebKitLibraries
447     ${WebKit_LIBRARIES}
448 )
449
450 list(APPEND WebKit_LIBRARIES
451     PRIVATE
452         WebCorePlatformGTK
453         ${GTK_UNIX_PRINT_LIBRARIES}
454 )
455
456 # WebCore should be specifed before and after WebCorePlatformGTK
457 list(APPEND WebKit_LIBRARIES PRIVATE WebCore)
458
459 if (LIBNOTIFY_FOUND)
460 list(APPEND WebKit_LIBRARIES
461     PRIVATE ${LIBNOTIFY_LIBRARIES}
462 )
463 endif ()
464
465 if (USE_LIBWEBRTC)
466 list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
467     "${THIRDPARTY_DIR}/libwebrtc/Source/"
468     "${THIRDPARTY_DIR}/libwebrtc/Source/webrtc"
469 )
470 endif ()
471
472 # To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
473 set(WebKit2GTK_ENUM_GENERATION_HEADERS ${WebKit2GTK_INSTALLED_HEADERS})
474 list(REMOVE_ITEM WebKit2GTK_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h)
475 add_custom_command(
476     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
477            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
478     DEPENDS ${WebKit2GTK_ENUM_GENERATION_HEADERS}
479
480     COMMAND glib-mkenums --template ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypes.h.template ${WebKit2GTK_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
481
482     COMMAND glib-mkenums --template ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypes.cpp.template ${WebKit2GTK_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
483     VERBATIM
484 )
485
486 set(WebKit2GTK_WEB_PROCESS_ENUM_GENERATION_HEADERS ${WebKit2WebExtension_INSTALLED_HEADERS})
487 list(REMOVE_ITEM WebKit2GTK_WEB_PROCESS_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.h)
488 add_custom_command(
489     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.h
490            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.cpp
491     DEPENDS ${WebKit2GTK_WEB_PROCESS_ENUM_GENERATION_HEADERS}
492
493     COMMAND glib-mkenums --template ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.h.template ${WebKit2GTK_WEB_PROCESS_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.h
494
495     COMMAND glib-mkenums --template ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.cpp.template ${WebKit2GTK_WEB_PROCESS_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.cpp
496     VERBATIM
497 )
498
499 WEBKIT_BUILD_INSPECTOR_GRESOURCES(${DERIVED_SOURCES_WEBKIT2GTK_DIR})
500
501 set(WebKitResources
502     "        <file alias=\"images/missingImage\">missingImage.png</file>\n"
503     "        <file alias=\"images/missingImage@2x\">missingImage@2x.png</file>\n"
504     "        <file alias=\"images/panIcon\">panIcon.png</file>\n"
505     "        <file alias=\"images/textAreaResizeCorner\">textAreaResizeCorner.png</file>\n"
506     "        <file alias=\"images/textAreaResizeCorner@2x\">textAreaResizeCorner@2x.png</file>\n"
507 )
508
509 if (ENABLE_ICONDATABASE)
510     list(APPEND WebKitResources
511         "        <file alias=\"images/urlIcon\">urlIcon.png</file>\n"
512     )
513 endif ()
514
515 if (ENABLE_WEB_AUDIO)
516     list(APPEND WebKitResources
517         "        <file alias=\"audio/Composite\">Composite.wav</file>\n"
518     )
519 endif ()
520
521 file(WRITE ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.xml
522     "<?xml version=1.0 encoding=UTF-8?>\n"
523     "<gresources>\n"
524     "    <gresource prefix=\"/org/webkitgtk/resources\">\n"
525     ${WebKitResources}
526     "    </gresource>\n"
527     "</gresources>\n"
528 )
529
530 add_custom_command(
531     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.c
532     DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.xml
533     COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.xml
534     VERBATIM
535 )
536
537 if (ENABLE_WAYLAND_TARGET)
538     # Wayland protocol extension.
539     add_custom_command(
540         OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandClientProtocol.c
541         DEPENDS ${WEBKIT_DIR}/Shared/gtk/WebKitWaylandProtocol.xml
542         COMMAND wayland-scanner server-header < ${WEBKIT_DIR}/Shared/gtk/WebKitWaylandProtocol.xml > ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandServerProtocol.h
543         COMMAND wayland-scanner client-header < ${WEBKIT_DIR}/Shared/gtk/WebKitWaylandProtocol.xml > ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandClientProtocol.h
544         COMMAND wayland-scanner code < ${WEBKIT_DIR}/Shared/gtk/WebKitWaylandProtocol.xml > ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandClientProtocol.c
545     )
546 endif ()
547
548 if (ENABLE_PLUGIN_PROCESS_GTK2)
549     set(PluginProcessGTK2_EXECUTABLE_NAME WebKitPluginProcess2)
550
551     # FIXME: We should remove WebKitPluginProcess2 in 2020, once Flash is no longer supported.
552     list(APPEND PluginProcessGTK2_SOURCES
553         Platform/Logging.cpp
554         Platform/Module.cpp
555
556         Platform/IPC/ArgumentCoders.cpp
557         Platform/IPC/Attachment.cpp
558         Platform/IPC/Connection.cpp
559         Platform/IPC/DataReference.cpp
560         Platform/IPC/Decoder.cpp
561         Platform/IPC/Encoder.cpp
562         Platform/IPC/MessageReceiverMap.cpp
563         Platform/IPC/MessageSender.cpp
564         Platform/IPC/StringReference.cpp
565
566         Platform/IPC/glib/GSocketMonitor.cpp
567         Platform/IPC/unix/AttachmentUnix.cpp
568         Platform/IPC/unix/ConnectionUnix.cpp
569
570         Platform/glib/ModuleGlib.cpp
571
572         Platform/unix/LoggingUnix.cpp
573         Platform/unix/SharedMemoryUnix.cpp
574
575         PluginProcess/PluginControllerProxy.cpp
576         PluginProcess/PluginCreationParameters.cpp
577         PluginProcess/PluginProcess.cpp
578         PluginProcess/WebProcessConnection.cpp
579
580         PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
581
582         PluginProcess/unix/PluginControllerProxyUnix.cpp
583         PluginProcess/unix/PluginProcessMainUnix.cpp
584         PluginProcess/unix/PluginProcessUnix.cpp
585
586         Shared/ActivityAssertion.cpp
587         Shared/BlobDataFileReferenceWithSandboxExtension.cpp
588         Shared/ChildProcess.cpp
589         Shared/ShareableBitmap.cpp
590         Shared/WebCoreArgumentCoders.cpp
591         Shared/WebEvent.cpp
592         Shared/WebKeyboardEvent.cpp
593         Shared/WebKit2Initialize.cpp
594         Shared/WebMouseEvent.cpp
595         Shared/WebPlatformTouchPoint.cpp
596         Shared/WebTouchEvent.cpp
597         Shared/WebWheelEvent.cpp
598
599         Shared/Plugins/NPIdentifierData.cpp
600         Shared/Plugins/NPObjectMessageReceiver.cpp
601         Shared/Plugins/NPObjectProxy.cpp
602         Shared/Plugins/NPRemoteObjectMap.cpp
603         Shared/Plugins/NPVariantData.cpp
604         Shared/Plugins/PluginProcessCreationParameters.cpp
605
606         Shared/Plugins/Netscape/NetscapePluginModule.cpp
607         Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp
608
609         Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp
610
611         Shared/cairo/ShareableBitmapCairo.cpp
612
613         Shared/glib/ProcessExecutablePathGLib.cpp
614
615         Shared/gtk/NativeWebKeyboardEventGtk.cpp
616         Shared/gtk/NativeWebMouseEventGtk.cpp
617         Shared/gtk/NativeWebTouchEventGtk.cpp
618         Shared/gtk/NativeWebWheelEventGtk.cpp
619         Shared/gtk/WebEventFactory.cpp
620
621         Shared/soup/WebCoreArgumentCodersSoup.cpp
622
623         Shared/unix/ChildProcessMain.cpp
624
625         UIProcess/Launcher/ProcessLauncher.cpp
626
627         UIProcess/Launcher/glib/BubblewrapLauncher.cpp
628         UIProcess/Launcher/glib/FlatpakLauncher.cpp
629         UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
630
631         UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
632
633         WebProcess/Plugins/Plugin.cpp
634
635         WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp
636         WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
637         WebProcess/Plugins/Netscape/NetscapePlugin.cpp
638         WebProcess/Plugins/Netscape/NetscapePluginNone.cpp
639         WebProcess/Plugins/Netscape/NetscapePluginStream.cpp
640
641         WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp
642         WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
643
644         ${DERIVED_SOURCES_WEBKIT_DIR}/PluginControllerProxyMessageReceiver.cpp
645         ${DERIVED_SOURCES_WEBKIT_DIR}/PluginProcessMessageReceiver.cpp
646         ${DERIVED_SOURCES_WEBKIT_DIR}/WebProcessConnectionMessageReceiver.cpp
647         ${DERIVED_SOURCES_WEBKIT_DIR}/NPObjectMessageReceiverMessageReceiver.cpp
648         ${DERIVED_SOURCES_WEBKIT_DIR}/ChildProcessMessageReceiver.cpp
649     )
650
651     add_executable(WebKitPluginProcess2 ${PluginProcessGTK2_SOURCES})
652     ADD_WEBKIT_PREFIX_HEADER(WebKitPluginProcess2)
653
654     # We need ENABLE_PLUGIN_PROCESS for all targets in this directory, but
655     # we only want GTK_API_VERSION_2 for the plugin process target.
656     set_property(
657         TARGET WebKitPluginProcess2
658         APPEND
659         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
660     )
661     target_include_directories(WebKitPluginProcess2 PRIVATE
662         ${WebKitCommonIncludeDirectories}
663     )
664     target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE
665          ${WebKitCommonSystemIncludeDirectories}
666          ${GTK2_INCLUDE_DIRS}
667          ${GDK2_INCLUDE_DIRS}
668     )
669
670     set(WebKitPluginProcess2_LIBRARIES
671         ${SharedWebKitLibraries}
672         PRIVATE WebCorePlatformGTK2
673     )
674     ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKitPluginProcess2_LIBRARIES)
675     target_link_libraries(WebKitPluginProcess2 ${WebKitPluginProcess2_LIBRARIES})
676
677     add_dependencies(WebKitPluginProcess2 WebKit)
678
679     install(TARGETS WebKitPluginProcess2 DESTINATION "${LIBEXEC_INSTALL_DIR}")
680
681     if (COMPILER_IS_GCC_OR_CLANG)
682         WEBKIT_ADD_TARGET_CXX_FLAGS(WebKitPluginProcess2 -Wno-unused-parameter)
683     endif ()
684 endif () # ENABLE_PLUGIN_PROCESS_GTK2
685
686 # GTK3 PluginProcess
687 list(APPEND PluginProcess_SOURCES
688     PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
689 )
690
691 # Commands for building the built-in injected bundle.
692 add_library(webkit2gtkinjectedbundle MODULE "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp")
693 ADD_WEBKIT_PREFIX_HEADER(webkit2gtkinjectedbundle)
694 target_link_libraries(webkit2gtkinjectedbundle WebKit)
695
696 target_include_directories(webkit2gtkinjectedbundle PRIVATE
697     ${WebKit_INCLUDE_DIRECTORIES}
698     "${DERIVED_SOURCES_DIR}/InjectedBundle"
699     "${FORWARDING_HEADERS_DIR}"
700     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
701     "${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}"
702 )
703
704 target_include_directories(webkit2gtkinjectedbundle SYSTEM PRIVATE
705     ${WebKit_SYSTEM_INCLUDE_DIRECTORIES}
706 )
707
708 if (COMPILER_IS_GCC_OR_CLANG)
709     WEBKIT_ADD_TARGET_CXX_FLAGS(webkit2gtkinjectedbundle -Wno-unused-parameter)
710 endif ()
711
712 # Add ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} to LD_LIBRARY_PATH or DYLD_LIBRARY_PATH
713 if (APPLE)
714     set(LOADER_LIBRARY_PATH_VAR "DYLD_LIBRARY_PATH")
715     set(PREV_LOADER_LIBRARY_PATH "$ENV{DYLD_LIBRARY_PATH}")
716 else ()
717     set(LOADER_LIBRARY_PATH_VAR "LD_LIBRARY_PATH")
718     set(PREV_LOADER_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}")
719 endif ()
720
721 if (ENABLE_INTROSPECTION)
722     string(COMPARE EQUAL "${PREV_LOADER_LIBRARY_PATH}" "" ld_library_path_does_not_exist)
723     if (ld_library_path_does_not_exist)
724         set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH
725             "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
726         )
727     else ()
728         set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH
729             "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:${PREV_LOADER_LIBRARY_PATH}"
730         )
731     endif ()
732
733     # Add required -L flags from ${CMAKE_SHARED_LINKER_FLAGS} for g-ir-scanner
734     string(REGEX MATCHALL "-L[^ ]*"
735         INTROSPECTION_ADDITIONAL_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
736
737     add_custom_command(
738         OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
739         DEPENDS WebKit
740         DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
741         COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
742             ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
743             ${INTROSPECTION_SCANNER}
744             --quiet
745             --warn-all
746             --symbol-prefix=webkit
747             --identifier-prefix=WebKit
748             --namespace=WebKit2
749             --nsversion=${WEBKITGTK_API_VERSION}
750             --include=GObject-2.0
751             --include=Gtk-3.0
752             --include=Soup-2.4
753             --include-uninstalled=${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
754             --library=webkit2gtk-${WEBKITGTK_API_VERSION}
755             --library=javascriptcoregtk-${WEBKITGTK_API_VERSION}
756             -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
757             ${INTROSPECTION_ADDITIONAL_LINKER_FLAGS}
758             --no-libtool
759             --pkg=gobject-2.0
760             --pkg=gtk+-3.0
761             --pkg=libsoup-2.4
762             --pkg-export=webkit2gtk-${WEBKITGTK_API_VERSION}
763             --output=${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
764             --c-include="webkit2/webkit2.h"
765             -DBUILDING_WEBKIT
766             -DWEBKIT2_COMPILATION
767             -I${CMAKE_SOURCE_DIR}/Source
768             -I${WEBKIT_DIR}
769             -I${DERIVED_SOURCES_DIR}
770             -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}
771             -I${DERIVED_SOURCES_JAVASCRIPCOREGTK_DIR}
772             -I${FORWARDING_HEADERS_DIR}
773             -I${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib
774             -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
775             ${WebKit2GTK_INSTALLED_HEADERS}
776             ${WEBKIT_DIR}/Shared/API/glib/*.cpp
777             ${WEBKIT_DIR}/UIProcess/API/glib/*.cpp
778             ${WEBKIT_DIR}/UIProcess/API/gtk/*.cpp
779     )
780
781     add_custom_command(
782         OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
783         DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
784         DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
785         COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
786             LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
787             ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
788             ${INTROSPECTION_SCANNER}
789             --quiet
790             --warn-all
791             --symbol-prefix=webkit
792             --identifier-prefix=WebKit
793             --namespace=WebKit2WebExtension
794             --nsversion=${WEBKITGTK_API_VERSION}
795             --include=GObject-2.0
796             --include=Gtk-3.0
797             --include=Soup-2.4
798             --include-uninstalled=${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
799             --library=webkit2gtk-${WEBKITGTK_API_VERSION}
800             --library=javascriptcoregtk-${WEBKITGTK_API_VERSION}
801             ${INTROSPECTION_ADDITIONAL_LIBRARIES}
802             -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
803             ${INTROSPECTION_ADDITIONAL_LINKER_FLAGS}
804             --no-libtool
805             --pkg=gobject-2.0
806             --pkg=gtk+-3.0
807             --pkg=libsoup-2.4
808             --pkg-export=webkit2gtk-web-extension-${WEBKITGTK_API_VERSION}
809             --output=${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
810             --c-include="webkit2/webkit-web-extension.h"
811             -DBUILDING_WEBKIT
812             -DWEBKIT2_COMPILATION
813             -I${CMAKE_SOURCE_DIR}/Source
814             -I${WEBKIT_DIR}
815             -I${DERIVED_SOURCES_DIR}
816             -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}
817             -I${DERIVED_SOURCES_JAVASCRIPCOREGTK_DIR}
818             -I${FORWARDING_HEADERS_DIR}
819             -I${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib
820             -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
821             -I${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}
822             -I${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk
823             ${WebKitDOM_INSTALLED_HEADERS}
824             ${WebKit2WebExtension_INSTALLED_HEADERS}
825             ${WEBKIT_DIR}/Shared/API/glib/WebKitContextMenu.cpp
826             ${WEBKIT_DIR}/Shared/API/glib/WebKitContextMenuItem.cpp
827             ${WEBKIT_DIR}/Shared/API/glib/WebKitHitTestResult.cpp
828             ${WEBKIT_DIR}/Shared/API/glib/WebKitURIRequest.cpp
829             ${WEBKIT_DIR}/Shared/API/glib/WebKitURIResponse.cpp
830             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
831             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
832             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
833             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
834             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
835             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
836             ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/*.cpp
837             ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/DOM/*.cpp
838     )
839
840     add_custom_command(
841         OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
842         DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
843         COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
844     )
845
846     add_custom_command(
847         OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
848         DEPENDS ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
849         COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
850     )
851
852     ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib)
853     ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib)
854 endif ()
855
856 install(TARGETS webkit2gtkinjectedbundle
857         DESTINATION "${LIB_INSTALL_DIR}/webkit2gtk-${WEBKITGTK_API_VERSION}/injected-bundle"
858 )
859 install(FILES "${CMAKE_BINARY_DIR}/Source/WebKit/webkit2gtk-${WEBKITGTK_API_VERSION}.pc"
860               "${CMAKE_BINARY_DIR}/Source/WebKit/webkit2gtk-web-extension-${WEBKITGTK_API_VERSION}.pc"
861         DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
862 )
863 install(FILES ${WebKit2GTK_INSTALLED_HEADERS}
864               ${WebKit2WebExtension_INSTALLED_HEADERS}
865         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkit2"
866 )
867 install(FILES ${WebKitDOM_INSTALLED_HEADERS}
868         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
869 )
870
871 if (ENABLE_INTROSPECTION)
872     install(FILES ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
873                   ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
874             DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
875     )
876     install(FILES ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
877                   ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
878             DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
879     )
880 endif ()
881
882 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkit2gtk.cfg
883     "[webkit2gtk-${WEBKITGTK_API_VERSION}]\n"
884     "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
885     "decorator=WEBKIT_API|WEBKIT_DEPRECATED|WEBKIT_DEPRECATED_FOR\\(.+\\)\n"
886     "deprecation_guard=WEBKIT_DISABLE_DEPRECATED\n"
887     "namespace=webkit\n"
888     "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
889     "       -I${WEBKIT_DIR}/Shared/API/glib\n"
890     "       -I${WEBKIT_DIR}/UIProcess/API/glib\n"
891     "       -I${WEBKIT_DIR}/UIProcess/API/gtk\n"
892     "       -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}\n"
893     "       -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}\n"
894     "doc_dir=${WEBKIT_DIR}/UIProcess/API/gtk/docs\n"
895     "source_dirs=${WEBKIT_DIR}/Shared/API/glib\n"
896     "            ${WEBKIT_DIR}/UIProcess/API/glib\n"
897     "            ${WEBKIT_DIR}/UIProcess/API/gtk\n"
898     "            ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib\n"
899     "            ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk\n"
900     "            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}\n"
901     "headers=${WebKit2GTK_ENUM_GENERATION_HEADERS} ${WebKit2WebExtension_INSTALLED_HEADERS}\n"
902     "main_sgml_file=webkit2gtk-docs.sgml\n"
903 )
904
905 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkitdom.cfg
906     "[webkitdomgtk-${WEBKITGTK_API_VERSION}]\n"
907     "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
908     "decorator=WEBKIT_API|WEBKIT_DEPRECATED|WEBKIT_DEPRECATED_FOR\\(.+\\)\n"
909     "deprecation_guard=WEBKIT_DISABLE_DEPRECATED\n"
910     "namespace=webkit_dom\n"
911     "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
912     "       -I${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM\n"
913     "       -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}\n"
914     "       -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}\n"
915     "doc_dir=${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/docs\n"
916     "source_dirs=${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/DOM\n"
917     "            ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM\n"
918     "headers=${WebKitDOM_GTKDOC_HEADERS}\n"
919     "main_sgml_file=webkitdomgtk-docs.sgml\n"
920 )
921
922 add_custom_target(WebKit-forwarding-headers
923     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT_DIR} --output ${FORWARDING_HEADERS_DIR} --platform gtk --platform soup
924 )
925
926 # These symbolic link allows includes like #include <webkit2/WebkitWebView.h> which simulates installed headers.
927 add_custom_command(
928     OUTPUT ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
929     DEPENDS ${WEBKIT_DIR}/UIProcess/API/gtk
930     COMMAND ln -n -s -f ${WEBKIT_DIR}/UIProcess/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
931 )
932 add_custom_command(
933     OUTPUT ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
934     DEPENDS ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk
935     COMMAND ln -n -s -f ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
936 )
937 add_custom_command(
938     OUTPUT ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkitdom
939     DEPENDS ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM
940     COMMAND ln -n -s -f ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkitdom
941 )
942 add_custom_target(WebKit-fake-api-headers
943     DEPENDS ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
944             ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
945             ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkitdom
946 )
947
948 set(WEBKIT_EXTRA_DEPENDENCIES
949      WebKit-fake-api-headers
950      WebKit-forwarding-headers
951 )