[GTK][CMake] Make gtk-unix-print a component of FindGTK.cmake
[WebKit-https.git] / Source / WebKit / PlatformGTK.cmake
1 include(InspectorGResources.cmake)
2
3 set(WebKit_OUTPUT_NAME webkit2gtk-${WEBKITGTK_API_VERSION})
4 set(WebProcess_OUTPUT_NAME WebKitWebProcess)
5 set(NetworkProcess_OUTPUT_NAME WebKitNetworkProcess)
6 set(GPUProcess_OUTPUT_NAME WebKitGPUProcess)
7 set(PluginProcess_OUTPUT_NAME WebKitPluginProcess)
8
9 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR})
10 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_DIR})
11 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR})
12
13 configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h)
14 configure_file(gtk/webkit2gtk.pc.in ${WebKit2_PKGCONFIG_FILE} @ONLY)
15 configure_file(gtk/webkit2gtk-web-extension.pc.in ${WebKit2WebExtension_PKGCONFIG_FILE} @ONLY)
16
17 add_definitions(-DBUILDING_WEBKIT)
18 add_definitions(-DWEBKIT2_COMPILATION)
19 add_definitions(-DWEBKIT_DOM_USE_UNSTABLE_API)
20
21 add_definitions(-DPKGLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
22 add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
23 add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
24 add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
25
26 if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
27     WEBKIT_ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/webkitglib-symbols.map")
28 endif ()
29
30 set(WebKit_USE_PREFIX_HEADER ON)
31
32 list(APPEND WebKit_UNIFIED_SOURCE_LIST_FILES
33     "SourcesGTK.txt"
34 )
35
36 list(APPEND WebKit_MESSAGES_IN_FILES
37     UIProcess/ViewGestureController.messages.in
38
39     WebProcess/WebPage/ViewGestureGeometryCollector.messages.in
40 )
41
42 list(APPEND WebKit_DERIVED_SOURCES
43     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
44     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.c
45
46     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
47     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.cpp
48 )
49
50 if (ENABLE_WAYLAND_TARGET)
51     list(APPEND WebKit_DERIVED_SOURCES
52         ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandClientProtocol.c
53         ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/pointer-constraints-unstable-v1-protocol.c
54         ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/relative-pointer-unstable-v1-protocol.c
55     )
56 endif ()
57
58 set(WebKit2GTK_INSTALLED_HEADERS
59     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
60     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h
61     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitApplicationInfo.h
62     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitAuthenticationRequest.h
63     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitAutocleanups.h
64     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitAutomationSession.h
65     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitBackForwardList.h
66     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitBackForwardListItem.h
67     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitColorChooserRequest.h
68     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitCredential.h
69     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
70     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
71     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
72     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitCookieManager.h
73     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitDefines.h
74     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitDeviceInfoPermissionRequest.h
75     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitDownload.h
76     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEditingCommands.h
77     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEditorState.h
78     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitError.h
79     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitFaviconDatabase.h
80     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitFileChooserRequest.h
81     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitFindController.h
82     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitFormSubmissionRequest.h
83     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitForwardDeclarations.h
84     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitGeolocationManager.h
85     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
86     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
87     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitInputMethodContext.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/WebKitPointerLockPermissionRequest.h
101     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitPolicyDecision.h
102     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitPrintCustomWidget.h
103     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitPrintOperation.h
104     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitResponsePolicyDecision.h
105     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitScriptDialog.h
106     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitSecurityManager.h
107     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitSecurityOrigin.h
108     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitSettings.h
109     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
110     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
111     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURISchemeRequest.h
112     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIUtilities.h
113     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitUserContent.h
114     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitUserContentFilterStore.h
115     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitUserContentManager.h
116     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h
117     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitUserMessage.h
118     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebContext.h
119     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebInspector.h
120     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebResource.h
121     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebView.h
122     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebViewBase.h
123     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebViewSessionState.h
124     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebsiteData.h
125     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWebsiteDataManager.h
126     ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitWindowProperties.h
127     ${WEBKIT_DIR}/UIProcess/API/gtk/webkit2.h
128 )
129
130 set(WebKit2WebExtension_INSTALLED_HEADERS
131     ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.h
132     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.h
133     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitFrame.h
134     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h
135     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.h
136     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h
137     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionAutocleanups.h
138     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.h
139     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
140     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
141 )
142
143 set(WebKitDOM_INSTALLED_HEADERS
144     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h
145     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h
146     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h
147     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h
148     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h
149     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h
150     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h
151     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h
152     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h
153     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h
154     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h
155     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h
156     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h
157     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h
158     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h
159     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCustom.h
160     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCustomUnstable.h
161     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.h
162     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h
163     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentUnstable.h
164     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h
165     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h
166     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentUnstable.h
167     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h
168     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h
169     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h
170     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h
171     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowUnstable.h
172     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h
173     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementUnstable.h
174     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h
175     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h
176     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h
177     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h
178     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h
179     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h
180     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h
181     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h
182     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h
183     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h
184     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h
185     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h
186     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h
187     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h
188     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h
189     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h
190     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h
191     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h
192     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementUnstable.h
193     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h
194     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h
195     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h
196     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h
197     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h
198     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h
199     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h
200     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h
201     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h
202     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h
203     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h
204     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h
205     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h
206     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h
207     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h
208     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h
209     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h
210     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h
211     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h
212     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h
213     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h
214     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h
215     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h
216     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h
217     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h
218     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h
219     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h
220     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h
221     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h
222     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h
223     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h
224     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h
225     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h
226     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h
227     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h
228     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h
229     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h
230     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h
231     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h
232     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h
233     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h
234     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h
235     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h
236     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h
237     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h
238     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h
239     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h
240     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.h
241     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h
242     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h
243     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h
244     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h
245     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h
246     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h
247     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRangeUnstable.h
248     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h
249     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h
250     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h
251     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h
252     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h
253     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h
254     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h
255     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.h
256     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h
257 )
258
259 set(WebKitDOM_GTKDOC_HEADERS
260     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h
261     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h
262     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h
263     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h
264     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h
265     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h
266     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h
267     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h
268     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h
269     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h
270     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h
271     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h
272     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCustom.h
273     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.h
274     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h
275     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h
276     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h
277     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h
278     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h
279     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h
280     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h
281     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h
282     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h
283     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h
284     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h
285     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h
286     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h
287     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h
288     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h
289     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h
290     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h
291     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h
292     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h
293     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h
294     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h
295     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h
296     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h
297     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h
298     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h
299     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h
300     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h
301     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h
302     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h
303     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h
304     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h
305     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h
306     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h
307     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h
308     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h
309     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h
310     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h
311     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h
312     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h
313     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h
314     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h
315     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h
316     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h
317     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h
318     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h
319     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h
320     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h
321     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h
322     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h
323     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h
324     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h
325     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h
326     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h
327     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h
328     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h
329     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h
330     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h
331     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h
332     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h
333     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h
334     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h
335     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h
336     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h
337     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h
338     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h
339     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h
340     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h
341     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h
342     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h
343     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h
344     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h
345     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h
346     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h
347     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.h
348     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h
349     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h
350     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h
351     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h
352     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h
353     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h
354     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h
355     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h
356     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h
357     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h
358     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h
359     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h
360     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h
361     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.h
362     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h
363 )
364
365 # This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore.
366 list(INSERT WebKit_INCLUDE_DIRECTORIES 0
367     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
368     "${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}"
369     "${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}"
370     "${DERIVED_SOURCES_WEBKIT2GTK_DIR}"
371 )
372
373 list(APPEND WebKit_INCLUDE_DIRECTORIES
374     "${DERIVED_SOURCES_JAVASCRIPCOREGTK_DIR}"
375     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/"
376     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib"
377     "${WEBKIT_DIR}/NetworkProcess/glib"
378     "${WEBKIT_DIR}/NetworkProcess/gtk"
379     "${WEBKIT_DIR}/NetworkProcess/soup"
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}/UIProcess/API/C/cairo"
393     "${WEBKIT_DIR}/UIProcess/API/C/gtk"
394     "${WEBKIT_DIR}/UIProcess/API/glib"
395     "${WEBKIT_DIR}/UIProcess/API/gtk"
396     "${WEBKIT_DIR}/UIProcess/CoordinatedGraphics"
397     "${WEBKIT_DIR}/UIProcess/Inspector/glib"
398     "${WEBKIT_DIR}/UIProcess/Inspector/gtk"
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/Inspector/gtk"
411     "${WEBKIT_DIR}/WebProcess/Plugins/Netscape/unix"
412     "${WEBKIT_DIR}/WebProcess/Plugins/Netscape/x11"
413     "${WEBKIT_DIR}/WebProcess/gtk"
414     "${WEBKIT_DIR}/WebProcess/soup"
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     ${ENCHANT_INCLUDE_DIRS}
424     ${GIO_UNIX_INCLUDE_DIRS}
425     ${GLIB_INCLUDE_DIRS}
426     ${GSTREAMER_INCLUDE_DIRS}
427     ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
428     ${GTK_INCLUDE_DIRS}
429     ${LIBSOUP_INCLUDE_DIRS}
430 )
431
432 if (USE_WPE_RENDERER)
433     list(APPEND WebKit_INCLUDE_DIRECTORIES
434         "${WEBKIT_DIR}/WebProcess/WebPage/libwpe"
435     )
436     list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
437         ${WPEBACKEND_FDO_INCLUDE_DIRS}
438     )
439 endif ()
440
441 if (USE_LIBNOTIFY)
442 list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
443     ${LIBNOTIFY_INCLUDE_DIRS}
444 )
445 endif ()
446
447 set(WebKitCommonIncludeDirectories ${WebKit_INCLUDE_DIRECTORIES})
448 set(WebKitCommonSystemIncludeDirectories ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
449
450 list(APPEND WebProcess_SOURCES
451     WebProcess/EntryPoint/unix/WebProcessMain.cpp
452 )
453
454 list(APPEND NetworkProcess_SOURCES
455     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
456 )
457
458 list(APPEND GPUProcess_SOURCES
459     GPUProcess/EntryPoint/unix/GPUProcessMain.cpp
460 )
461
462 if (USE_WPE_RENDERER)
463     list(APPEND WebKit_LIBRARIES
464       WPE::libwpe
465       ${WPEBACKEND_FDO_LIBRARIES}
466     )
467 endif ()
468
469 if (GTK_UNIX_PRINT_FOUND)
470     list(APPEND WebKit_LIBRARIES GTK::UnixPrint)
471 endif ()
472
473 if (LIBNOTIFY_FOUND)
474     list(APPEND WebKit_PRIVATE_LIBRARIES
475         ${LIBNOTIFY_LIBRARIES}
476     )
477 endif ()
478
479 if (USE_LIBWEBRTC)
480     list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
481         "${THIRDPARTY_DIR}/libwebrtc/Source/"
482         "${THIRDPARTY_DIR}/libwebrtc/Source/webrtc"
483     )
484 endif ()
485
486 # To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
487 set(WebKit2GTK_ENUM_GENERATION_HEADERS ${WebKit2GTK_INSTALLED_HEADERS})
488 list(REMOVE_ITEM WebKit2GTK_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h)
489 add_custom_command(
490     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
491            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
492     DEPENDS ${WebKit2GTK_ENUM_GENERATION_HEADERS}
493
494     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
495
496     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
497     VERBATIM
498 )
499
500 set(WebKit2GTK_WEB_PROCESS_ENUM_GENERATION_HEADERS ${WebKit2WebExtension_INSTALLED_HEADERS})
501 list(REMOVE_ITEM WebKit2GTK_WEB_PROCESS_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.h)
502 add_custom_command(
503     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.h
504            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitWebProcessEnumTypes.cpp
505     DEPENDS ${WebKit2GTK_WEB_PROCESS_ENUM_GENERATION_HEADERS}
506
507     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
508
509     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
510     VERBATIM
511 )
512
513 WEBKIT_BUILD_INSPECTOR_GRESOURCES(${DERIVED_SOURCES_WEBKIT2GTK_DIR})
514
515 set(WebKitResources
516     "        <file alias=\"css/gtk-theme.css\">gtk-theme.css</file>\n"
517     "        <file alias=\"images/missingImage\">missingImage.png</file>\n"
518     "        <file alias=\"images/missingImage@2x\">missingImage@2x.png</file>\n"
519     "        <file alias=\"images/panIcon\">panIcon.png</file>\n"
520     "        <file alias=\"images/textAreaResizeCorner\">textAreaResizeCorner.png</file>\n"
521     "        <file alias=\"images/textAreaResizeCorner@2x\">textAreaResizeCorner@2x.png</file>\n"
522 )
523
524 if (ENABLE_WEB_AUDIO)
525     list(APPEND WebKitResources
526         "        <file alias=\"audio/Composite\">Composite.wav</file>\n"
527     )
528 endif ()
529
530 file(WRITE ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.xml
531     "<?xml version=1.0 encoding=UTF-8?>\n"
532     "<gresources>\n"
533     "    <gresource prefix=\"/org/webkitgtk/resources\">\n"
534     ${WebKitResources}
535     "    </gresource>\n"
536     "</gresources>\n"
537 )
538
539 add_custom_command(
540     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.c
541     DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.xml
542     COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebKit/Resources/gtk --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitResourcesGResourceBundle.xml
543     VERBATIM
544 )
545
546 if (ENABLE_WAYLAND_TARGET)
547     # Wayland protocol extension.
548     add_custom_command(
549         OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandClientProtocol.c
550         DEPENDS ${WEBKIT_DIR}/Shared/gtk/WebKitWaylandProtocol.xml
551         COMMAND ${WAYLAND_SCANNER} server-header ${WEBKIT_DIR}/Shared/gtk/WebKitWaylandProtocol.xml ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandServerProtocol.h
552         COMMAND ${WAYLAND_SCANNER} client-header ${WEBKIT_DIR}/Shared/gtk/WebKitWaylandProtocol.xml ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandClientProtocol.h
553         COMMAND ${WAYLAND_SCANNER} private-code ${WEBKIT_DIR}/Shared/gtk/WebKitWaylandProtocol.xml ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKitWaylandClientProtocol.c
554         VERBATIM
555     )
556
557     add_custom_command(
558         OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/pointer-constraints-unstable-v1-protocol.c
559         DEPENDS ${WAYLAND_PROTOCOLS_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
560         COMMAND ${WAYLAND_SCANNER} private-code ${WAYLAND_PROTOCOLS_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/pointer-constraints-unstable-v1-protocol.c
561         COMMAND ${WAYLAND_SCANNER} client-header ${WAYLAND_PROTOCOLS_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/pointer-constraints-unstable-v1-client-protocol.h
562         VERBATIM
563     )
564
565     add_custom_command(
566         OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/relative-pointer-unstable-v1-protocol.c
567         DEPENDS ${WAYLAND_PROTOCOLS_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml
568         COMMAND ${WAYLAND_SCANNER} private-code ${WAYLAND_PROTOCOLS_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/relative-pointer-unstable-v1-protocol.c
569         COMMAND ${WAYLAND_SCANNER} client-header ${WAYLAND_PROTOCOLS_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/relative-pointer-unstable-v1-client-protocol.h
570         VERBATIM
571     )
572 endif ()
573
574 # GTK3 PluginProcess
575 list(APPEND PluginProcess_SOURCES
576     PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
577 )
578
579 # Commands for building the built-in injected bundle.
580 add_library(webkit2gtkinjectedbundle MODULE "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp")
581 ADD_WEBKIT_PREFIX_HEADER(webkit2gtkinjectedbundle)
582 target_link_libraries(webkit2gtkinjectedbundle WebKit)
583
584 target_include_directories(webkit2gtkinjectedbundle PRIVATE
585     ${WebKit_INCLUDE_DIRECTORIES}
586     "${DERIVED_SOURCES_DIR}/InjectedBundle"
587     "${FORWARDING_HEADERS_DIR}"
588     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
589     "${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}"
590 )
591
592 target_include_directories(webkit2gtkinjectedbundle SYSTEM PRIVATE
593     ${WebKit_SYSTEM_INCLUDE_DIRECTORIES}
594 )
595
596 if (COMPILER_IS_GCC_OR_CLANG)
597     WEBKIT_ADD_TARGET_CXX_FLAGS(webkit2gtkinjectedbundle -Wno-unused-parameter)
598 endif ()
599
600 # Add ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} to LD_LIBRARY_PATH or DYLD_LIBRARY_PATH
601 if (APPLE)
602     set(LOADER_LIBRARY_PATH_VAR "DYLD_LIBRARY_PATH")
603     set(PREV_LOADER_LIBRARY_PATH "$ENV{DYLD_LIBRARY_PATH}")
604 else ()
605     set(LOADER_LIBRARY_PATH_VAR "LD_LIBRARY_PATH")
606     set(PREV_LOADER_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}")
607 endif ()
608
609 if (ENABLE_INTROSPECTION)
610     string(COMPARE EQUAL "${PREV_LOADER_LIBRARY_PATH}" "" ld_library_path_does_not_exist)
611     if (ld_library_path_does_not_exist)
612         set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH
613             "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
614         )
615     else ()
616         set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH
617             "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:${PREV_LOADER_LIBRARY_PATH}"
618         )
619     endif ()
620
621     # Add required -L flags from ${CMAKE_SHARED_LINKER_FLAGS} for g-ir-scanner
622     string(REGEX MATCHALL "-L[^ ]*"
623         INTROSPECTION_ADDITIONAL_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
624
625     add_custom_command(
626         OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
627         DEPENDS WebKit
628         DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
629         COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
630             ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
631             ${INTROSPECTION_SCANNER}
632             --quiet
633             --warn-all
634             --symbol-prefix=webkit
635             --identifier-prefix=WebKit
636             --namespace=WebKit2
637             --nsversion=${WEBKITGTK_API_VERSION}
638             --include=GObject-2.0
639             --include=Gtk-3.0
640             --include=Soup-2.4
641             --include-uninstalled=${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
642             --library=webkit2gtk-${WEBKITGTK_API_VERSION}
643             --library=javascriptcoregtk-${WEBKITGTK_API_VERSION}
644             -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
645             ${INTROSPECTION_ADDITIONAL_LINKER_FLAGS}
646             --no-libtool
647             --pkg=gobject-2.0
648             --pkg=gtk+-3.0
649             --pkg=libsoup-2.4
650             --pkg-export=webkit2gtk-${WEBKITGTK_API_VERSION}
651             --output=${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
652             --c-include="webkit2/webkit2.h"
653             -DBUILDING_WEBKIT
654             -DWEBKIT2_COMPILATION
655             -I${CMAKE_SOURCE_DIR}/Source
656             -I${WEBKIT_DIR}
657             -I${DERIVED_SOURCES_DIR}
658             -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}
659             -I${DERIVED_SOURCES_JAVASCRIPCOREGTK_DIR}
660             -I${FORWARDING_HEADERS_DIR}
661             -I${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib
662             -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
663             ${WebKit2GTK_INSTALLED_HEADERS}
664             ${WEBKIT_DIR}/Shared/API/glib/*.cpp
665             ${WEBKIT_DIR}/UIProcess/API/glib/*.cpp
666             ${WEBKIT_DIR}/UIProcess/API/gtk/*.cpp
667     )
668
669     add_custom_command(
670         OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
671         DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
672         DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
673         COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
674             LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
675             ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
676             ${INTROSPECTION_SCANNER}
677             --quiet
678             --warn-all
679             --symbol-prefix=webkit
680             --identifier-prefix=WebKit
681             --namespace=WebKit2WebExtension
682             --nsversion=${WEBKITGTK_API_VERSION}
683             --include=GObject-2.0
684             --include=Gtk-3.0
685             --include=Soup-2.4
686             --include-uninstalled=${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
687             --library=webkit2gtk-${WEBKITGTK_API_VERSION}
688             --library=javascriptcoregtk-${WEBKITGTK_API_VERSION}
689             ${INTROSPECTION_ADDITIONAL_LIBRARIES}
690             -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
691             ${INTROSPECTION_ADDITIONAL_LINKER_FLAGS}
692             --no-libtool
693             --pkg=gobject-2.0
694             --pkg=gtk+-3.0
695             --pkg=libsoup-2.4
696             --pkg-export=webkit2gtk-web-extension-${WEBKITGTK_API_VERSION}
697             --output=${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
698             --c-include="webkit2/webkit-web-extension.h"
699             -DBUILDING_WEBKIT
700             -DWEBKIT2_COMPILATION
701             -I${CMAKE_SOURCE_DIR}/Source
702             -I${WEBKIT_DIR}
703             -I${DERIVED_SOURCES_DIR}
704             -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}
705             -I${DERIVED_SOURCES_JAVASCRIPCOREGTK_DIR}
706             -I${FORWARDING_HEADERS_DIR}
707             -I${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib
708             -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
709             -I${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}
710             -I${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk
711             ${WebKitDOM_INSTALLED_HEADERS}
712             ${WebKit2WebExtension_INSTALLED_HEADERS}
713             ${WEBKIT_DIR}/Shared/API/glib/WebKitContextMenu.cpp
714             ${WEBKIT_DIR}/Shared/API/glib/WebKitContextMenuItem.cpp
715             ${WEBKIT_DIR}/Shared/API/glib/WebKitHitTestResult.cpp
716             ${WEBKIT_DIR}/Shared/API/glib/WebKitUserMessage.cpp
717             ${WEBKIT_DIR}/Shared/API/glib/WebKitURIRequest.cpp
718             ${WEBKIT_DIR}/Shared/API/glib/WebKitURIResponse.cpp
719             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
720             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
721             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
722             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
723             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitUserMessage.h
724             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
725             ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
726             ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/*.cpp
727             ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/DOM/*.cpp
728     )
729
730     add_custom_command(
731         OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
732         DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
733         COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
734     )
735
736     add_custom_command(
737         OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
738         DEPENDS ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
739         COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
740     )
741
742     ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib)
743     ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib)
744 endif ()
745
746 install(TARGETS webkit2gtkinjectedbundle
747         DESTINATION "${LIB_INSTALL_DIR}/webkit2gtk-${WEBKITGTK_API_VERSION}/injected-bundle"
748 )
749 install(FILES "${CMAKE_BINARY_DIR}/Source/WebKit/webkit2gtk-${WEBKITGTK_API_VERSION}.pc"
750               "${CMAKE_BINARY_DIR}/Source/WebKit/webkit2gtk-web-extension-${WEBKITGTK_API_VERSION}.pc"
751         DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
752 )
753 install(FILES ${WebKit2GTK_INSTALLED_HEADERS}
754               ${WebKit2WebExtension_INSTALLED_HEADERS}
755         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkit2"
756 )
757 install(FILES ${WebKitDOM_INSTALLED_HEADERS}
758         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
759 )
760
761 if (ENABLE_INTROSPECTION)
762     install(FILES ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
763                   ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
764             DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
765     )
766     install(FILES ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
767                   ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
768             DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
769     )
770 endif ()
771
772 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkit2gtk.cfg
773     "[webkit2gtk-${WEBKITGTK_API_VERSION}]\n"
774     "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
775     "decorator=WEBKIT_API|WEBKIT_DEPRECATED|WEBKIT_DEPRECATED_FOR\\(.+\\)\n"
776     "deprecation_guard=WEBKIT_DISABLE_DEPRECATED\n"
777     "namespace=webkit\n"
778     "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
779     "       -I${WEBKIT_DIR}/Shared/API/glib\n"
780     "       -I${WEBKIT_DIR}/UIProcess/API/glib\n"
781     "       -I${WEBKIT_DIR}/UIProcess/API/gtk\n"
782     "       -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}\n"
783     "       -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}\n"
784     "doc_dir=${WEBKIT_DIR}/UIProcess/API/gtk/docs\n"
785     "source_dirs=${WEBKIT_DIR}/Shared/API/glib\n"
786     "            ${WEBKIT_DIR}/UIProcess/API/glib\n"
787     "            ${WEBKIT_DIR}/UIProcess/API/gtk\n"
788     "            ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib\n"
789     "            ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk\n"
790     "            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}\n"
791     "headers=${WebKit2GTK_ENUM_GENERATION_HEADERS} ${WebKit2WebExtension_INSTALLED_HEADERS}\n"
792     "main_sgml_file=webkit2gtk-docs.sgml\n"
793 )
794
795 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkitdom.cfg
796     "[webkitdomgtk-${WEBKITGTK_API_VERSION}]\n"
797     "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
798     "decorator=WEBKIT_API|WEBKIT_DEPRECATED|WEBKIT_DEPRECATED_FOR\\(.+\\)\n"
799     "deprecation_guard=WEBKIT_DISABLE_DEPRECATED\n"
800     "namespace=webkit_dom\n"
801     "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
802     "       -I${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM\n"
803     "       -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}\n"
804     "       -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}\n"
805     "doc_dir=${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/docs\n"
806     "source_dirs=${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/DOM\n"
807     "            ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM\n"
808     "headers=${WebKitDOM_GTKDOC_HEADERS}\n"
809     "main_sgml_file=webkitdomgtk-docs.sgml\n"
810 )
811
812 add_custom_target(WebKit-forwarding-headers
813     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT_DIR} --output ${FORWARDING_HEADERS_DIR} --platform gtk --platform soup
814 )
815
816 # These symbolic link allows includes like #include <webkit2/WebkitWebView.h> which simulates installed headers.
817 add_custom_command(
818     OUTPUT ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
819     DEPENDS ${WEBKIT_DIR}/UIProcess/API/gtk
820     COMMAND ln -n -s -f ${WEBKIT_DIR}/UIProcess/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
821 )
822 add_custom_command(
823     OUTPUT ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
824     DEPENDS ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk
825     COMMAND ln -n -s -f ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
826 )
827 add_custom_command(
828     OUTPUT ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkitdom
829     DEPENDS ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM
830     COMMAND ln -n -s -f ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkitdom
831 )
832 add_custom_target(WebKit-fake-api-headers
833     DEPENDS ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
834             ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
835             ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkitdom
836 )
837
838 list(APPEND WebKit_DEPENDENCIES
839      WebKit-fake-api-headers
840      WebKit-forwarding-headers
841 )