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})
2007-05-29 11:48:10 +00:00
target_link_libraries(kcm_kwin4_effect_${name} kwineffects ${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
2007-11-02 17:28:21 +00:00
demo_taskbarthumbnail.cpp
2007-04-29 17:35:43 +00:00
desktopgrid.cpp
dialogparent.cpp
diminactive.cpp
fade.cpp
fallapart.cpp
maketransparent.cpp
minimizeanimation.cpp
presentwindows.cpp
scalein.cpp
thumbnailaside.cpp
zoom.cpp
)
2007-05-22 16:58:10 +00:00
# their .desktop files
install( FILES
boxswitch.desktop
2007-11-02 17:28:21 +00:00
demo_taskbarthumbnail.desktop
2007-05-22 16:58:10 +00:00
desktopgrid.desktop
dialogparent.desktop
diminactive.desktop
fade.desktop
fallapart.desktop
maketransparent.desktop
minimizeanimation.desktop
presentwindows.desktop
scalein.desktop
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
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 )
2007-04-29 17:35:43 +00:00
if(OPENGL_FOUND)
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
explosioneffect.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
2007-04-29 17:35:43 +00:00
trackmouse.cpp
)
install( FILES
blur.desktop
explosion.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
2007-04-29 17:35:43 +00:00
trackmouse.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
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}
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
)
install( FILES
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
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
2007-04-29 17:35:43 +00:00
endif(OPENGL_FOUND)
2007-10-23 13:41:59 +00:00
# showfps, showpaint - need both xrender and opengl
2007-04-29 17:35:43 +00:00
if( OPENGL_FOUND AND X11_Xrender_FOUND )
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 )
2007-04-29 17:35:43 +00:00
endif( OPENGL_FOUND AND X11_Xrender_FOUND )
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
2007-04-29 17:35:43 +00:00
if (X11_Xrender_FOUND)
target_link_libraries(kwin4_effect_builtins ${X11_Xrender_LIB})
endif (X11_Xrender_FOUND)
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
macro_log_feature(CAPTURY_FOUND "Capseo framework" "libcaptury is a framework realtime video capturing for e.g. screen casts" "http://rm-rf.in/captury")
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)
target_link_libraries(kwin4_effect_videorecord ${CAPTURY_LDFLAGS})
2007-05-28 11:12:20 +00:00
install( FILES videorecord.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
2007-04-29 17:35:43 +00:00
endif( HAVE_CAPTURY )