Forward declare WKWebView in _WKDiagnosticLoggingDelegate.h
[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/TextureMapper.cmake)
7
8 set(WebCore_OUTPUT_NAME WebCoreGTK)
9
10 list(APPEND WebCore_UNIFIED_SOURCE_LIST_FILES
11     "SourcesGTK.txt"
12
13     "platform/SourcesGLib.txt"
14     "platform/SourcesSoup.txt"
15 )
16
17 list(APPEND WebCore_INCLUDE_DIRECTORIES
18     "${THIRDPARTY_DIR}/ANGLE/"
19     "${THIRDPARTY_DIR}/ANGLE/include/KHR"
20     "${WEBCORE_DIR}/accessibility/atk"
21     "${WEBCORE_DIR}/editing/atk"
22     "${WEBCORE_DIR}/page/gtk"
23     "${WEBCORE_DIR}/platform/generic"
24     "${WEBCORE_DIR}/platform/gtk"
25     "${WEBCORE_DIR}/platform/graphics/egl"
26     "${WEBCORE_DIR}/platform/graphics/glx"
27     "${WEBCORE_DIR}/platform/graphics/gstreamer"
28     "${WEBCORE_DIR}/platform/graphics/gtk"
29     "${WEBCORE_DIR}/platform/graphics/opengl"
30     "${WEBCORE_DIR}/platform/graphics/opentype"
31     "${WEBCORE_DIR}/platform/graphics/wayland"
32     "${WEBCORE_DIR}/platform/graphics/x11"
33     "${WEBCORE_DIR}/platform/mediacapabilities"
34     "${WEBCORE_DIR}/platform/mediastream/gtk"
35     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
36     "${WEBCORE_DIR}/platform/mock/mediasource"
37     "${WEBCORE_DIR}/platform/network/gtk"
38     "${WEBCORE_DIR}/platform/network/soup"
39     "${WEBCORE_DIR}/platform/text/gtk"
40 )
41
42 list(APPEND WebCorePlatformGTK_SOURCES
43     editing/gtk/EditorGtk.cpp
44
45     page/gtk/DragControllerGtk.cpp
46
47     platform/glib/EventHandlerGLib.cpp
48
49     platform/graphics/PlatformDisplay.cpp
50
51     platform/graphics/gtk/ColorGtk.cpp
52     platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp
53     platform/graphics/gtk/GdkCairoUtilities.cpp
54     platform/graphics/gtk/IconGtk.cpp
55     platform/graphics/gtk/ImageBufferGtk.cpp
56     platform/graphics/gtk/ImageGtk.cpp
57
58     platform/gtk/CursorGtk.cpp
59     platform/gtk/DragImageGtk.cpp
60     platform/gtk/GRefPtrGtk.cpp
61     platform/gtk/GtkUtilities.cpp
62     platform/gtk/GtkVersioning.c
63     platform/gtk/PasteboardHelper.cpp
64     platform/gtk/PlatformKeyboardEventGtk.cpp
65     platform/gtk/PlatformMouseEventGtk.cpp
66     platform/gtk/PlatformPasteboardGtk.cpp
67     platform/gtk/PlatformScreenGtk.cpp
68     platform/gtk/PlatformWheelEventGtk.cpp
69     platform/gtk/RenderThemeGadget.cpp
70     platform/gtk/RenderThemeWidget.cpp
71     platform/gtk/ScrollbarThemeGtk.cpp
72     platform/gtk/WidgetGtk.cpp
73
74     rendering/RenderThemeGtk.cpp
75 )
76
77 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
78     ${WEBCORE_DIR}/css/mediaControlsGtk.css
79 )
80
81 set(WebCore_USER_AGENT_SCRIPTS
82     ${WEBCORE_DIR}/en.lproj/mediaControlsLocalizedStrings.js
83     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.js
84     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
85 )
86
87 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
88
89 list(APPEND WebCore_LIBRARIES
90     ${ATK_LIBRARIES}
91     ${CAIRO_LIBRARIES}
92     ${ENCHANT_LIBRARIES}
93     ${GLIB_GIO_LIBRARIES}
94     ${GLIB_GMODULE_LIBRARIES}
95     ${GLIB_GOBJECT_LIBRARIES}
96     ${GLIB_LIBRARIES}
97     ${LIBSECCOMP_LIBRARIES}
98     ${LIBSECRET_LIBRARIES}
99     ${LIBSOUP_LIBRARIES}
100     ${LIBTASN1_LIBRARIES}
101     ${HYPHEN_LIBRARIES}
102     ${UPOWERGLIB_LIBRARIES}
103     ${X11_X11_LIB}
104     ${X11_Xcomposite_LIB}
105     ${X11_Xdamage_LIB}
106     ${X11_Xrender_LIB}
107     ${X11_Xt_LIB}
108     ${ZLIB_LIBRARIES}
109 )
110
111 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
112     ${ATK_INCLUDE_DIRS}
113     ${CAIRO_INCLUDE_DIRS}
114     ${ENCHANT_INCLUDE_DIRS}
115     ${GIO_UNIX_INCLUDE_DIRS}
116     ${GLIB_INCLUDE_DIRS}
117     ${LIBSECCOMP_INCLUDE_DIRS}
118     ${LIBSECRET_INCLUDE_DIRS}
119     ${LIBSOUP_INCLUDE_DIRS}
120     ${LIBTASN1_INCLUDE_DIRS}
121     ${UPOWERGLIB_INCLUDE_DIRS}
122     ${ZLIB_INCLUDE_DIRS}
123 )
124
125 if (USE_OPENGL_ES)
126     list(APPEND WebCore_SOURCES
127         platform/graphics/opengl/Extensions3DOpenGLES.cpp
128         platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
129     )
130 endif ()
131
132 if (USE_OPENGL)
133     list(APPEND WebCore_SOURCES
134         platform/graphics/OpenGLShims.cpp
135
136         platform/graphics/opengl/Extensions3DOpenGL.cpp
137         platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
138     )
139 endif ()
140
141 if (ENABLE_PLUGIN_PROCESS_GTK2)
142     # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
143     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
144     # for the plugin process.
145     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
146     add_dependencies(WebCorePlatformGTK2 WebCore)
147     set_property(TARGET WebCorePlatformGTK2
148         APPEND
149         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
150     )
151     target_include_directories(WebCorePlatformGTK2 PRIVATE
152         ${WebCore_INCLUDE_DIRECTORIES}
153     )
154     target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
155         ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
156         ${GTK2_INCLUDE_DIRS}
157         ${GDK2_INCLUDE_DIRS}
158     )
159     target_link_libraries(WebCorePlatformGTK2
160          ${WebCore_LIBRARIES}
161          ${GTK2_LIBRARIES}
162          ${GDK2_LIBRARIES}
163     )
164 endif ()
165
166 if (ENABLE_WAYLAND_TARGET)
167     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
168         ${WAYLAND_INCLUDE_DIRS}
169     )
170     list(APPEND WebCore_LIBRARIES
171         ${WAYLAND_LIBRARIES}
172     )
173 endif ()
174
175 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
176 add_dependencies(WebCorePlatformGTK WebCore)
177 target_include_directories(WebCorePlatformGTK PRIVATE
178     ${WebCore_INCLUDE_DIRECTORIES}
179     ${WebCore_PRIVATE_INCLUDE_DIRECTORIES}
180 )
181 target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
182     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
183     ${GTK_INCLUDE_DIRS}
184     ${GDK_INCLUDE_DIRS}
185 )
186 target_link_libraries(WebCorePlatformGTK
187     ${WebCore_LIBRARIES}
188     ${GTK_LIBRARIES}
189     ${GDK_LIBRARIES}
190 )
191
192 include_directories(
193     ${WebCore_INCLUDE_DIRECTORIES}
194     "${WEBCORE_DIR}/bindings/gobject/"
195 )
196
197 include_directories(SYSTEM
198     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
199 )
200
201 add_definitions(-DBUILDING_WEBKIT)
202
203 if (ENABLE_SMOOTH_SCROLLING)
204     list(APPEND WebCore_SOURCES
205         platform/ScrollAnimationSmooth.cpp
206     )
207 endif ()