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