1set(Resources_DIR "${WEBCORE_DIR}/Resources")
2macro(GENERATE_THEME _target_name _name _option)
3    set(DefaultTheme_DIR "${WEBCORE_DIR}/platform/efl/DefaultTheme")
4
5    add_custom_command(
6        OUTPUT ${THEME_BINARY_DIR}/${_name}
7        COMMAND ${EDJE_CC_EXECUTABLE} -v ${_option} default.edc ${THEME_BINARY_DIR}/${_name}
8        DEPENDS
9            default.edc
10            widget/button/button.edc
11            widget/button/img_button_focus.png
12            widget/button/img_button_hover.png
13            widget/button/img_button_normal.png
14            widget/button/img_button_press.png
15            widget/check/check.edc
16            widget/check/img_check_off_focus.png
17            widget/check/img_check_off_hover.png
18            widget/check/img_check_off.png
19            widget/check/img_check_on_focus.png
20            widget/check/img_check_on_hover.png
21            widget/check/img_check_on.png
22            widget/combo/combo.edc
23            widget/combo/combo_focus_button.png
24            widget/combo/combo_focus_button_transparent.png
25            widget/combo/combo_focus.png
26            widget/combo/combo_focus_transparent.png
27            widget/combo/combo_hover_button.png
28            widget/combo/combo_hover_button_transparent.png
29            widget/combo/combo_hover.png
30            widget/combo/combo_hover_transparent.png
31            widget/combo/combo_normal_button.png
32            widget/combo/combo_normal_button_transparent.png
33            widget/combo/combo_normal.png
34            widget/combo/combo_normal_transparent.png
35            widget/combo/combo_press_button.png
36            widget/combo/combo_press_button_transparent.png
37            widget/combo/combo_press.png
38            widget/combo/combo_press_transparent.png
39            widget/combo/icon.png
40            widget/cursor/cursor.edc
41            widget/entry/entry.edc
42            widget/entry/img_focused.png
43            widget/entry/img_hovered.png
44            widget/entry/img_normal.png
45            widget/progressbar/bt_base.png
46            widget/progressbar/progressbar.edc
47            widget/progressbar/shelf_inset.png
48            widget/radio/img_radio_off_focus.png
49            widget/radio/img_radio_off_hover.png
50            widget/radio/img_radio_off.png
51            widget/radio/img_radio_on_focus.png
52            widget/radio/img_radio_on_hover.png
53            widget/radio/img_radio_on.png
54            widget/radio/radio.edc
55            widget/scrollbar/scrollbar.edc
56            widget/scrollbar/scrollbar_h.png
57            widget/scrollbar/scrollbar_knob_h.png
58            widget/scrollbar/scrollbar_knob_v.png
59            widget/scrollbar/scrollbar_v.png
60            widget/search/cancel/cancel_normal_button2.png
61            widget/search/cancel/cancel_normal_button.png
62            widget/search/cancel/search_cancel.edc
63            widget/search/decoration/decoration_normal_button.png
64            widget/search/decoration/search_decoration.edc
65            widget/search/field/field_focused.png
66            widget/search/field/field_hovered.png
67            widget/search/field/field_normal.png
68            widget/search/field/search_field.edc
69            widget/slider/slider.edc
70            widget/slider/slider_fill_h.png
71            widget/slider/slider_fill_v.png
72            widget/slider/slider_h.png
73            widget/slider/slider_thumb_h.png
74            widget/slider/slider_thumb_press_h.png
75            widget/slider/slider_thumb_press_v.png
76            widget/slider/slider_thumb_v.png
77            widget/slider/slider_v.png
78            widget/spinner/sp_bg.png
79            widget/spinner/sp_down_default.png
80            widget/spinner/sp_down_hover.png
81            widget/spinner/sp_down_pressed.png
82            widget/spinner/spinner.edc
83            widget/spinner/sp_up_default.png
84            widget/spinner/sp_up_hover.png
85            widget/spinner/sp_up_pressed.png
86            ${Resources_DIR}/aliasCursor.png
87            ${Resources_DIR}/cellCursor.png
88            ${Resources_DIR}/contextMenuCursor.png
89            ${Resources_DIR}/copyCursor.png
90            ${Resources_DIR}/eastResizeCursor.png
91            ${Resources_DIR}/eastWestResizeCursor.png
92            ${Resources_DIR}/helpCursor.png
93            ${Resources_DIR}/linkCursor.png
94            ${Resources_DIR}/moveCursor.png
95            ${Resources_DIR}/noDropCursor.png
96            ${Resources_DIR}/noneCursor.png
97            ${Resources_DIR}/northEastResizeCursor.png
98            ${Resources_DIR}/northEastSouthWestResizeCursor.png
99            ${Resources_DIR}/northResizeCursor.png
100            ${Resources_DIR}/northSouthResizeCursor.png
101            ${Resources_DIR}/northWestResizeCursor.png
102            ${Resources_DIR}/northWestSouthEastResizeCursor.png
103            ${Resources_DIR}/panIcon.png
104            ${Resources_DIR}/progressCursor.png
105            ${Resources_DIR}/southEastResizeCursor.png
106            ${Resources_DIR}/southResizeCursor.png
107            ${Resources_DIR}/southWestResizeCursor.png
108            ${Resources_DIR}/verticalTextCursor.png
109            ${Resources_DIR}/waitCursor.png
110            ${Resources_DIR}/westResizeCursor.png
111        WORKING_DIRECTORY ${DefaultTheme_DIR}
112        VERBATIM
113    )
114
115    add_custom_target(${_target_name} ALL
116        DEPENDS ${THEME_BINARY_DIR}/${_name}
117    )
118endmacro()
119
120set(DefaultTheme_DEFINITION "")
121
122GENERATE_THEME(DefaultTheme "default.edj" "-DCURSOR_IMAGE_DIR=${Resources_DIR} ${DefaultTheme_DEFINITION}")
123install(FILES "${THEME_BINARY_DIR}/default.edj" DESTINATION ${DATA_INSTALL_DIR}/themes)
124
125if (ENABLE_API_TESTS)
126    GENERATE_THEME(BigButtonTheme "big_button_theme.edj" "-DBIG_BUTTON_THEME_FOR_TESTING -DCURSOR_IMAGE_DIR=${Resources_DIR}")
127endif ()
128