2007-11-02 17:28:21 +00:00
# Uncomment to have the test effects built
#add_subdirectory( test )
2007-04-29 17:35:43 +00:00
# Adds effect plugin with given name. Sources are given after the name
macro(KWIN4_ADD_EFFECT name)
kde4_add_plugin(kwin4_effect_${name} ${ARGN})
target_link_libraries(kwin4_effect_${name} kwineffects ${KDE4_KDEUI_LIBS})
install(TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
endmacro(KWIN4_ADD_EFFECT)
2007-05-28 11:34:12 +00:00
macro(KWIN4_ADD_EFFECT_CONFIG name)
2007-11-13 16:20:52 +00:00
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})
2008-02-04 12:06:13 +00:00
target_link_libraries(kcm_kwin4_effect_${name} kwineffects ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS})
2007-05-28 11:34:12 +00:00
install(TARGETS kcm_kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
endmacro(KWIN4_ADD_EFFECT_CONFIG)
2007-04-29 17:35:43 +00:00
include_directories(
2007-06-25 11:03:18 +00:00
${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/lib
2007-04-29 17:35:43 +00:00
)
2007-11-13 16:20:52 +00:00
install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
2007-05-22 16:58:10 +00:00
### builtins - most important, ready-to-use effects
# sources
2007-04-29 17:35:43 +00:00
SET(kwin4_effect_builtins_sources
boxswitch.cpp
desktopgrid.cpp
dialogparent.cpp
diminactive.cpp
2008-03-04 14:48:13 +00:00
dimscreen.cpp
2007-04-29 17:35:43 +00:00
fade.cpp
fallapart.cpp
2007-11-14 01:01:02 +00:00
login.cpp
2007-11-14 00:09:14 +00:00
logout.cpp
2007-04-29 17:35:43 +00:00
maketransparent.cpp
minimizeanimation.cpp
presentwindows.cpp
scalein.cpp
2008-01-03 14:00:13 +00:00
taskbarthumbnail.cpp
2007-04-29 17:35:43 +00:00
thumbnailaside.cpp
zoom.cpp
)
2007-05-22 16:58:10 +00:00
# their .desktop files
install( FILES
boxswitch.desktop
desktopgrid.desktop
dialogparent.desktop
diminactive.desktop
2008-03-04 14:48:13 +00:00
dimscreen.desktop
2007-05-22 16:58:10 +00:00
fade.desktop
fallapart.desktop
2007-11-14 01:01:02 +00:00
login.desktop
2007-11-14 00:09:14 +00:00
logout.desktop
2007-05-22 16:58:10 +00:00
maketransparent.desktop
minimizeanimation.desktop
presentwindows.desktop
scalein.desktop
2008-01-03 14:00:13 +00:00
taskbarthumbnail.desktop
2007-05-22 16:58:10 +00:00
thumbnailaside.desktop
zoom.desktop
2007-05-28 11:12:20 +00:00
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
2007-04-29 17:35:43 +00:00
2007-10-21 13:44:40 +00:00
# config modules
2007-11-13 16:20:52 +00:00
SET(kwin4_effect_builtins_config_sources
2007-10-21 13:44:40 +00:00
desktopgrid_config.cpp
2007-11-13 16:20:52 +00:00
diminactive_config.cpp
diminactive_config.ui
2007-10-22 13:34:26 +00:00
maketransparent_config.cpp
2008-04-06 10:19:26 +00:00
maketransparent_config.ui
2007-11-13 16:20:52 +00:00
presentwindows_config.cpp
shadow_config.cpp
thumbnailaside_config.cpp
thumbnailaside_config.ui
2007-11-12 15:11:00 +00:00
zoom_config.cpp
2007-10-21 13:44:40 +00:00
configs_builtins.cpp)
install( FILES
desktopgrid_config.desktop
2007-11-13 16:20:52 +00:00
diminactive_config.desktop
2007-10-22 13:34:26 +00:00
maketransparent_config.desktop
2007-11-13 16:20:52 +00:00
presentwindows_config.desktop
shadow_config.desktop
thumbnailaside_config.desktop
2007-11-12 15:11:00 +00:00
zoom_config.desktop
2007-10-21 13:44:40 +00:00
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
2008-01-03 15:22:19 +00:00
if(KWIN_HAVE_OPENGL_COMPOSITING)
2007-05-22 16:58:10 +00:00
# opengl-based effects
2007-04-29 17:35:43 +00:00
SET(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
blur.cpp
2008-02-21 13:20:22 +00:00
coverswitch.cpp
2007-04-29 17:35:43 +00:00
explosioneffect.cpp
2008-01-24 10:36:32 +00:00
flipswitch.cpp
2007-07-04 09:59:07 +00:00
invert.cpp
2007-07-13 13:22:09 +00:00
lookingglass.cpp
2007-04-29 17:35:43 +00:00
magnifier.cpp
mousemark.cpp
shadow.cpp
2007-07-04 10:01:04 +00:00
sharpen.cpp
2008-01-08 15:47:31 +00:00
snow.cpp
2007-04-29 17:35:43 +00:00
trackmouse.cpp
2008-04-18 12:01:47 +00:00
wobblywindows.cpp
2007-04-29 17:35:43 +00:00
)
install( FILES
blur.desktop
2008-02-21 13:20:22 +00:00
coverswitch.desktop
2007-04-29 17:35:43 +00:00
explosion.desktop
2008-01-24 10:36:32 +00:00
flipswitch.desktop
2007-07-04 09:59:07 +00:00
invert.desktop
2007-07-13 13:22:09 +00:00
lookingglass.desktop
2007-04-29 17:35:43 +00:00
magnifier.desktop
mousemark.desktop
shadow.desktop
2007-07-04 10:01:04 +00:00
sharpen.desktop
2008-01-08 15:47:31 +00:00
snow.desktop
2007-04-29 17:35:43 +00:00
trackmouse.desktop
2008-04-18 12:01:47 +00:00
wobblywindows.desktop
2007-05-28 11:12:20 +00:00
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
2007-04-29 17:35:43 +00:00
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
2007-07-04 09:59:07 +00:00
data/invert.frag
data/invert.vert
2007-07-04 10:01:04 +00:00
data/sharpen.frag
data/sharpen.vert
2007-07-13 13:22:09 +00:00
data/lookingglass.frag
data/lookingglass.vert
2007-07-04 11:46:50 +00:00
data/shadow-texture.png
2008-01-08 15:47:31 +00:00
data/snowflake.png
2007-07-04 20:33:35 +00:00
data/circle.png
2007-08-24 15:44:52 +00:00
data/circle-edgy.png
2007-04-29 17:35:43 +00:00
DESTINATION ${DATA_INSTALL_DIR}/kwin )
2007-11-13 16:20:52 +00:00
SET(kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
2008-02-21 13:20:22 +00:00
coverswitch_config.cpp
coverswitch_config.ui
2008-01-24 10:36:32 +00:00
flipswitch_config.cpp
flipswitch_config.ui
2007-11-13 18:14:56 +00:00
invert_config.cpp
2007-11-13 16:20:52 +00:00
lookingglass_config.cpp
lookingglass_config.ui
magnifier_config.cpp
magnifier_config.ui
mousemark_config.cpp
mousemark_config.ui
2007-11-13 18:21:49 +00:00
sharpen_config.cpp
2008-01-08 15:47:31 +00:00
snow_config.cpp
snow_config.ui
2007-11-13 21:50:00 +00:00
trackmouse_config.cpp
2008-04-18 12:01:47 +00:00
wobblywindows_config.cpp
wobblywindows_config.ui
2007-11-13 16:20:52 +00:00
)
install( FILES
2008-02-21 13:20:22 +00:00
coverswitch_config.desktop
2008-01-24 10:36:32 +00:00
flipswitch_config.desktop
2007-11-13 18:14:56 +00:00
invert_config.desktop
2007-11-13 16:20:52 +00:00
lookingglass_config.desktop
magnifier_config.desktop
mousemark_config.desktop
2007-11-13 18:21:49 +00:00
sharpen_config.desktop
2008-02-05 17:20:08 +00:00
showfps_config.desktop
2008-01-08 15:47:31 +00:00
snow_config.desktop
2007-11-13 21:50:00 +00:00
trackmouse_config.desktop
2008-04-18 12:01:47 +00:00
wobblywindows_config.desktop
2007-11-13 16:20:52 +00:00
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
2008-01-03 15:22:19 +00:00
endif(KWIN_HAVE_OPENGL_COMPOSITING)
2007-04-29 17:35:43 +00:00
2007-10-23 13:41:59 +00:00
# showfps, showpaint - need both xrender and opengl
2008-01-03 15:22:19 +00:00
if(KWIN_HAVE_OPENGL_COMPOSITING AND KWIN_HAVE_XRENDER_COMPOSITING)
2007-04-29 17:35:43 +00:00
SET(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
showfps.cpp
2007-10-23 13:41:59 +00:00
showpaint.cpp
2007-04-29 17:35:43 +00:00
)
install( FILES
showfps.desktop
2007-10-23 13:41:59 +00:00
showpaint.desktop
2007-05-28 11:12:20 +00:00
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
2008-02-05 17:20:08 +00:00
SET(kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
showfps_config.cpp
showfps_config.ui
)
install( FILES
showfps_config.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
2008-01-03 15:22:19 +00:00
endif(KWIN_HAVE_OPENGL_COMPOSITING AND KWIN_HAVE_XRENDER_COMPOSITING)
2007-04-29 17:35:43 +00:00
2007-05-22 16:58:10 +00:00
# add the plugin
2007-04-29 17:35:43 +00:00
KWIN4_ADD_EFFECT(builtins ${kwin4_effect_builtins_sources})
2007-11-13 16:20:52 +00:00
KWIN4_ADD_EFFECT_CONFIG(builtins ${kwin4_effect_builtins_config_sources})
2007-05-22 16:58:10 +00:00
# link to xrender if necessary
# note that libkwineffects already links to opengl, so no need to add this here
2008-01-03 15:22:19 +00:00
if (KWIN_HAVE_XRENDER_COMPOSITING)
2007-04-29 17:35:43 +00:00
target_link_libraries(kwin4_effect_builtins ${X11_Xrender_LIB})
2008-01-03 15:22:19 +00:00
endif (KWIN_HAVE_XRENDER_COMPOSITING)
2007-04-29 17:35:43 +00:00
2007-05-22 16:58:10 +00:00
### videocapture plugin
2007-04-29 17:35:43 +00:00
include(UsePkgConfig)
PKGCONFIG(libcaptury CAPTURY_INCLUDES CAPTURY_LINK_DIR CAPTURY_LDFLAGS CAPTURY_CFLAGS)
if( CAPTURY_LDFLAGS )
SET( CAPTURY_FOUND TRUE )
endif( CAPTURY_LDFLAGS )
2007-08-31 13:10:27 +00:00
2008-01-03 16:13:39 +00:00
macro_log_feature(CAPTURY_FOUND "Captury framework" "libcaptury is a framework realtime video capturing for e.g. screen casts" "http://rm-rf.in/captury")
2007-08-31 13:10:27 +00:00
2008-01-03 16:13:39 +00:00
# HAVE_CAPTURY doesn't work for some reason, but it's not used now anyway
2007-04-29 17:35:43 +00:00
macro_bool_to_01( CAPTURY_FOUND HAVE_CAPTURY )
if( HAVE_CAPTURY )
KWIN4_ADD_EFFECT(videorecord videorecord.cpp)
2007-11-13 19:43:13 +00:00
KWIN4_ADD_EFFECT_CONFIG(videorecord videorecord_config.cpp)
2008-02-04 12:06:13 +00:00
target_link_libraries(kwin4_effect_videorecord ${KDE4_KIO_LIBS} ${CAPTURY_LDFLAGS})
2007-11-13 19:43:13 +00:00
install( FILES videorecord.desktop videorecord_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
2007-04-29 17:35:43 +00:00
endif( HAVE_CAPTURY )