2011-06-03 Alexis Menard <alexis.menard@openbossa.org>
[WebKit.git] / Source / WebKit / efl / CMakeListsEfl.txt
1 INCLUDE(WebKitEfl)
2
3 LIST(APPEND WebKit_LINK_FLAGS
4     ${ECORE_X_LDFLAGS}
5     ${EDJE_LDFLAGS}
6     ${EFLDEPS_LDFLAGS}
7     ${EVAS_LDFLAGS}
8 )
9
10 LIST(APPEND WebKit_INCLUDE_DIRECTORIES
11     "${WEBKIT_DIR}/efl/ewk"
12     "${WEBKIT_DIR}/efl/WebCoreSupport"
13     "${WEBCORE_DIR}/platform/efl"
14     "${WEBCORE_DIR}/platform/graphics/cairo"
15     ${Cairo_INCLUDE_DIRS}
16     ${ECORE_X_INCLUDE_DIRS}
17     ${EDJE_INCLUDE_DIRS}
18     ${EFLDEPS_INCLUDE_DIRS}
19     ${EVAS_INCLUDE_DIRS}
20     ${LIBXML2_INCLUDE_DIR}
21     ${LIBXSLT_INCLUDE_DIRS}
22     ${SQLITE_INCLUDE_DIRS}
23 )
24
25 IF (ENABLE_VIDEO)
26 LIST(APPEND WebKit_INCLUDE_DIRECTORIES
27     "${WEBCORE_DIR}/platform/graphics/gstreamer"
28     ${GStreamer-App_INCLUDE_DIRS}
29     ${GStreamer-Interfaces_INCLUDE_DIRS}
30     ${GStreamer-Pbutils_INCLUDE_DIRS}
31     ${GStreamer-Video_INCLUDE_DIRS}
32 )
33 ENDIF()
34
35 IF (WTF_USE_FREETYPE)
36   LIST(APPEND WebKit_INCLUDE_DIRECTORIES
37     "${WEBCORE_DIR}/platform/graphics/freetype"
38   )
39 ENDIF ()
40
41 IF (WTF_USE_PANGO)
42   LIST(APPEND WebKit_INCLUDE_DIRECTORIES
43     "${WEBCORE_DIR}/platform/graphics/pango"
44     ${Pango_INCLUDE_DIRS}
45   )
46   LIST(APPEND WebKit_LIBRARIES
47     ${Pango_LIBRARIES}
48   )
49 ENDIF ()
50
51 LIST(APPEND WebKit_SOURCES
52     efl/WebCoreSupport/ChromeClientEfl.cpp
53     efl/WebCoreSupport/DragClientEfl.cpp
54     efl/WebCoreSupport/EditorClientEfl.cpp
55     efl/WebCoreSupport/FrameLoaderClientEfl.cpp
56     efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
57     efl/WebCoreSupport/InspectorClientEfl.cpp
58
59     efl/ewk/ewk_contextmenu.cpp
60     efl/ewk/ewk_cookies.cpp
61     efl/ewk/ewk_frame.cpp
62     efl/ewk/ewk_history.cpp
63     efl/ewk/ewk_main.cpp
64     efl/ewk/ewk_settings.cpp
65     efl/ewk/ewk_tiled_backing_store.c
66     efl/ewk/ewk_tiled_matrix.c
67     efl/ewk/ewk_tiled_model.c
68     efl/ewk/ewk_util.cpp
69     efl/ewk/ewk_view.cpp
70     efl/ewk/ewk_view_single.c
71     efl/ewk/ewk_view_tiled.c
72     efl/ewk/ewk_window_features.cpp
73 )
74
75 LIST(APPEND WebKit_LIBRARIES
76     ${Cairo_LIBRARIES}
77     ${ECORE_X_LIBRARIES}
78     ${EFLDEPS_LIBRARIES}
79     ${Freetype_LIBRARIES}
80     ${LIBXML2_LIBRARIES}
81     ${SQLITE_LIBRARIES}
82     ${FONTCONFIG_LIBRARIES}
83     ${PNG_LIBRARY}
84     ${JPEG_LIBRARY}
85     ${CMAKE_DL_LIBS}
86 )
87
88 IF (ENABLE_GLIB_SUPPORT)
89   LIST(APPEND WebKit_INCLUDE_DIRECTORIES
90     ${Gdk_INCLUDE_DIRS}
91     ${Glib_INCLUDE_DIRS}
92     ${JAVASCRIPTCORE_DIR}/wtf/gobject
93   )
94   LIST(APPEND WebKit_LIBRARIES
95     ${Glib_LIBRARIES}
96     ${Gdk_LIBRARIES}
97   )
98 ENDIF ()
99
100 IF (WTF_USE_SOUP)
101   LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${LIBSOUP24_INCLUDE_DIRS})
102   LIST(APPEND WebKit_LIBRARIES ${LIBSOUP24_LIBRARIES})
103 ENDIF ()
104
105 IF (WTF_USE_CURL)
106   LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${CURL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
107   LIST(APPEND WebKit_LIBRARIES ${CURL_LIBRARIES} ${ZLIB_LIBRARIES})
108 ENDIF ()
109
110 SET(BUILD_DATA_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme)
111 SET(BUILD_DATA_DIR ${BUILD_DATA_DIR} PARENT_SCOPE)
112 FILE(MAKE_DIRECTORY ${BUILD_DATA_DIR})
113
114 SET(WebKit_THEME_DEFINITION "")
115 IF (ENABLE_PROGRESS_TAG)
116   LIST(APPEND WebKit_THEME_DEFINITION "-DENABLE_PROGRESS_TAG")
117 ENDIF ()
118
119 SET(WebKit_THEME ${BUILD_DATA_DIR}/default.edj)
120 ADD_CUSTOM_COMMAND(
121   OUTPUT ${WebKit_THEME}
122   COMMAND ${EDJE_CC_EXECUTABLE} -v -id ${WEBKIT_DIR}/efl/DefaultTheme ${WebKit_THEME_DEFINITION} ${WEBKIT_DIR}/efl/DefaultTheme/default.edc ${WebKit_THEME}
123   DEPENDS
124     ${WEBKIT_DIR}/efl/DefaultTheme/default.edc
125     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_knob_v.png
126     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_knob_press_v.png
127     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_v.png
128     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider.edc
129     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_knob_press_h.png
130     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_knob_h.png
131     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_fill_v.png
132     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_fill_h.png
133     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_h.png
134     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/combo_focus_button.png
135     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/combo_press.png
136     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/icon.png
137     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/combo_normal.png
138     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/combo_hover.png
139     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/combo_normal_button.png
140     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/combo_focus.png
141     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/combo_hover_button.png
142     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/combo.edc
143     ${WEBKIT_DIR}/efl/DefaultTheme/widget/combo/combo_press_button.png
144     ${WEBKIT_DIR}/efl/DefaultTheme/widget/search/decoration/search_decoration.edc
145     ${WEBKIT_DIR}/efl/DefaultTheme/widget/search/decoration/decoration_normal_button.png
146     ${WEBKIT_DIR}/efl/DefaultTheme/widget/search/field/field_hovered.png
147     ${WEBKIT_DIR}/efl/DefaultTheme/widget/search/field/search_field.edc
148     ${WEBKIT_DIR}/efl/DefaultTheme/widget/search/field/field_normal.png
149     ${WEBKIT_DIR}/efl/DefaultTheme/widget/search/field/field_focused.png
150     ${WEBKIT_DIR}/efl/DefaultTheme/widget/search/cancel/cancel_normal_button.png
151     ${WEBKIT_DIR}/efl/DefaultTheme/widget/search/cancel/cancel_normal_button2.png
152     ${WEBKIT_DIR}/efl/DefaultTheme/widget/search/cancel/search_cancel.edc
153     ${WEBKIT_DIR}/efl/DefaultTheme/widget/check/img_check_off_focus.png
154     ${WEBKIT_DIR}/efl/DefaultTheme/widget/check/check.edc
155     ${WEBKIT_DIR}/efl/DefaultTheme/widget/check/img_check_on_focus.png
156     ${WEBKIT_DIR}/efl/DefaultTheme/widget/check/img_check_on_hover.png
157     ${WEBKIT_DIR}/efl/DefaultTheme/widget/check/img_check_off_hover.png
158     ${WEBKIT_DIR}/efl/DefaultTheme/widget/check/img_check_off.png
159     ${WEBKIT_DIR}/efl/DefaultTheme/widget/check/img_check_on.png
160     ${WEBKIT_DIR}/efl/DefaultTheme/widget/radio/img_radio_on.png
161     ${WEBKIT_DIR}/efl/DefaultTheme/widget/radio/img_radio_off_focus.png
162     ${WEBKIT_DIR}/efl/DefaultTheme/widget/radio/img_radio_off_hover.png
163     ${WEBKIT_DIR}/efl/DefaultTheme/widget/radio/img_radio_on_focus.png
164     ${WEBKIT_DIR}/efl/DefaultTheme/widget/radio/radio.edc
165     ${WEBKIT_DIR}/efl/DefaultTheme/widget/radio/img_radio_off.png
166     ${WEBKIT_DIR}/efl/DefaultTheme/widget/radio/img_radio_on_hover.png
167     ${WEBKIT_DIR}/efl/DefaultTheme/widget/button/img_button_normal.png
168     ${WEBKIT_DIR}/efl/DefaultTheme/widget/button/img_button_press.png
169     ${WEBKIT_DIR}/efl/DefaultTheme/widget/button/img_button_focus.png
170     ${WEBKIT_DIR}/efl/DefaultTheme/widget/button/img_button_hover.png
171     ${WEBKIT_DIR}/efl/DefaultTheme/widget/button/button.edc
172     ${WEBKIT_DIR}/efl/DefaultTheme/widget/entry/entry.edc
173     ${WEBKIT_DIR}/efl/DefaultTheme/widget/entry/img_normal.png
174     ${WEBKIT_DIR}/efl/DefaultTheme/widget/entry/img_focused.png
175     ${WEBKIT_DIR}/efl/DefaultTheme/widget/entry/img_hovered.png
176     ${WEBKIT_DIR}/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png
177     ${WEBKIT_DIR}/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png
178     ${WEBKIT_DIR}/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png
179     ${WEBKIT_DIR}/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png
180     ${WEBKIT_DIR}/efl/DefaultTheme/widget/scrollbar/scrollbar.edc
181     ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_normal.png
182     ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_press.png
183     ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_hover.png
184     ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_focus.png
185     ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file.edc
186     ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/progressbar.edc
187     ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/shelf_inset.png
188     ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/bt_base.png
189   VERBATIM
190 )
191
192 LIST(APPEND WebKit_SOURCES
193      ${WebKit_THEME}
194 )
195
196 IF (SHARED_CORE)
197     SET(LIBS_PRIVATE "-l${WTF_LIBRARY_NAME} -l${JavaScriptCore_LIBRARY_NAME} -l${WebCore_LIBRARY_NAME}")
198 ELSE ()
199     SET(LIBS_PRIVATE "")
200 ENDIF ()
201
202 CONFIGURE_FILE(
203     efl/ewebkit.pc.in
204     ${CMAKE_BINARY_DIR}/WebKit/efl/ewebkit.pc
205     @ONLY)
206 INSTALL(FILES ${CMAKE_BINARY_DIR}/WebKit/efl/ewebkit.pc
207     DESTINATION lib/pkgconfig)
208
209 UNSET(LIBS_PRIVATE)
210
211 FILE(GLOB EWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/*.h")
212 LIST(REMOVE_ITEM EWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_private.h")
213
214 INSTALL(FILES ${EWebKit_HEADERS}
215         DESTINATION include/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR})
216
217 INSTALL(FILES ${WebKit_THEME}
218         DESTINATION share/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR}/themes)