[CMake] Share build system options across ports
[WebKit-https.git] / Source / cmake / OptionsEfl.cmake
1 SET(PROJECT_VERSION_MAJOR 0)
2 SET(PROJECT_VERSION_MINOR 1)
3 SET(PROJECT_VERSION_PATCH 0)
4 SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
5
6 # -----------------------------------------------------------------------------
7 # We mention Safari version because many sites check for it.
8 # Sync with Source/WebCore/Configurations/Version.xcconfig whenever Safari is
9 # version up.
10 # -----------------------------------------------------------------------------
11 SET(WEBKIT_USER_AGENT_MAJOR_VERSION 534)
12 SET(WEBKIT_USER_AGENT_MINOR_VERSION 16)
13
14 ADD_DEFINITIONS(-DWTF_PLATFORM_EFL=1)
15 SET(WTF_PLATFORM_EFL 1)
16
17 # -----------------------------------------------------------------------------
18 # Determine which font backend will be used
19 # -----------------------------------------------------------------------------
20 SET(ALL_FONT_BACKENDS freetype pango)
21 SET(FONT_BACKEND "freetype" CACHE STRING "choose which network backend to use (one of ${ALL_FONT_BACKENDS})")
22
23 FIND_PACKAGE(Cairo 1.10 REQUIRED)
24 FIND_PACKAGE(EFL REQUIRED)
25 FIND_PACKAGE(Fontconfig 2.8.0 REQUIRED)
26 FIND_PACKAGE(Sqlite REQUIRED)
27 FIND_PACKAGE(LibXml2 2.6 REQUIRED)
28 FIND_PACKAGE(LibXslt 1.1.7 REQUIRED)
29 FIND_PACKAGE(ICU REQUIRED)
30 FIND_PACKAGE(Threads REQUIRED)
31 FIND_PACKAGE(JPEG REQUIRED)
32 FIND_PACKAGE(PNG REQUIRED)
33 FIND_PACKAGE(ZLIB REQUIRED)
34
35 FIND_PACKAGE(Glib 2.31.8 REQUIRED)
36 FIND_PACKAGE(Gthread REQUIRED)
37 FIND_PACKAGE(LibSoup2 2.37.92 REQUIRED)
38 SET(ENABLE_GLIB_SUPPORT ON)
39
40 SET(WTF_USE_SOUP 1)
41 ADD_DEFINITIONS(-DWTF_USE_SOUP=1)
42
43 ADD_DEFINITIONS(-DENABLE_CONTEXT_MENUS=0)
44
45 SET(WTF_USE_PTHREADS 1)
46 ADD_DEFINITIONS(-DWTF_USE_PTHREADS=1)
47
48 SET(WTF_USE_ICU_UNICODE 1)
49 ADD_DEFINITIONS(-DWTF_USE_ICU_UNICODE=1)
50
51 SET(WTF_USE_CAIRO 1)
52 ADD_DEFINITIONS(-DWTF_USE_CAIRO=1)
53
54 SET(JSC_EXECUTABLE_NAME jsc)
55
56 SET(WTF_LIBRARY_NAME wtf_efl)
57 SET(JavaScriptCore_LIBRARY_NAME javascriptcore_efl)
58 SET(WebCore_LIBRARY_NAME webcore_efl)
59 SET(WebKit_LIBRARY_NAME ewebkit)
60 SET(WebKit2_LIBRARY_NAME ewebkit2)
61
62 SET(DATA_INSTALL_DIR "share/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR}" CACHE PATH "Installation path for theme data")
63 SET(THEME_BINARY_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme)
64
65 SET(VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/eflsymbols.filter")
66
67 WEBKIT_OPTION_BEGIN()
68 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BATTERY_STATUS ON)
69 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FAST_MOBILE_SCROLLING ON)
70 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS ON)
71 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GLIB_SUPPORT ON)
72 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API OFF)
73 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_INFO ON)
74 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PAGE_VISIBILITY_API ON)
75 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REQUEST_ANIMATION_FRAME ON)
76 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHARED_WORKERS ON)
77 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIBRATION ON)
78 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO ON)
79 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WORKERS ON)
80 WEBKIT_OPTION_END()
81
82 OPTION(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
83 IF (ENABLE_ECORE_X)
84     IF (ECORE_X_FOUND)
85         MESSAGE(STATUS "Using Ecore-X to provide extended support.")
86         ADD_DEFINITIONS(-DHAVE_ECORE_X)
87     ELSE ()
88         MESSAGE(ERROR "Requested Ecore-X but it was not found!")
89     ENDIF ()
90 ENDIF ()
91
92 IF (FONT_BACKEND STREQUAL "freetype")
93   FIND_PACKAGE(Freetype REQUIRED)
94   SET(WTF_USE_FREETYPE 1)
95   ADD_DEFINITIONS(-DWTF_USE_FREETYPE=1)
96 ELSE ()
97   FIND_PACKAGE(Pango REQUIRED)
98   SET(WTF_USE_PANGO 1)
99   ADD_DEFINITIONS(-DWTF_USE_PANGO=1)
100 ENDIF ()
101
102 IF (NOT ENABLE_SVG)
103   SET(ENABLE_SVG_FONTS 0)
104 ENDIF ()
105
106 IF (ENABLE_VIDEO)
107   FIND_PACKAGE(GStreamer REQUIRED)
108   FIND_PACKAGE(GStreamer-App REQUIRED)
109   FIND_PACKAGE(GStreamer-Base REQUIRED)
110   FIND_PACKAGE(GStreamer-Pbutils REQUIRED)
111   FIND_PACKAGE(GStreamer-Interfaces REQUIRED)
112   FIND_PACKAGE(GStreamer-Plugins-Base REQUIRED)
113   FIND_PACKAGE(GStreamer-Video REQUIRED)
114   SET(WTF_USE_GSTREAMER 1)
115   ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)
116 ENDIF()
117
118 IF (ENABLE_WEBGL)
119   FIND_PACKAGE(OpenGL REQUIRED)
120 ENDIF ()
121
122 SET(CPACK_SOURCE_GENERATOR TBZ2)