CMakeLists.txt 6.48 KB
Newer Older
1 2 3 4
# Uncomment to have the test effects built
#add_subdirectory( test )


5 6 7
# Adds effect plugin with given name. Sources are given after the name
macro(KWIN4_ADD_EFFECT name)
    kde4_add_plugin(kwin4_effect_${name} ${ARGN})
8
    target_link_libraries(kwin4_effect_${name} kwineffects ${KDE4_KDEUI_LIBS} kephal)
9 10 11
    install(TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
endmacro(KWIN4_ADD_EFFECT)

12
macro(KWIN4_ADD_EFFECT_CONFIG name)
13 14 15 16 17 18 19 20 21 22 23
    set(kwin4_effect_ui ) #empty
    set(kwin4_effect_src ) #empty
    foreach(file ${ARGN})
        if(file MATCHES \\.ui)
            set(kwin4_effect_ui ${kwin4_effect_ui} ${file})
        else(file MATCHES \\.ui)
            set(kwin4_effect_src ${kwin4_effect_src} ${file})
        endif(file MATCHES \\.ui)
    endforeach(file)
    kde4_add_ui_files(kwin4_effect_src ${kwin4_effect_ui})
    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 26 27
    install(TARGETS kcm_kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
endmacro(KWIN4_ADD_EFFECT_CONFIG)

28
include_directories(
Dirk Mueller's avatar
Dirk Mueller committed
29
    ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/lib
30 31
    )

32
install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
33 34 35

### builtins - most important, ready-to-use effects
# sources
36 37 38 39 40
SET(kwin4_effect_builtins_sources
    boxswitch.cpp
    desktopgrid.cpp
    dialogparent.cpp
    diminactive.cpp
41
    dimscreen.cpp
42
    fade.cpp
Lucas Murray's avatar
Lucas Murray committed
43
    fadedesktop.cpp
44
    fallapart.cpp
45
    highlightwindow.cpp
Luboš Luňák's avatar
Luboš Luňák committed
46
    login.cpp
47
    logout.cpp
48
    magiclamp.cpp
49 50 51 52
    maketransparent.cpp
    minimizeanimation.cpp
    presentwindows.cpp
    scalein.cpp
53 54 55
    shadow.cpp
    showfps.cpp
    showpaint.cpp
56
    slide.cpp
57
    taskbarthumbnail.cpp
58 59 60
    thumbnailaside.cpp
    zoom.cpp
    )
61 62 63 64 65 66
# their .desktop files
install( FILES
    boxswitch.desktop
    desktopgrid.desktop
    dialogparent.desktop
    diminactive.desktop
67
    dimscreen.desktop
68
    fade.desktop
Lucas Murray's avatar
Lucas Murray committed
69
    fadedesktop.desktop
70
    fallapart.desktop
71
    highlightwindow.desktop
Luboš Luňák's avatar
Luboš Luňák committed
72
    login.desktop
73
    logout.desktop
74
    magiclamp.desktop
75 76 77 78
    maketransparent.desktop
    minimizeanimation.desktop
    presentwindows.desktop
    scalein.desktop
79 80 81
    shadow.desktop
    showfps.desktop
    showpaint.desktop
82
    slide.desktop
83
    taskbarthumbnail.desktop
84 85
    thumbnailaside.desktop
    zoom.desktop
86
    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
87

88
# config modules
89
SET(kwin4_effect_builtins_config_sources
90 91
    boxswitch_config.cpp
    boxswitch_config.ui
92
    desktopgrid_config.cpp
93
    desktopgrid_config.ui
94 95
    diminactive_config.cpp
    diminactive_config.ui
96 97
    magiclamp_config.cpp
    magiclamp_config.ui
98
    maketransparent_config.cpp
99
    maketransparent_config.ui
100
    presentwindows_config.cpp
101
    presentwindows_config.ui
102
    shadow_config.cpp
103
    shadow_config.ui
104 105
    showfps_config.cpp
    showfps_config.ui
106 107
    thumbnailaside_config.cpp
    thumbnailaside_config.ui
108
    zoom_config.cpp
109 110
    configs_builtins.cpp)
install( FILES
111
    boxswitch_config.desktop
112
    desktopgrid_config.desktop
113
    diminactive_config.desktop
114
    magiclamp_config.desktop
115
    maketransparent_config.desktop
116 117
    presentwindows_config.desktop
    shadow_config.desktop
118
    showfps_config.desktop
119
    thumbnailaside_config.desktop
120
    zoom_config.desktop
121 122
    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )

123
if(KWIN_HAVE_OPENGL_COMPOSITING)
124
    # opengl-based effects
125 126
    SET(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
        blur.cpp
127
        coverswitch.cpp
128 129
        cube.cpp
        cylinder.cpp
130
        explosioneffect.cpp
131
        flipswitch.cpp
132
        invert.cpp
133
        lookingglass.cpp
134 135
        magnifier.cpp
        mousemark.cpp
136
        sharpen.cpp
137
        sphere.cpp
138
        snow.cpp
139
        trackmouse.cpp
140
        wobblywindows.cpp
141 142 143
        )
    install( FILES
        blur.desktop
144
        coverswitch.desktop
145 146
        cube.desktop
        cylinder.desktop
147
        explosion.desktop
148
        flipswitch.desktop
149
        invert.desktop
150
        lookingglass.desktop
151 152
        magnifier.desktop
        mousemark.desktop
153
        sharpen.desktop
154
        sphere.desktop
155
        snow.desktop
156
        trackmouse.desktop
157
        wobblywindows.desktop
158
        DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
159 160 161 162 163 164 165 166 167 168
    install( FILES
        data/trackmouse.png
        data/explosion.frag
        data/explosion.vert
        data/explosion-start.png
        data/explosion-end.png
        data/blur.frag
        data/blur.vert
        data/blur-render.frag
        data/blur-render.vert
169 170
        data/invert.frag
        data/invert.vert
171 172
        data/sharpen.frag
        data/sharpen.vert
173 174
        data/lookingglass.frag
        data/lookingglass.vert
Rivo Laks's avatar
Rivo Laks committed
175
        data/shadow-texture.png
176 177
        data/snow.frag
        data/snow.vert
178
        data/snowflake.png
179
        data/circle.png
180
        data/circle-edgy.png
181
        data/cubecap.png
182 183
        data/cylinder.frag
        data/cylinder.vert
184
        data/sphere.vert
185
        DESTINATION  ${DATA_INSTALL_DIR}/kwin )
186
    SET(kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
187 188
        coverswitch_config.cpp
        coverswitch_config.ui
189 190
        cube_config.cpp
        cube_config.ui
191 192
        cylinder_config.cpp
        cylinder_config.ui
193 194
        flipswitch_config.cpp
        flipswitch_config.ui
Rivo Laks's avatar
Rivo Laks committed
195
        invert_config.cpp
196 197 198 199 200 201
        lookingglass_config.cpp
        lookingglass_config.ui
        magnifier_config.cpp
        magnifier_config.ui
        mousemark_config.cpp
        mousemark_config.ui
Rivo Laks's avatar
Rivo Laks committed
202
        sharpen_config.cpp
203 204
        snow_config.cpp
        snow_config.ui
205 206
        sphere_config.cpp
        sphere_config.ui
Rivo Laks's avatar
Rivo Laks committed
207
        trackmouse_config.cpp
208 209
        wobblywindows_config.cpp
        wobblywindows_config.ui
210 211
        )
    install( FILES
212
        coverswitch_config.desktop
213
        cube_config.desktop
214
        cylinder_config.desktop
215
        flipswitch_config.desktop
Rivo Laks's avatar
Rivo Laks committed
216
        invert_config.desktop
217 218 219
        lookingglass_config.desktop
        magnifier_config.desktop
        mousemark_config.desktop
Rivo Laks's avatar
Rivo Laks committed
220
        sharpen_config.desktop
221
        snow_config.desktop
222
        sphere_config.desktop
Rivo Laks's avatar
Rivo Laks committed
223
        trackmouse_config.desktop
224
        wobblywindows_config.desktop
225
        DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
226
endif(KWIN_HAVE_OPENGL_COMPOSITING)
227

228
# add the plugin
229
KWIN4_ADD_EFFECT(builtins ${kwin4_effect_builtins_sources})
230
KWIN4_ADD_EFFECT_CONFIG(builtins ${kwin4_effect_builtins_config_sources})
231
# link to xrender if necessary
232
if (KWIN_HAVE_XRENDER_COMPOSITING)
233
  target_link_libraries(kwin4_effect_builtins ${X11_Xrender_LIB} ${X11_LIBRARIES} kephal)
234
endif (KWIN_HAVE_XRENDER_COMPOSITING)
235