not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kwin / effects / CMakeLists.txt
blobc1417d262e33d2f48a589d3124de53b35d100813
1 # Uncomment to have the test effects built
2 #add_subdirectory( test )
5 # Adds effect plugin with given name. Sources are given after the name
6 macro(KWIN4_ADD_EFFECT name)
7     kde4_add_plugin(kwin4_effect_${name} ${ARGN})
8     target_link_libraries(kwin4_effect_${name} kwineffects ${KDE4_KDEUI_LIBS} kephal)
9     install(TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
10 endmacro(KWIN4_ADD_EFFECT)
12 macro(KWIN4_ADD_EFFECT_CONFIG name)
13     set(kwin4_effect_ui ) #empty
14     set(kwin4_effect_src ) #empty
15     foreach(file ${ARGN})
16         if(file MATCHES \\.ui)
17             set(kwin4_effect_ui ${kwin4_effect_ui} ${file})
18         else(file MATCHES \\.ui)
19             set(kwin4_effect_src ${kwin4_effect_src} ${file})
20         endif(file MATCHES \\.ui)
21     endforeach(file)
22     kde4_add_ui_files(kwin4_effect_src ${kwin4_effect_ui})
23     kde4_add_plugin(kcm_kwin4_effect_${name} ${kwin4_effect_src})
24     target_link_libraries(kcm_kwin4_effect_${name} kwineffects ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS} kephal)
25     install(TARGETS kcm_kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
26 endmacro(KWIN4_ADD_EFFECT_CONFIG)
28 include_directories(
29     ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/lib
30     )
32 install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
34 ### builtins - most important, ready-to-use effects
35 # sources
36 SET(kwin4_effect_builtins_sources
37     boxswitch.cpp
38     desktopgrid.cpp
39     dialogparent.cpp
40     diminactive.cpp
41     dimscreen.cpp
42     fade.cpp
43     fadedesktop.cpp
44     fallapart.cpp
45     login.cpp
46     logout.cpp
47     magiclamp.cpp
48     maketransparent.cpp
49     minimizeanimation.cpp
50     presentwindows.cpp
51     scalein.cpp
52     shadow.cpp
53     showfps.cpp
54     showpaint.cpp
55     slide.cpp
56     taskbarthumbnail.cpp
57     thumbnailaside.cpp
58     zoom.cpp
59     )
60 # their .desktop files
61 install( FILES
62     boxswitch.desktop
63     desktopgrid.desktop
64     dialogparent.desktop
65     diminactive.desktop
66     dimscreen.desktop
67     fade.desktop
68     fadedesktop.desktop
69     fallapart.desktop
70     login.desktop
71     logout.desktop
72     magiclamp.desktop
73     maketransparent.desktop
74     minimizeanimation.desktop
75     presentwindows.desktop
76     scalein.desktop
77     shadow.desktop
78     showfps.desktop
79     showpaint.desktop
80     slide.desktop
81     taskbarthumbnail.desktop
82     thumbnailaside.desktop
83     zoom.desktop
84     DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
86 # config modules
87 SET(kwin4_effect_builtins_config_sources
88     boxswitch_config.cpp
89     boxswitch_config.ui
90     desktopgrid_config.cpp
91     desktopgrid_config.ui
92     diminactive_config.cpp
93     diminactive_config.ui
94     magiclamp_config.cpp
95     magiclamp_config.ui
96     maketransparent_config.cpp
97     maketransparent_config.ui
98     presentwindows_config.cpp
99     presentwindows_config.ui
100     shadow_config.cpp
101     shadow_config.ui
102     showfps_config.cpp
103     showfps_config.ui
104     thumbnailaside_config.cpp
105     thumbnailaside_config.ui
106     zoom_config.cpp
107     configs_builtins.cpp)
108 install( FILES
109     boxswitch_config.desktop
110     desktopgrid_config.desktop
111     diminactive_config.desktop
112     magiclamp_config.desktop
113     maketransparent_config.desktop
114     presentwindows_config.desktop
115     shadow_config.desktop
116     showfps_config.desktop
117     thumbnailaside_config.desktop
118     zoom_config.desktop
119     DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
121 if(KWIN_HAVE_OPENGL_COMPOSITING)
122     # opengl-based effects
123     SET(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
124         blur.cpp
125         coverswitch.cpp
126         cube.cpp
127         cylinder.cpp
128         explosioneffect.cpp
129         flipswitch.cpp
130         invert.cpp
131         lookingglass.cpp
132         magnifier.cpp
133         mousemark.cpp
134         sharpen.cpp
135         sphere.cpp
136         snow.cpp
137         trackmouse.cpp
138         wobblywindows.cpp
139         )
140     install( FILES
141         blur.desktop
142         coverswitch.desktop
143         cube.desktop
144         cylinder.desktop
145         explosion.desktop
146         flipswitch.desktop
147         invert.desktop
148         lookingglass.desktop
149         magnifier.desktop
150         mousemark.desktop
151         sharpen.desktop
152         sphere.desktop
153         snow.desktop
154         trackmouse.desktop
155         wobblywindows.desktop
156         DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
157     install( FILES
158         data/trackmouse.png
159         data/explosion.frag
160         data/explosion.vert
161         data/explosion-start.png
162         data/explosion-end.png
163         data/blur.frag
164         data/blur.vert
165         data/blur-render.frag
166         data/blur-render.vert
167         data/invert.frag
168         data/invert.vert
169         data/sharpen.frag
170         data/sharpen.vert
171         data/lookingglass.frag
172         data/lookingglass.vert
173         data/shadow-texture.png
174         data/snow.frag
175         data/snow.vert
176         data/snowflake.png
177         data/circle.png
178         data/circle-edgy.png
179         data/cubecap.png
180         data/cylinder.frag
181         data/cylinder.vert
182         data/sphere.vert
183         DESTINATION  ${DATA_INSTALL_DIR}/kwin )
184     SET(kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
185         coverswitch_config.cpp
186         coverswitch_config.ui
187         cube_config.cpp
188         cube_config.ui
189         cylinder_config.cpp
190         cylinder_config.ui
191         flipswitch_config.cpp
192         flipswitch_config.ui
193         invert_config.cpp
194         lookingglass_config.cpp
195         lookingglass_config.ui
196         magnifier_config.cpp
197         magnifier_config.ui
198         mousemark_config.cpp
199         mousemark_config.ui
200         sharpen_config.cpp
201         snow_config.cpp
202         snow_config.ui
203         sphere_config.cpp
204         sphere_config.ui
205         trackmouse_config.cpp
206         wobblywindows_config.cpp
207         wobblywindows_config.ui
208         )
209     install( FILES
210         coverswitch_config.desktop
211         cube_config.desktop
212         cylinder_config.desktop
213         flipswitch_config.desktop
214         invert_config.desktop
215         lookingglass_config.desktop
216         magnifier_config.desktop
217         mousemark_config.desktop
218         sharpen_config.desktop
219         snow_config.desktop
220         sphere_config.desktop
221         trackmouse_config.desktop
222         wobblywindows_config.desktop
223         DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
224 endif(KWIN_HAVE_OPENGL_COMPOSITING)
226 # add the plugin
227 KWIN4_ADD_EFFECT(builtins ${kwin4_effect_builtins_sources})
228 KWIN4_ADD_EFFECT_CONFIG(builtins ${kwin4_effect_builtins_config_sources})
229 # link to xrender if necessary
230 if (KWIN_HAVE_XRENDER_COMPOSITING)
231   target_link_libraries(kwin4_effect_builtins ${X11_Xrender_LIB} ${X11_LIBRARIES} kephal)
232 endif (KWIN_HAVE_XRENDER_COMPOSITING)
237 ### videocapture plugin
238 include(UsePkgConfig)
239 PKGCONFIG(libcaptury CAPTURY_INCLUDES CAPTURY_LINK_DIR CAPTURY_LDFLAGS CAPTURY_CFLAGS)
240 if( CAPTURY_LDFLAGS )
241     SET( CAPTURY_FOUND TRUE )
242 endif( CAPTURY_LDFLAGS )
244 macro_log_feature(CAPTURY_FOUND "Captury framework library" "Realtime video capturing framework e.g. screen casts" "http://gitorious.org/projects/libcaptury" FALSE "0.3.0" "Provides for video recording desktop effects.")
246 macro_bool_to_01( CAPTURY_FOUND HAVE_CAPTURY )
247 if( CAPTURY_FOUND )
248     KWIN4_ADD_EFFECT(videorecord videorecord.cpp)
249     KWIN4_ADD_EFFECT_CONFIG(videorecord videorecord_config.cpp)
250     target_link_libraries(kwin4_effect_videorecord ${KDE4_KIO_LIBS} ${CAPTURY_LDFLAGS})
251     install( FILES videorecord.desktop videorecord_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
252 endif( CAPTURY_FOUND )