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