summaryrefslogtreecommitdiff
path: root/Source/cmake/OptionsEfl.cmake
blob: 0f366d798d200c6a6980b490033d41442ab8d3de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
SET(PROJECT_VERSION_MAJOR 0)
SET(PROJECT_VERSION_MINOR 1)
SET(PROJECT_VERSION_PATCH 0)
SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})

ADD_DEFINITIONS(-DBUILDING_EFL__=1)
ADD_DEFINITIONS(-DWTF_PLATFORM_EFL=1)
SET(WTF_PLATFORM_EFL 1)

FIND_PACKAGE(Cairo 1.10.2 REQUIRED)
FIND_PACKAGE(Fontconfig 2.8.0 REQUIRED)
FIND_PACKAGE(Sqlite REQUIRED)
FIND_PACKAGE(LibXml2 2.8.0 REQUIRED)
FIND_PACKAGE(LibXslt 1.1.7 REQUIRED)
FIND_PACKAGE(ICU REQUIRED)
FIND_PACKAGE(Threads REQUIRED)
FIND_PACKAGE(JPEG REQUIRED)
FIND_PACKAGE(PNG REQUIRED)
FIND_PACKAGE(ZLIB REQUIRED)

FIND_PACKAGE(GLIB 2.33.2 REQUIRED COMPONENTS gio gobject gthread)
FIND_PACKAGE(LibSoup 2.39.4.1 REQUIRED)
SET(ENABLE_GLIB_SUPPORT ON)

SET(WTF_USE_SOUP 1)
ADD_DEFINITIONS(-DWTF_USE_SOUP=1)

ADD_DEFINITIONS(-DENABLE_CONTEXT_MENUS=1)

SET(WTF_USE_PTHREADS 1)
ADD_DEFINITIONS(-DWTF_USE_PTHREADS=1)

SET(WTF_USE_ICU_UNICODE 1)
ADD_DEFINITIONS(-DWTF_USE_ICU_UNICODE=1)

SET(WTF_USE_CAIRO 1)
ADD_DEFINITIONS(-DWTF_USE_CAIRO=1)

SET(JSC_EXECUTABLE_NAME jsc)

SET(WTF_LIBRARY_NAME wtf_efl)
SET(JavaScriptCore_LIBRARY_NAME javascriptcore_efl)
SET(WebCore_LIBRARY_NAME webcore_efl)
SET(WebKit_LIBRARY_NAME ewebkit)
SET(WebKit2_LIBRARY_NAME ewebkit2)

SET(DATA_INSTALL_DIR "share/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR}" CACHE PATH "Installation path for theme data")
SET(THEME_BINARY_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme)
FILE(MAKE_DIRECTORY ${THEME_BINARY_DIR})

SET(VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/eflsymbols.filter")

WEBKIT_OPTION_BEGIN()
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ANIMATION_API ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BATTERY_STATUS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BLOB ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS3_TEXT ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_IMAGE_SET ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_STICKY_POSITION ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_VARIABLES ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CUSTOM_SCHEME_HANDLER ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DATALIST_ELEMENT ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOWNLOAD_ATTRIBUTE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FAST_MOBILE_SCROLLING ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GLIB_SUPPORT ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LINK_PREFETCH ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LLINT ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CAPTURE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MICRODATA ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NAVIGATOR_CONTENT_UTILS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_INFO ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PAGE_VISIBILITY_API ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REGIONS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REQUEST_ANIMATION_FRAME ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHADOW_DOM ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHARED_WORKERS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SPELLCHECK ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIBRATION ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO_TRACK ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_INTENTS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_INTENTS_TAG ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_TIMING ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WORKERS ON)

# FIXME: Perhaps we need a more generic way of defining dependencies between features.
# VIDEO_TRACK depends on VIDEO.
IF (NOT ENABLE_VIDEO AND ENABLE_VIDEO_TRACK)
    MESSAGE(STATUS "Disabling VIDEO_TRACK since VIDEO support is disabled.")
    SET(ENABLE_VIDEO_TRACK OFF)
ENDIF ()
WEBKIT_OPTION_END()

OPTION(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
IF (ENABLE_ECORE_X)
    LIST(APPEND ECORE_ADDITIONAL_COMPONENTS X)
    ADD_DEFINITIONS(-DHAVE_ECORE_X)
ENDIF ()

FIND_PACKAGE(Eina 1.7 REQUIRED)
FIND_PACKAGE(Evas 1.7 REQUIRED)
FIND_PACKAGE(Ecore 1.7 COMPONENTS Evas File Input ${ECORE_ADDITIONAL_COMPONENTS})
FIND_PACKAGE(Edje 1.7 REQUIRED)
FIND_PACKAGE(Eet 1.7 REQUIRED)
FIND_PACKAGE(Eeze 1.7 REQUIRED)
FIND_PACKAGE(Efreet 1.7 REQUIRED)
FIND_PACKAGE(E_DBus 1.7 COMPONENTS EUKit)

# Elementary is needed to build MiniBrowser
FIND_PACKAGE(Elementary 1.7)

FIND_PACKAGE(Freetype 2.4.2 REQUIRED)
FIND_PACKAGE(HarfBuzz 0.9.2 REQUIRED)
SET(WTF_USE_FREETYPE 1)
SET(WTF_USE_HARFBUZZ_NG 1)
ADD_DEFINITIONS(-DWTF_USE_FREETYPE=1)
ADD_DEFINITIONS(-DWTF_USE_HARFBUZZ_NG=1)

IF (ENABLE_WEBKIT2 AND ENABLE_NETSCAPE_PLUGIN_API)
    SET(ENABLE_PLUGIN_PROCESS 1)
ENDIF ()

IF (NOT ENABLE_SVG)
  SET(ENABLE_SVG_FONTS 0)
ENDIF ()

IF (ENABLE_BATTERY_STATUS)
    FIND_PACKAGE(DBus REQUIRED)
ENDIF ()

IF (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
    SET(GSTREAMER_COMPONENTS app interfaces pbutils)
    SET(WTF_USE_GSTREAMER 1)
    ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)

    IF (ENABLE_VIDEO)
        LIST(APPEND GSTREAMER_COMPONENTS video)
    ENDIF()

    IF (ENABLE_WEB_AUDIO)
        LIST(APPEND GSTREAMER_COMPONENTS audio fft)
        ADD_DEFINITIONS(-DWTF_USE_WEBAUDIO_GSTREAMER=1)
    ENDIF ()

    FIND_PACKAGE(GStreamer REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
ENDIF ()

IF (ENABLE_WEBGL)
  FIND_PACKAGE(OpenGL REQUIRED)
ENDIF ()

IF (ENABLE_INSPECTOR)
    SET(WEB_INSPECTOR_DIR "${DATA_INSTALL_DIR}/inspector")
    ADD_DEFINITIONS(-DWEB_INSPECTOR_DIR=\"${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}\")
    ADD_DEFINITIONS(-DWEB_INSPECTOR_INSTALL_DIR=\"${CMAKE_INSTALL_PREFIX}/${WEB_INSPECTOR_DIR}\")
ENDIF ()

SET(CPACK_SOURCE_GENERATOR TBZ2)

IF (WTF_USE_TILED_BACKING_STORE)
  SET(WTF_USE_ACCELERATED_COMPOSITING 1)
  ADD_DEFINITIONS(-DWTF_USE_ACCELERATED_COMPOSITING=1)

  SET(WTF_USE_COORDINATED_GRAPHICS 1)
  ADD_DEFINITIONS(-DWTF_USE_COORDINATED_GRAPHICS=1)

  SET(WTF_USE_TEXTURE_MAPPER 1)
  ADD_DEFINITIONS(-DWTF_USE_TEXTURE_MAPPER=1)

  SET(WTF_USE_TEXTURE_MAPPER_GL 1)
  ADD_DEFINITIONS(-DWTF_USE_TEXTURE_MAPPER_GL=1)

  SET(WTF_USE_3D_GRAPHICS 1)
  ADD_DEFINITIONS(-DWTF_USE_3D_GRAPHICS=1)

  FIND_PACKAGE(OpenGL REQUIRED)
ENDIF()

IF (ENABLE_SPELLCHECK)
      FIND_PACKAGE(Enchant REQUIRED)
      ADD_DEFINITIONS(-DENABLE_SPELLCHECK=1)
ENDIF()