[GTK] Implement connected and disconnected events of GAMEPAD API with libmanette
[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 include(platform/Soup.cmake)
7 include(platform/TextureMapper.cmake)
8
9 set(WebCore_OUTPUT_NAME WebCoreGTK)
10
11 list(APPEND WebCore_UNIFIED_SOURCE_LIST_FILES
12     "SourcesGTK.txt"
13
14     "platform/SourcesGLib.txt"
15 )
16
17 list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
18     "${WEBCORE_DIR}/accessibility/atk"
19     "${WEBCORE_DIR}/editing/atk"
20     "${WEBCORE_DIR}/page/gtk"
21     "${WEBCORE_DIR}/platform/adwaita"
22     "${WEBCORE_DIR}/platform/generic"
23     "${WEBCORE_DIR}/platform/gtk"
24     "${WEBCORE_DIR}/platform/graphics/egl"
25     "${WEBCORE_DIR}/platform/graphics/glx"
26     "${WEBCORE_DIR}/platform/graphics/gstreamer"
27     "${WEBCORE_DIR}/platform/graphics/gtk"
28     "${WEBCORE_DIR}/platform/graphics/opengl"
29     "${WEBCORE_DIR}/platform/graphics/opentype"
30     "${WEBCORE_DIR}/platform/graphics/wayland"
31     "${WEBCORE_DIR}/platform/graphics/x11"
32     "${WEBCORE_DIR}/platform/mediacapabilities"
33     "${WEBCORE_DIR}/platform/mediastream/gtk"
34     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
35     "${WEBCORE_DIR}/platform/mock/mediasource"
36     "${WEBCORE_DIR}/platform/network/gtk"
37     "${WEBCORE_DIR}/platform/text/gtk"
38 )
39
40 if (USE_ANGLE_WEBGL)
41     list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
42         "${WEBCORE_DIR}/platform/graphics/angle"
43     )
44 endif ()
45
46 if (USE_WPE_RENDERER)
47     list(APPEND WebCore_INCLUDE_DIRECTORIES
48         "${WEBCORE_DIR}/platform/graphics/libwpe"
49     )
50 endif ()
51
52 list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
53     platform/adwaita/ScrollbarThemeAdwaita.h
54
55     platform/graphics/x11/PlatformDisplayX11.h
56     platform/graphics/x11/XErrorTrapper.h
57     platform/graphics/x11/XUniquePtr.h
58     platform/graphics/x11/XUniqueResource.h
59
60     platform/gtk/GRefPtrGtk.h
61     platform/gtk/GUniquePtrGtk.h
62     platform/gtk/GtkUtilities.h
63     platform/gtk/GtkVersioning.h
64     platform/gtk/ScrollbarThemeGtk.h
65     platform/gtk/SelectionData.h
66
67     platform/text/enchant/TextCheckerEnchant.h
68 )
69
70 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
71     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsAdwaita.css
72     ${WEBCORE_DIR}/css/themeAdwaita.css
73 )
74
75 set(WebCore_USER_AGENT_SCRIPTS
76     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsAdwaita.js
77 )
78
79 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/rendering/RenderThemeAdwaita.cpp)
80
81 list(APPEND WebCore_LIBRARIES
82     ${ATK_LIBRARIES}
83     ${ENCHANT_LIBRARIES}
84     ${GLIB_GIO_LIBRARIES}
85     ${GLIB_GMODULE_LIBRARIES}
86     ${GLIB_GOBJECT_LIBRARIES}
87     ${GLIB_LIBRARIES}
88     ${LIBSECCOMP_LIBRARIES}
89     ${LIBSECRET_LIBRARIES}
90     ${LIBTASN1_LIBRARIES}
91     ${HYPHEN_LIBRARIES}
92     ${UPOWERGLIB_LIBRARIES}
93     ${X11_X11_LIB}
94     ${X11_Xcomposite_LIB}
95     ${X11_Xdamage_LIB}
96     ${X11_Xrender_LIB}
97     ${X11_Xt_LIB}
98     GTK::GTK
99 )
100
101 if (USE_WPE_RENDERER)
102     list(APPEND WebCore_LIBRARIES
103         WPE::libwpe
104     )
105 endif ()
106
107 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
108     ${ATK_INCLUDE_DIRS}
109     ${ENCHANT_INCLUDE_DIRS}
110     ${GIO_UNIX_INCLUDE_DIRS}
111     ${GLIB_INCLUDE_DIRS}
112     ${LIBSECCOMP_INCLUDE_DIRS}
113     ${LIBSECRET_INCLUDE_DIRS}
114     ${LIBTASN1_INCLUDE_DIRS}
115     ${UPOWERGLIB_INCLUDE_DIRS}
116 )
117
118 if (USE_OPENGL)
119     list(APPEND WebCore_SOURCES
120         platform/graphics/OpenGLShims.cpp
121     )
122 endif ()
123
124 if (USE_ANGLE_WEBGL)
125     list(APPEND WebCore_SOURCES
126         platform/graphics/angle/ExtensionsGLANGLE.cpp
127         platform/graphics/angle/GraphicsContextGLANGLE.cpp
128         platform/graphics/angle/TemporaryANGLESetting.cpp
129     )
130 else ()
131     list(APPEND WebCore_SOURCES
132         platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
133         platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
134         platform/graphics/opengl/TemporaryOpenGLSetting.cpp
135     )
136
137     if (USE_OPENGL_ES)
138         list(APPEND WebCore_SOURCES
139             platform/graphics/opengl/ExtensionsGLOpenGLES.cpp
140             platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
141         )
142     endif ()
143
144     if (USE_OPENGL)
145         list(APPEND WebCore_SOURCES
146             platform/graphics/opengl/ExtensionsGLOpenGL.cpp
147             platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
148         )
149     endif ()
150 endif ()
151
152 if (ENABLE_WAYLAND_TARGET)
153     list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
154         platform/graphics/wayland/PlatformDisplayWayland.h
155         platform/graphics/wayland/WlUniquePtr.h
156     )
157     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
158         ${WAYLAND_INCLUDE_DIRS}
159     )
160     list(APPEND WebCore_LIBRARIES
161         ${WAYLAND_LIBRARIES}
162     )
163 endif ()
164
165 if (ENABLE_GAMEPAD)
166     list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
167         platform/gamepad/manette/ManetteGamepadProvider.h
168     )
169     list(APPEND WebCore_LIBRARIES
170         Manette::Manette
171     )
172 endif ()
173
174 include_directories(SYSTEM
175     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
176 )
177
178 list(APPEND WebCoreTestSupport_LIBRARIES PRIVATE GTK::GTK)
179
180 add_definitions(-DBUILDING_WEBKIT)
181
182 if (ENABLE_SMOOTH_SCROLLING)
183     list(APPEND WebCore_SOURCES
184         platform/ScrollAnimationSmooth.cpp
185     )
186 endif ()