REGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
[WebKit-https.git] / Source / WebCore / PlatformGTK.cmake
1 include(platform/Cairo.cmake)
2 include(platform/FreeType.cmake)
3 include(platform/GCrypt.cmake)
4 include(platform/GStreamer.cmake)
5 include(platform/ImageDecoders.cmake)
6
7 if (USE_TEXTURE_MAPPER)
8     include(platform/TextureMapper.cmake)
9 endif ()
10
11 set(WebCore_OUTPUT_NAME WebCoreGTK)
12
13 list(APPEND WebCore_INCLUDE_DIRECTORIES
14     "${THIRDPARTY_DIR}/ANGLE/"
15     "${THIRDPARTY_DIR}/ANGLE/include/KHR"
16     "${WEBCORE_DIR}/accessibility/atk"
17     "${WEBCORE_DIR}/editing/atk"
18     "${WEBCORE_DIR}/page/gtk"
19     "${WEBCORE_DIR}/platform/geoclue"
20     "${WEBCORE_DIR}/platform/gtk"
21     "${WEBCORE_DIR}/platform/graphics/egl"
22     "${WEBCORE_DIR}/platform/graphics/glx"
23     "${WEBCORE_DIR}/platform/graphics/gtk"
24     "${WEBCORE_DIR}/platform/graphics/opengl"
25     "${WEBCORE_DIR}/platform/graphics/opentype"
26     "${WEBCORE_DIR}/platform/graphics/wayland"
27     "${WEBCORE_DIR}/platform/graphics/x11"
28     "${WEBCORE_DIR}/platform/mediastream/gtk"
29     "${WEBCORE_DIR}/platform/mock/mediasource"
30     "${WEBCORE_DIR}/platform/network/gtk"
31     "${WEBCORE_DIR}/platform/network/soup"
32     "${WEBCORE_DIR}/platform/text/gtk"
33 )
34
35 list(APPEND WebCore_SOURCES
36     accessibility/atk/AXObjectCacheAtk.cpp
37     accessibility/atk/AccessibilityObjectAtk.cpp
38     accessibility/atk/WebKitAccessibleHyperlink.cpp
39     accessibility/atk/WebKitAccessibleInterfaceAction.cpp
40     accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
41     accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
42     accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
43     accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
44     accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
45     accessibility/atk/WebKitAccessibleInterfaceImage.cpp
46     accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
47     accessibility/atk/WebKitAccessibleInterfaceTable.cpp
48     accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp
49     accessibility/atk/WebKitAccessibleInterfaceText.cpp
50     accessibility/atk/WebKitAccessibleInterfaceValue.cpp
51     accessibility/atk/WebKitAccessibleUtil.cpp
52     accessibility/atk/WebKitAccessibleWrapperAtk.cpp
53
54     editing/atk/FrameSelectionAtk.cpp
55
56     loader/soup/CachedRawResourceSoup.cpp
57     loader/soup/SubresourceLoaderSoup.cpp
58
59     page/linux/ResourceUsageOverlayLinux.cpp
60     page/linux/ResourceUsageThreadLinux.cpp
61
62     platform/ScrollAnimationKinetic.cpp
63     platform/StaticPasteboard.cpp
64     platform/UserAgentQuirks.cpp
65
66     platform/audio/glib/AudioBusGLib.cpp
67
68     platform/geoclue/GeolocationProviderGeoclue.cpp
69
70     platform/glib/EventLoopGlib.cpp
71     platform/glib/FileSystemGlib.cpp
72     platform/glib/KeyedDecoderGlib.cpp
73     platform/glib/KeyedEncoderGlib.cpp
74     platform/glib/MainThreadSharedTimerGLib.cpp
75     platform/glib/SSLKeyGeneratorGLib.cpp
76     platform/glib/SharedBufferGlib.cpp
77
78     platform/graphics/GLContext.cpp
79     platform/graphics/GraphicsContext3DPrivate.cpp
80
81     platform/graphics/cairo/BackingStoreBackendCairoX11.cpp
82
83     platform/graphics/egl/GLContextEGL.cpp
84     platform/graphics/egl/GLContextEGLWayland.cpp
85     platform/graphics/egl/GLContextEGLX11.cpp
86
87     platform/graphics/glx/GLContextGLX.cpp
88
89     platform/graphics/gstreamer/ImageGStreamerCairo.cpp
90
91     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
92     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
93     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
94
95     platform/graphics/opentype/OpenTypeVerticalData.cpp
96
97     platform/graphics/wayland/PlatformDisplayWayland.cpp
98
99     platform/graphics/x11/PlatformDisplayX11.cpp
100     platform/graphics/x11/XErrorTrapper.cpp
101     platform/graphics/x11/XUniqueResource.cpp
102
103     platform/gtk/DragDataGtk.cpp
104     platform/gtk/LocalizedStringsGtk.cpp
105     platform/gtk/PasteboardGtk.cpp
106     platform/gtk/ScrollAnimatorGtk.cpp
107     platform/gtk/SelectionData.cpp
108     platform/gtk/UserAgentGtk.cpp
109
110     platform/network/soup/AuthenticationChallengeSoup.cpp
111     platform/network/soup/CertificateInfo.cpp
112     platform/network/soup/CookieJarSoup.cpp
113     platform/network/soup/CookieStorageSoup.cpp
114     platform/network/soup/CredentialStorageSoup.cpp
115     platform/network/soup/DNSSoup.cpp
116     platform/network/soup/GRefPtrSoup.cpp
117     platform/network/soup/NetworkStorageSessionSoup.cpp
118     platform/network/soup/ProxyServerSoup.cpp
119     platform/network/soup/ResourceErrorSoup.cpp
120     platform/network/soup/ResourceHandleSoup.cpp
121     platform/network/soup/ResourceRequestSoup.cpp
122     platform/network/soup/ResourceResponseSoup.cpp
123     platform/network/soup/SocketStreamHandleImplSoup.cpp
124     platform/network/soup/SoupNetworkSession.cpp
125     platform/network/soup/SynchronousLoaderClientSoup.cpp
126     platform/network/soup/WebKitSoupRequestGeneric.cpp
127
128     platform/soup/PublicSuffixSoup.cpp
129     platform/soup/SharedBufferSoup.cpp
130     platform/soup/URLSoup.cpp
131
132     platform/text/Hyphenation.cpp
133     platform/text/LocaleICU.cpp
134
135     platform/text/enchant/TextCheckerEnchant.cpp
136
137     platform/text/hyphen/HyphenationLibHyphen.cpp
138
139     platform/unix/LoggingUnix.cpp
140
141     platform/xdg/MIMETypeRegistryXdg.cpp
142 )
143
144 list(APPEND WebCorePlatformGTK_SOURCES
145     editing/gtk/EditorGtk.cpp
146
147     page/gtk/DragControllerGtk.cpp
148     page/gtk/EventHandlerGtk.cpp
149
150     platform/graphics/PlatformDisplay.cpp
151
152     platform/graphics/gtk/ColorGtk.cpp
153     platform/graphics/gtk/GdkCairoUtilities.cpp
154     platform/graphics/gtk/IconGtk.cpp
155     platform/graphics/gtk/ImageBufferGtk.cpp
156     platform/graphics/gtk/ImageGtk.cpp
157
158     platform/gtk/CursorGtk.cpp
159     platform/gtk/DragImageGtk.cpp
160     platform/gtk/GRefPtrGtk.cpp
161     platform/gtk/GtkUtilities.cpp
162     platform/gtk/GtkVersioning.c
163     platform/gtk/PasteboardHelper.cpp
164     platform/gtk/PlatformKeyboardEventGtk.cpp
165     platform/gtk/PlatformMouseEventGtk.cpp
166     platform/gtk/PlatformPasteboardGtk.cpp
167     platform/gtk/PlatformScreenGtk.cpp
168     platform/gtk/PlatformWheelEventGtk.cpp
169     platform/gtk/RenderThemeGadget.cpp
170     platform/gtk/RenderThemeWidget.cpp
171     platform/gtk/ScrollbarThemeGtk.cpp
172     platform/gtk/WidgetGtk.cpp
173
174     rendering/RenderThemeGtk.cpp
175 )
176
177 if (ENABLE_GEOLOCATION)
178     list(APPEND WebCore_DERIVED_SOURCES
179         ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c
180     )
181     execute_process(COMMAND pkg-config --variable dbus_interface geoclue-2.0 OUTPUT_VARIABLE GEOCLUE_DBUS_INTERFACE)
182     add_custom_command(
183          OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.h
184          COMMAND gdbus-codegen --interface-prefix org.freedesktop.GeoClue2. --c-namespace Geoclue --generate-c-code ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface ${GEOCLUE_DBUS_INTERFACE}
185     )
186     set_source_files_properties(${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
187 endif ()
188
189 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
190     ${WEBCORE_DIR}/css/mediaControlsGtk.css
191 )
192
193 set(WebCore_USER_AGENT_SCRIPTS
194     ${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js
195     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.js
196     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
197 )
198
199 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
200
201 list(APPEND WebCore_LIBRARIES
202     ${ATK_LIBRARIES}
203     ${CAIRO_LIBRARIES}
204     ${ENCHANT_LIBRARIES}
205     ${GLIB_GIO_LIBRARIES}
206     ${GLIB_GMODULE_LIBRARIES}
207     ${GLIB_GOBJECT_LIBRARIES}
208     ${GLIB_LIBRARIES}
209     ${LIBSECRET_LIBRARIES}
210     ${LIBSOUP_LIBRARIES}
211     ${LIBTASN1_LIBRARIES}
212     ${LIBXML2_LIBRARIES}
213     ${LIBXSLT_LIBRARIES}
214     ${HYPHEN_LIBRARIES}
215     ${SQLITE_LIBRARIES}
216     ${X11_X11_LIB}
217     ${X11_Xcomposite_LIB}
218     ${X11_Xdamage_LIB}
219     ${X11_Xrender_LIB}
220     ${X11_Xt_LIB}
221     ${ZLIB_LIBRARIES}
222     WTF
223 )
224
225 list(APPEND WebCoreTestSupport_LIBRARIES WTF)
226
227 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
228     ${ATK_INCLUDE_DIRS}
229     ${CAIRO_INCLUDE_DIRS}
230     ${ENCHANT_INCLUDE_DIRS}
231     ${GIO_UNIX_INCLUDE_DIRS}
232     ${GLIB_INCLUDE_DIRS}
233     ${LIBSECRET_INCLUDE_DIRS}
234     ${LIBSOUP_INCLUDE_DIRS}
235     ${LIBTASN1_INCLUDE_DIRS}
236     ${LIBXML2_INCLUDE_DIR}
237     ${LIBXSLT_INCLUDE_DIR}
238     ${SQLITE_INCLUDE_DIR}
239     ${ZLIB_INCLUDE_DIRS}
240 )
241
242 if (USE_OPENGL_ES_2)
243     list(APPEND WebCore_SOURCES
244         platform/graphics/opengl/Extensions3DOpenGLES.cpp
245         platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
246     )
247 endif ()
248
249 if (USE_OPENGL)
250     list(APPEND WebCore_SOURCES
251         platform/graphics/OpenGLShims.cpp
252
253         platform/graphics/opengl/Extensions3DOpenGL.cpp
254         platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
255     )
256 endif ()
257
258 if (ENABLE_PLUGIN_PROCESS_GTK2)
259     # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
260     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
261     # for the plugin process.
262     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
263     add_dependencies(WebCorePlatformGTK2 WebCore)
264     set_property(TARGET WebCorePlatformGTK2
265         APPEND
266         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
267     )
268     target_include_directories(WebCorePlatformGTK2 PRIVATE
269         ${WebCore_INCLUDE_DIRECTORIES}
270         ${GTK2_INCLUDE_DIRS}
271         ${GDK2_INCLUDE_DIRS}
272     )
273     target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
274         ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
275     )
276     target_link_libraries(WebCorePlatformGTK2
277          ${WebCore_LIBRARIES}
278          ${GTK2_LIBRARIES}
279          ${GDK2_LIBRARIES}
280     )
281 endif ()
282
283 if (ENABLE_WAYLAND_TARGET)
284     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
285         ${WAYLAND_INCLUDE_DIRS}
286     )
287     list(APPEND WebCore_LIBRARIES
288         ${WAYLAND_LIBRARIES}
289     )
290 endif ()
291
292 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
293 add_dependencies(WebCorePlatformGTK WebCore)
294 target_include_directories(WebCorePlatformGTK PRIVATE
295     ${WebCore_INCLUDE_DIRECTORIES}
296 )
297 target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
298     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
299     ${GTK_INCLUDE_DIRS}
300     ${GDK_INCLUDE_DIRS}
301 )
302 target_link_libraries(WebCorePlatformGTK
303     ${WebCore_LIBRARIES}
304     ${GTK_LIBRARIES}
305     ${GDK_LIBRARIES}
306 )
307
308 include_directories(
309     ${WebCore_INCLUDE_DIRECTORIES}
310     "${WEBCORE_DIR}/bindings/gobject/"
311 )
312
313 include_directories(SYSTEM
314     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
315 )
316
317 add_definitions(-DBUILDING_WEBKIT)
318
319 if (ENABLE_SMOOTH_SCROLLING)
320     list(APPEND WebCore_SOURCES
321         platform/ScrollAnimationSmooth.cpp
322     )
323 endif ()