[cmake] Include WTF, JSC, and WebCore headers automatically to targers using them
[WebKit-https.git] / Source / WebCore / PlatformEfl.cmake
1 include(platform/GStreamer.cmake)
2 include(platform/ImageDecoders.cmake)
3 include(platform/Linux.cmake)
4 include(platform/TextureMapper.cmake)
5
6 list(APPEND WebCore_INCLUDE_DIRECTORIES
7     "${THIRDPARTY_DIR}/ANGLE/"
8     "${THIRDPARTY_DIR}/ANGLE/include/KHR"
9     "${WEBCORE_DIR}/editing/atk"
10     "${WEBCORE_DIR}/page/efl"
11     "${WEBCORE_DIR}/platform/cairo"
12     "${WEBCORE_DIR}/platform/efl"
13     "${WEBCORE_DIR}/platform/gamepad"
14     "${WEBCORE_DIR}/platform/gamepad/deprecated"
15     "${WEBCORE_DIR}/platform/gamepad/efl"
16     "${WEBCORE_DIR}/platform/geoclue"
17     "${WEBCORE_DIR}/platform/graphics/cairo"
18     "${WEBCORE_DIR}/platform/graphics/efl"
19     "${WEBCORE_DIR}/platform/graphics/freetype"
20     "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
21     "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
22     "${WEBCORE_DIR}/platform/graphics/opengl"
23     "${WEBCORE_DIR}/platform/graphics/opentype"
24     "${WEBCORE_DIR}/platform/graphics/surfaces"
25     "${WEBCORE_DIR}/platform/graphics/surfaces/efl"
26     "${WEBCORE_DIR}/platform/graphics/surfaces/glx"
27     "${WEBCORE_DIR}/platform/graphics/x11"
28     "${WEBCORE_DIR}/platform/mock/mediasource"
29     "${WEBCORE_DIR}/platform/network/soup"
30     "${WEBCORE_DIR}/platform/text/efl"
31     "${WEBCORE_DIR}/plugins/efl"
32 )
33
34 list(APPEND WebCore_SOURCES
35     accessibility/atk/AXObjectCacheAtk.cpp
36     accessibility/atk/AccessibilityObjectAtk.cpp
37     accessibility/atk/WebKitAccessibleHyperlink.cpp
38     accessibility/atk/WebKitAccessibleInterfaceAction.cpp
39     accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
40     accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
41     accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
42     accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
43     accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
44     accessibility/atk/WebKitAccessibleInterfaceImage.cpp
45     accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
46     accessibility/atk/WebKitAccessibleInterfaceTable.cpp
47     accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp
48     accessibility/atk/WebKitAccessibleInterfaceText.cpp
49     accessibility/atk/WebKitAccessibleInterfaceValue.cpp
50     accessibility/atk/WebKitAccessibleUtil.cpp
51     accessibility/atk/WebKitAccessibleWrapperAtk.cpp
52
53     editing/atk/FrameSelectionAtk.cpp
54
55     editing/efl/EditorEfl.cpp
56
57     html/shadow/MediaControlsApple.cpp
58
59     loader/soup/CachedRawResourceSoup.cpp
60     loader/soup/SubresourceLoaderSoup.cpp
61
62     page/efl/DragControllerEfl.cpp
63     page/efl/EventHandlerEfl.cpp
64
65     page/scrolling/AxisScrollSnapOffsets.cpp
66
67     platform/KillRingNone.cpp
68     platform/StaticPasteboard.cpp
69
70     platform/audio/efl/AudioBusEfl.cpp
71
72     platform/crypto/gcrypt/CryptoDigestGCrypt.cpp
73
74     platform/efl/CursorEfl.cpp
75     platform/efl/DragDataEfl.cpp
76     platform/efl/DragImageEfl.cpp
77     platform/efl/EflInspectorUtilities.cpp
78     platform/efl/EflKeyboardUtilities.cpp
79     platform/efl/EflScreenUtilities.cpp
80     platform/efl/ErrorsEfl.cpp
81     platform/efl/EventLoopEfl.cpp
82     platform/efl/FileSystemEfl.cpp
83     platform/efl/LocalizedStringsEfl.cpp
84     platform/efl/MIMETypeRegistryEfl.cpp
85     platform/efl/MainThreadSharedTimerEfl.cpp
86     platform/efl/PasteboardEfl.cpp
87     platform/efl/PlatformKeyboardEventEfl.cpp
88     platform/efl/PlatformMouseEventEfl.cpp
89     platform/efl/PlatformScreenEfl.cpp
90     platform/efl/PlatformWheelEventEfl.cpp
91     platform/efl/ScrollbarThemeEfl.cpp
92     platform/efl/SoundEfl.cpp
93     platform/efl/TemporaryLinkStubs.cpp
94     platform/efl/UserAgentEfl.cpp
95     platform/efl/WidgetEfl.cpp
96
97     platform/gamepad/efl/GamepadsEfl.cpp
98
99     platform/geoclue/GeolocationProviderGeoclue1.cpp
100     platform/geoclue/GeolocationProviderGeoclue2.cpp
101
102     platform/glib/KeyedDecoderGlib.cpp
103     platform/glib/KeyedEncoderGlib.cpp
104
105     platform/graphics/PlatformDisplay.cpp
106
107     platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp
108     platform/graphics/cairo/CairoUtilities.cpp
109     platform/graphics/cairo/FontCairo.cpp
110     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
111     platform/graphics/cairo/GradientCairo.cpp
112     platform/graphics/cairo/GraphicsContextCairo.cpp
113     platform/graphics/cairo/ImageBufferCairo.cpp
114     platform/graphics/cairo/ImageCairo.cpp
115     platform/graphics/cairo/IntRectCairo.cpp
116     platform/graphics/cairo/NativeImageCairo.cpp
117     platform/graphics/cairo/PathCairo.cpp
118     platform/graphics/cairo/PatternCairo.cpp
119     platform/graphics/cairo/PlatformContextCairo.cpp
120     platform/graphics/cairo/PlatformPathCairo.cpp
121     platform/graphics/cairo/RefPtrCairo.cpp
122     platform/graphics/cairo/TransformationMatrixCairo.cpp
123
124     platform/graphics/efl/CairoUtilitiesEfl.cpp
125     platform/graphics/efl/EvasGLContext.cpp
126     platform/graphics/efl/EvasGLSurface.cpp
127     platform/graphics/efl/GraphicsContext3DEfl.cpp
128     platform/graphics/efl/GraphicsContext3DPrivate.cpp
129     platform/graphics/efl/IconEfl.cpp
130     platform/graphics/efl/ImageBufferEfl.cpp
131     platform/graphics/efl/ImageEfl.cpp
132     platform/graphics/efl/IntPointEfl.cpp
133     platform/graphics/efl/IntRectEfl.cpp
134
135     platform/graphics/freetype/FontCacheFreeType.cpp
136     platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
137     platform/graphics/freetype/FontPlatformDataFreeType.cpp
138     platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
139     platform/graphics/freetype/SimpleFontDataFreeType.cpp
140
141     platform/graphics/gstreamer/ImageGStreamerCairo.cpp
142
143     platform/graphics/harfbuzz/HarfBuzzFace.cpp
144     platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
145     platform/graphics/harfbuzz/HarfBuzzShaper.cpp
146
147     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
148     platform/graphics/opengl/GLPlatformContext.cpp
149     platform/graphics/opengl/GLPlatformSurface.cpp
150     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
151     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
152
153     platform/graphics/opentype/OpenTypeVerticalData.cpp
154
155     platform/graphics/surfaces/GLTransportSurface.cpp
156     platform/graphics/surfaces/GraphicsSurface.cpp
157
158     platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp
159
160     platform/graphics/surfaces/glx/X11Helper.cpp
161
162     platform/graphics/x11/PlatformDisplayX11.cpp
163     platform/graphics/x11/XErrorTrapper.cpp
164     platform/graphics/x11/XUniqueResource.cpp
165
166     platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
167     platform/image-encoders/JPEGImageEncoder.cpp
168
169     platform/network/efl/NetworkStateNotifierEfl.cpp
170
171     platform/network/soup/AuthenticationChallengeSoup.cpp
172     platform/network/soup/CertificateInfo.cpp
173     platform/network/soup/CookieJarSoup.cpp
174     platform/network/soup/CookieStorageSoup.cpp
175     platform/network/soup/CredentialStorageSoup.cpp
176     platform/network/soup/DNSSoup.cpp
177     platform/network/soup/GRefPtrSoup.cpp
178     platform/network/soup/NetworkStorageSessionSoup.cpp
179     platform/network/soup/ProxyServerSoup.cpp
180     platform/network/soup/ResourceErrorSoup.cpp
181     platform/network/soup/ResourceHandleSoup.cpp
182     platform/network/soup/ResourceRequestSoup.cpp
183     platform/network/soup/ResourceResponseSoup.cpp
184     platform/network/soup/SocketStreamHandleImplSoup.cpp
185     platform/network/soup/SoupNetworkSession.cpp
186     platform/network/soup/SynchronousLoaderClientSoup.cpp
187     platform/network/soup/WebKitSoupRequestGeneric.cpp
188
189     platform/posix/FileSystemPOSIX.cpp
190     platform/posix/SharedBufferPOSIX.cpp
191
192     platform/soup/PublicSuffixSoup.cpp
193     platform/soup/SharedBufferSoup.cpp
194     platform/soup/URLSoup.cpp
195
196     platform/text/Hyphenation.cpp
197     platform/text/LocaleICU.cpp
198
199     platform/text/enchant/TextCheckerEnchant.cpp
200
201     platform/text/hyphen/HyphenationLibHyphen.cpp
202
203     platform/unix/LoggingUnix.cpp
204
205     rendering/RenderThemeEfl.cpp
206 )
207
208 if (USE_GEOCLUE2)
209     list(APPEND WebCore_DERIVED_SOURCES
210         ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c
211     )
212     execute_process(COMMAND pkg-config --variable dbus_interface geoclue-2.0 OUTPUT_VARIABLE GEOCLUE_DBUS_INTERFACE)
213     add_custom_command(
214          OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.h
215          COMMAND gdbus-codegen --interface-prefix org.freedesktop.GeoClue2. --c-namespace Geoclue --generate-c-code ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface ${GEOCLUE_DBUS_INTERFACE}
216     )
217     set_source_files_properties(${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
218
219 endif ()
220
221 if (ENABLE_GAMEPAD_DEPRECATED)
222     # FIXME: GAMEPAD_DEPRECATED is legacy implementation. Need to be removed.
223     list(REMOVE_ITEM WebCore_INCLUDE_DIRECTORIES
224         "${WEBCORE_DIR}/Modules/gamepad"
225     )
226 endif ()
227
228 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
229     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.css
230 )
231
232 set(WebCore_USER_AGENT_SCRIPTS
233     ${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js
234     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.js
235 )
236
237 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/efl/RenderThemeEfl.cpp)
238
239 list(APPEND WebCore_LIBRARIES
240     ${CAIRO_LIBRARIES}
241     ${ECORE_EVAS_LIBRARIES}
242     ${ECORE_FILE_LIBRARIES}
243     ${ECORE_LIBRARIES}
244     ${ECORE_X_LIBRARIES}
245     ${EDJE_LIBRARIES}
246     ${EEZE_LIBRARIES}
247     ${EINA_LIBRARIES}
248     ${ELDBUS_LIBRARIES}
249     ${EO_LIBRARIES}
250     ${EVAS_LIBRARIES}
251     ${FONTCONFIG_LIBRARIES}
252     ${FREETYPE2_LIBRARIES}
253     ${GEOCLUE_LIBRARIES}
254     ${GLIB_GIO_LIBRARIES}
255     ${GLIB_GOBJECT_LIBRARIES}
256     ${GLIB_LIBRARIES}
257     ${HARFBUZZ_LIBRARIES}
258     ${LIBGCRYPT_LIBRARIES}
259     ${LIBSOUP_LIBRARIES}
260     ${LIBXML2_LIBRARIES}
261     ${LIBXSLT_LIBRARIES}
262     ${HYPHEN_LIBRARIES}
263     ${SQLITE_LIBRARIES}
264     ${X11_X11_LIB}
265     ${ZLIB_LIBRARIES}
266 )
267
268 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
269     ${CAIRO_INCLUDE_DIRS}
270     ${ECORE_INCLUDE_DIRS}
271     ${ECORE_EVAS_INCLUDE_DIRS}
272     ${ECORE_FILE_INCLUDE_DIRS}
273     ${ECORE_X_INCLUDE_DIRS}
274     ${EO_INCLUDE_DIRS}
275     ${EDJE_INCLUDE_DIRS}
276     ${EEZE_INCLUDE_DIRS}
277     ${EINA_INCLUDE_DIRS}
278     ${ELDBUS_INCLUDE_DIRS}
279     ${EVAS_INCLUDE_DIRS}
280     ${FREETYPE2_INCLUDE_DIRS}
281     ${GEOCLUE_INCLUDE_DIRS}
282     ${GIO_UNIX_INCLUDE_DIRS}
283     ${LIBGCRYPT_INCLUDE_DIRS}
284     ${LIBXML2_INCLUDE_DIR}
285     ${LIBXSLT_INCLUDE_DIR}
286     ${SQLITE_INCLUDE_DIR}
287     ${GLIB_INCLUDE_DIRS}
288     ${LIBSOUP_INCLUDE_DIRS}
289     ${ZLIB_INCLUDE_DIRS}
290     ${HARFBUZZ_INCLUDE_DIRS}
291 )
292
293 if (USE_EGL)
294     list(APPEND WebCore_INCLUDE_DIRECTORIES
295         "${WEBCORE_DIR}/platform/graphics/surfaces/egl"
296     )
297 endif ()
298
299 if (USE_EGL)
300     list(APPEND WebCore_SOURCES
301         platform/graphics/surfaces/egl/EGLConfigSelector.cpp
302         platform/graphics/surfaces/egl/EGLContext.cpp
303         platform/graphics/surfaces/egl/EGLHelper.cpp
304         platform/graphics/surfaces/egl/EGLSurface.cpp
305         platform/graphics/surfaces/egl/EGLXSurface.cpp
306     )
307 else ()
308     list(APPEND WebCore_SOURCES
309         platform/graphics/surfaces/glx/GLXContext.cpp
310         platform/graphics/surfaces/glx/GLXSurface.cpp
311     )
312 endif ()
313
314 if (USE_OPENGL_ES_2)
315     list(APPEND WebCore_SOURCES
316         platform/graphics/opengl/Extensions3DOpenGLES.cpp
317         platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
318     )
319 else ()
320     list(APPEND WebCore_SOURCES
321         platform/graphics/OpenGLShims.cpp
322
323         platform/graphics/opengl/Extensions3DOpenGL.cpp
324         platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
325     )
326 endif ()
327
328 if (NOT USE_EGL AND X11_Xcomposite_FOUND AND X11_Xrender_FOUND)
329     list(APPEND WebCore_LIBRARIES
330         ${X11_Xcomposite_LIB}
331         ${X11_Xrender_LIB}
332     )
333 endif ()
334
335 if (ENABLE_WEB_AUDIO)
336     set(WEB_AUDIO_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webaudio/resources)
337     file(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav")
338     install(FILES ${WEB_AUDIO_DATA} DESTINATION ${WEB_AUDIO_DIR})
339     add_definitions(-DUNINSTALLED_AUDIO_RESOURCES_DIR="${WEBCORE_DIR}/platform/audio/resources")
340 endif ()
341
342 if (ENABLE_SPELLCHECK)
343     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
344         ${ENCHANT_INCLUDE_DIRS}
345     )
346     list(APPEND WebCore_LIBRARIES
347         ${ENCHANT_LIBRARIES}
348     )
349 endif ()
350
351 if (ENABLE_ACCESSIBILITY)
352     list(APPEND WebCore_INCLUDE_DIRECTORIES
353         "${WEBCORE_DIR}/accessibility/atk"
354     )
355     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
356         ${ATK_INCLUDE_DIRS}
357     )
358     list(APPEND WebCore_LIBRARIES
359         ${ATK_LIBRARIES}
360     )
361 endif ()
362
363 if (ENABLE_SMOOTH_SCROLLING)
364     list(APPEND WebCore_SOURCES
365         platform/ScrollAnimationSmooth.cpp
366         platform/ScrollAnimatorSmooth.cpp
367     )
368 endif ()
369
370 if (ENABLE_SPEECH_SYNTHESIS)
371     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
372         ${ESPEAK_INCLUDE_DIRS}
373     )
374     list(APPEND WebCore_LIBRARIES
375         ${ESPEAK_LIBRARIES}
376     )
377     list(APPEND WebCore_SOURCES
378         platform/efl/PlatformSpeechSynthesisProviderEfl.cpp
379         platform/efl/PlatformSpeechSynthesizerEfl.cpp
380     )
381 endif ()
382
383 if (ENABLE_SUBTLE_CRYPTO)
384     list(APPEND WebCore_SOURCES
385         crypto/CryptoAlgorithm.cpp
386         crypto/CryptoAlgorithmRegistry.cpp
387         crypto/CryptoKey.cpp
388         crypto/SubtleCrypto.cpp
389         crypto/WebKitSubtleCrypto.cpp
390
391         crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
392         crypto/algorithms/CryptoAlgorithmAES_KW.cpp
393         crypto/algorithms/CryptoAlgorithmHMAC.cpp
394         crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
395         crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
396         crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
397         crypto/algorithms/CryptoAlgorithmSHA1.cpp
398         crypto/algorithms/CryptoAlgorithmSHA224.cpp
399         crypto/algorithms/CryptoAlgorithmSHA256.cpp
400         crypto/algorithms/CryptoAlgorithmSHA384.cpp
401         crypto/algorithms/CryptoAlgorithmSHA512.cpp
402
403         crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp
404
405         crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp
406         crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp
407         crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp
408         crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp
409         crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp
410         crypto/gnutls/CryptoAlgorithmRegistryGnuTLS.cpp
411         crypto/gnutls/CryptoKeyRSAGnuTLS.cpp
412         crypto/gnutls/SerializedCryptoKeyWrapGnuTLS.cpp
413
414         crypto/keys/CryptoKeyAES.cpp
415         crypto/keys/CryptoKeyDataOctetSequence.cpp
416         crypto/keys/CryptoKeyDataRSAComponents.cpp
417         crypto/keys/CryptoKeyHMAC.cpp
418         crypto/keys/CryptoKeyRSA.cpp
419         crypto/keys/CryptoKeySerializationRaw.cpp
420     )
421 endif ()
422
423 if (DEVELOPER_MODE)
424     if (USE_LIBHYPHEN AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/WebKitBuild/DependenciesEFL)
425         add_definitions(-DTEST_HYPHENATAION_PATH=\"${CMAKE_SOURCE_DIR}/WebKitBuild/DependenciesEFL/Root/webkitgtk-test-dicts\")
426     endif ()
427 endif ()