Source/WebKit:
[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/generic"
22     "${WEBCORE_DIR}/platform/gtk"
23     "${WEBCORE_DIR}/platform/graphics/egl"
24     "${WEBCORE_DIR}/platform/graphics/glx"
25     "${WEBCORE_DIR}/platform/graphics/gstreamer"
26     "${WEBCORE_DIR}/platform/graphics/gtk"
27     "${WEBCORE_DIR}/platform/graphics/opengl"
28     "${WEBCORE_DIR}/platform/graphics/opentype"
29     "${WEBCORE_DIR}/platform/graphics/wayland"
30     "${WEBCORE_DIR}/platform/graphics/x11"
31     "${WEBCORE_DIR}/platform/mediacapabilities"
32     "${WEBCORE_DIR}/platform/mediastream/gtk"
33     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
34     "${WEBCORE_DIR}/platform/mock/mediasource"
35     "${WEBCORE_DIR}/platform/network/gtk"
36     "${WEBCORE_DIR}/platform/text/gtk"
37 )
38
39 if (USE_WPE_RENDERER)
40     list(APPEND WebCore_INCLUDE_DIRECTORIES
41         "${WEBCORE_DIR}/platform/graphics/libwpe"
42     )
43 endif ()
44
45 list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
46     platform/graphics/x11/PlatformDisplayX11.h
47     platform/graphics/x11/XErrorTrapper.h
48     platform/graphics/x11/XUniquePtr.h
49     platform/graphics/x11/XUniqueResource.h
50
51     platform/gtk/CompositionResults.h
52     platform/gtk/GRefPtrGtk.h
53     platform/gtk/GUniquePtrGtk.h
54     platform/gtk/GtkUtilities.h
55     platform/gtk/PasteboardHelper.h
56     platform/gtk/SelectionData.h
57
58     platform/text/enchant/TextCheckerEnchant.h
59 )
60
61 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
62     ${WEBCORE_DIR}/css/mediaControlsGtk.css
63 )
64
65 set(WebCore_USER_AGENT_SCRIPTS
66     ${WEBCORE_DIR}/en.lproj/mediaControlsLocalizedStrings.js
67     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.js
68     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
69 )
70
71 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
72
73 list(APPEND WebCore_LIBRARIES
74     ${ATK_LIBRARIES}
75     ${ENCHANT_LIBRARIES}
76     ${GDK_LIBRARIES}
77     ${GLIB_GIO_LIBRARIES}
78     ${GLIB_GMODULE_LIBRARIES}
79     ${GLIB_GOBJECT_LIBRARIES}
80     ${GLIB_LIBRARIES}
81     ${GTK_LIBRARIES}
82     ${LIBSECCOMP_LIBRARIES}
83     ${LIBSECRET_LIBRARIES}
84     ${LIBTASN1_LIBRARIES}
85     ${HYPHEN_LIBRARIES}
86     ${UPOWERGLIB_LIBRARIES}
87     ${X11_X11_LIB}
88     ${X11_Xcomposite_LIB}
89     ${X11_Xdamage_LIB}
90     ${X11_Xrender_LIB}
91     ${X11_Xt_LIB}
92     ${ZLIB_LIBRARIES}
93 )
94
95 if (USE_WPE_RENDERER)
96     list(APPEND WebCore_LIBRARIES
97         ${WPE_LIBRARIES}
98     )
99 endif ()
100
101 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
102     ${ATK_INCLUDE_DIRS}
103     ${ENCHANT_INCLUDE_DIRS}
104     ${GDK_INCLUDE_DIRS}
105     ${GIO_UNIX_INCLUDE_DIRS}
106     ${GLIB_INCLUDE_DIRS}
107     ${GTK_INCLUDE_DIRS}
108     ${LIBSECCOMP_INCLUDE_DIRS}
109     ${LIBSECRET_INCLUDE_DIRS}
110     ${LIBTASN1_INCLUDE_DIRS}
111     ${UPOWERGLIB_INCLUDE_DIRS}
112     ${ZLIB_INCLUDE_DIRS}
113 )
114
115 if (USE_WPE_RENDERER)
116     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
117         ${WPE_INCLUDE_DIRS}
118     )
119 endif ()
120
121 if (USE_OPENGL_ES)
122     list(APPEND WebCore_SOURCES
123         platform/graphics/opengl/Extensions3DOpenGLES.cpp
124         platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
125     )
126 endif ()
127
128 if (USE_OPENGL)
129     list(APPEND WebCore_SOURCES
130         platform/graphics/OpenGLShims.cpp
131
132         platform/graphics/opengl/Extensions3DOpenGL.cpp
133         platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
134     )
135 endif ()
136
137 if (ENABLE_WAYLAND_TARGET)
138     list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
139         platform/graphics/wayland/PlatformDisplayWayland.h
140         platform/graphics/wayland/WlUniquePtr.h
141     )
142     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
143         ${WAYLAND_INCLUDE_DIRS}
144     )
145     list(APPEND WebCore_LIBRARIES
146         ${WAYLAND_LIBRARIES}
147     )
148 endif ()
149
150 include_directories(SYSTEM
151     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
152 )
153
154 list(APPEND WebCoreTestSupport_LIBRARIES PRIVATE ${GTK_LIBRARIES})
155 list(APPEND WebCoreTestSupport_SYSTEM_INCLUDE_DIRECTORIES ${GTK_INCLUDE_DIRS})
156
157 add_definitions(-DBUILDING_WEBKIT)
158
159 if (ENABLE_SMOOTH_SCROLLING)
160     list(APPEND WebCore_SOURCES
161         platform/ScrollAnimationSmooth.cpp
162     )
163 endif ()