2009-12-23 16:52:33 +03:00
|
|
|
# the factory macros cause errors
|
|
|
|
kde4_no_enable_final(kwineffects)
|
|
|
|
|
2011-07-17 19:27:14 +04:00
|
|
|
macro( KWIN4_ADD_EFFECT_BACKEND name )
|
|
|
|
kde4_add_plugin( ${name} ${ARGN} )
|
2013-02-06 10:58:33 +04:00
|
|
|
target_link_libraries( ${name} kwineffects ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${X11_Xfixes_LIB} ${X11_Xcursor_LIB} ${X11_LIBRARIES} ${XCB_XCB_LIBRARIES} ${X11_XCB_LIBRARIES}
|
|
|
|
${XCB_XFIXES_LIBRARIES})
|
2011-07-17 19:27:14 +04:00
|
|
|
endmacro( KWIN4_ADD_EFFECT_BACKEND )
|
2007-11-02 20:28:21 +03:00
|
|
|
|
2007-04-29 21:35:43 +04:00
|
|
|
# Adds effect plugin with given name. Sources are given after the name
|
2009-02-05 18:35:38 +03:00
|
|
|
macro( KWIN4_ADD_EFFECT name )
|
2011-07-17 19:27:14 +04:00
|
|
|
if(OPENGL_FOUND OR NOT(OPENGL_FOUND AND OPENGLES_FOUND))
|
|
|
|
# OpenGL or neither OpenGL nor OpenGL ES - default set
|
|
|
|
KWIN4_ADD_EFFECT_BACKEND(kwin4_effect_${name} ${ARGN})
|
|
|
|
if(OPENGL_FOUND)
|
|
|
|
target_link_libraries(kwin4_effect_${name} kwinglutils)
|
2012-10-05 12:45:10 +04:00
|
|
|
if( KWIN_BUILD_OPENGL_1_COMPOSITING )
|
|
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGL_1)
|
|
|
|
endif( KWIN_BUILD_OPENGL_1_COMPOSITING )
|
2011-08-03 18:39:36 +04:00
|
|
|
elseif(OPENGLES_FOUND)
|
|
|
|
target_link_libraries(kwin4_effect_${name} kwinglesutils)
|
2012-10-05 11:58:15 +04:00
|
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES")
|
2011-07-17 19:27:14 +04:00
|
|
|
endif(OPENGL_FOUND)
|
2012-03-16 11:37:09 +04:00
|
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_${name})
|
2011-07-17 19:27:14 +04:00
|
|
|
install( TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} )
|
|
|
|
endif(OPENGL_FOUND OR NOT(OPENGL_FOUND AND OPENGLES_FOUND))
|
|
|
|
|
|
|
|
|
|
|
|
if(OPENGLES_FOUND)
|
|
|
|
KWIN4_ADD_EFFECT_BACKEND(kwin4_effect_gles_${name} ${ARGN})
|
|
|
|
# OpenGL ES gets into a different library
|
|
|
|
target_link_libraries(kwin4_effect_gles_${name} kwinglesutils)
|
2012-10-05 11:58:15 +04:00
|
|
|
set_target_properties(kwin4_effect_gles_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES")
|
2012-03-16 11:37:09 +04:00
|
|
|
set_target_properties(kwin4_effect_gles_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_gles_${name})
|
2011-07-17 19:27:14 +04:00
|
|
|
install( TARGETS kwin4_effect_gles_${name} DESTINATION ${PLUGIN_INSTALL_DIR} )
|
|
|
|
endif(OPENGLES_FOUND)
|
2009-02-05 18:35:38 +03:00
|
|
|
endmacro( KWIN4_ADD_EFFECT )
|
|
|
|
|
|
|
|
macro( KWIN4_ADD_EFFECT_CONFIG name )
|
|
|
|
set( kwin4_effect_ui ) # Initially empty
|
|
|
|
set( kwin4_effect_src ) # Initially 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 )
|
2007-04-29 21:35:43 +04:00
|
|
|
|
2009-02-05 18:35:38 +03:00
|
|
|
kde4_add_ui_files( kwin4_effect_src ${kwin4_effect_ui} )
|
|
|
|
kde4_add_plugin( kcm_kwin4_effect_${name} ${kwin4_effect_src} )
|
2011-09-04 20:28:31 +04:00
|
|
|
if(OPENGLES_FOUND)
|
2012-10-05 11:58:15 +04:00
|
|
|
set_target_properties(kcm_kwin4_effect_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES")
|
2011-09-04 20:28:31 +04:00
|
|
|
endif(OPENGLES_FOUND)
|
2011-07-26 10:05:09 +04:00
|
|
|
target_link_libraries( kcm_kwin4_effect_${name} kwineffects ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS} )
|
2009-02-05 18:35:38 +03:00
|
|
|
install( TARGETS kcm_kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} )
|
|
|
|
endmacro( KWIN4_ADD_EFFECT_CONFIG )
|
2007-05-28 15:34:12 +04:00
|
|
|
|
2009-02-05 18:35:38 +03:00
|
|
|
macro( KWIN4_EFFECT_LINK_XRENDER name )
|
|
|
|
if( KWIN_HAVE_XRENDER_COMPOSITING )
|
2013-01-28 22:54:27 +04:00
|
|
|
target_link_libraries( kwin4_effect_${name} ${X11_Xrender_LIB} ${XCB_RENDER_LIBRARIES})
|
2011-07-17 19:27:14 +04:00
|
|
|
|
|
|
|
# if building for OpenGL and OpenGL ES we have two targets
|
|
|
|
# TODO: if building for OpenGL ES we should not build XRender support
|
|
|
|
if(OPENGLES_FOUND)
|
2013-01-28 22:54:27 +04:00
|
|
|
target_link_libraries( kwin4_effect_gles_${name} ${X11_Xrender_LIB} ${XCB_RENDER_LIBRARIES})
|
2011-07-17 19:27:14 +04:00
|
|
|
endif(OPENGLES_FOUND)
|
2009-02-05 18:35:38 +03:00
|
|
|
endif( KWIN_HAVE_XRENDER_COMPOSITING )
|
|
|
|
endmacro( KWIN4_EFFECT_LINK_XRENDER )
|
|
|
|
|
|
|
|
# Install the KWin/Effect service type
|
|
|
|
install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
|
2007-05-22 20:58:10 +04:00
|
|
|
|
2009-02-05 18:35:38 +03:00
|
|
|
# Create initial variables
|
|
|
|
set( kwin4_effect_builtins_sources )
|
2011-05-10 20:25:21 +04:00
|
|
|
if( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
set( kwin4_effect_builtins_config_sources configs_builtins.cpp )
|
|
|
|
endif( NOT KWIN_MOBILE_EFFECTS )
|
2009-02-05 18:35:38 +03:00
|
|
|
set( kwin4_effect_include_directories )
|
2007-04-29 21:35:43 +04:00
|
|
|
|
2012-02-02 17:39:39 +04:00
|
|
|
# scripted effects
|
|
|
|
add_subdirectory( fade )
|
|
|
|
|
2012-02-02 20:58:31 +04:00
|
|
|
# scripted effects only relevant to desktop
|
|
|
|
if( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
add_subdirectory( fadedesktop )
|
2012-10-26 13:50:44 +04:00
|
|
|
add_subdirectory( maximize )
|
2012-02-02 20:58:31 +04:00
|
|
|
endif( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
|
2009-02-05 18:35:38 +03:00
|
|
|
###############################################################################
|
|
|
|
# Built-in effects go here
|
|
|
|
|
|
|
|
# Common effects
|
|
|
|
include( dialogparent/CMakeLists.txt )
|
|
|
|
include( login/CMakeLists.txt )
|
2011-04-28 15:47:53 +04:00
|
|
|
include( outline/CMakeLists.txt )
|
2009-02-05 18:35:38 +03:00
|
|
|
include( presentwindows/CMakeLists.txt )
|
2013-01-31 16:31:49 +04:00
|
|
|
include( screenedge/CMakeLists.txt )
|
2009-07-23 23:06:50 +04:00
|
|
|
include( slidingpopups/CMakeLists.txt )
|
2009-02-05 18:35:38 +03:00
|
|
|
include( taskbarthumbnail/CMakeLists.txt )
|
2010-12-04 14:32:50 +03:00
|
|
|
|
2011-05-10 20:25:21 +04:00
|
|
|
# Common effects only relevant to desktop
|
|
|
|
if( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
include( boxswitch/CMakeLists.txt )
|
|
|
|
include( dashboard/CMakeLists.txt )
|
|
|
|
include( desktopgrid/CMakeLists.txt )
|
|
|
|
include( diminactive/CMakeLists.txt )
|
|
|
|
include( dimscreen/CMakeLists.txt )
|
|
|
|
include( fallapart/CMakeLists.txt )
|
|
|
|
include( highlightwindow/CMakeLists.txt )
|
|
|
|
include( magiclamp/CMakeLists.txt )
|
|
|
|
include( translucency/CMakeLists.txt )
|
|
|
|
include( minimizeanimation/CMakeLists.txt )
|
|
|
|
include( resize/CMakeLists.txt )
|
|
|
|
include( scalein/CMakeLists.txt )
|
|
|
|
include( showfps/CMakeLists.txt )
|
|
|
|
include( showpaint/CMakeLists.txt )
|
|
|
|
include( slide/CMakeLists.txt )
|
|
|
|
include( slideback/CMakeLists.txt )
|
|
|
|
include( thumbnailaside/CMakeLists.txt )
|
|
|
|
include( windowgeometry/CMakeLists.txt )
|
|
|
|
include( zoom/CMakeLists.txt )
|
|
|
|
include( logout/CMakeLists.txt )
|
|
|
|
endif( NOT KWIN_MOBILE_EFFECTS )
|
2007-10-21 17:44:40 +04:00
|
|
|
|
2009-02-05 18:35:38 +03:00
|
|
|
# OpenGL-specific effects
|
2011-08-13 17:21:51 +04:00
|
|
|
include( blur/CMakeLists.txt )
|
|
|
|
include( screenshot/CMakeLists.txt )
|
|
|
|
# OpenGL-specific effects for desktop
|
|
|
|
if( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
include( coverswitch/CMakeLists.txt )
|
|
|
|
include( cube/CMakeLists.txt )
|
|
|
|
include( explosion/CMakeLists.txt )
|
|
|
|
include( flipswitch/CMakeLists.txt )
|
|
|
|
include( glide/CMakeLists.txt )
|
|
|
|
include( invert/CMakeLists.txt )
|
|
|
|
include( lookingglass/CMakeLists.txt )
|
2011-08-20 12:53:36 +04:00
|
|
|
include( magnifier/CMakeLists.txt )
|
2012-07-27 09:58:21 +04:00
|
|
|
include( mouseclick/CMakeLists.txt )
|
2011-08-13 17:21:51 +04:00
|
|
|
include( mousemark/CMakeLists.txt )
|
|
|
|
include( sheet/CMakeLists.txt )
|
|
|
|
include( snaphelper/CMakeLists.txt )
|
|
|
|
include( startupfeedback/CMakeLists.txt )
|
|
|
|
include( trackmouse/CMakeLists.txt )
|
|
|
|
include( wobblywindows/CMakeLists.txt )
|
|
|
|
endif( NOT KWIN_MOBILE_EFFECTS )
|
2007-04-29 21:35:43 +04:00
|
|
|
|
2009-02-05 18:35:38 +03:00
|
|
|
###############################################################################
|
2007-04-29 21:35:43 +04:00
|
|
|
|
2009-02-05 18:35:38 +03:00
|
|
|
# Add the builtins plugin
|
|
|
|
KWIN4_ADD_EFFECT( builtins ${kwin4_effect_builtins_sources} )
|
2011-05-10 20:25:21 +04:00
|
|
|
if( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
KWIN4_ADD_EFFECT_CONFIG( builtins ${kwin4_effect_builtins_config_sources} )
|
|
|
|
endif( NOT KWIN_MOBILE_EFFECTS )
|
2009-02-05 18:35:38 +03:00
|
|
|
KWIN4_EFFECT_LINK_XRENDER( builtins )
|