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