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