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