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