2013-02-25 11:05:36 +00:00
|
|
|
set(kwin_effect_OWN_LIBS
|
|
|
|
kwineffects
|
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_effect_KDE_LIBS
|
|
|
|
${KDE4_KDEUI_LIBS}
|
|
|
|
${KDE4_PLASMA_LIBS}
|
2013-03-11 08:33:38 +00:00
|
|
|
${KDECLARATIVE_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_effect_QT_LIBS
|
|
|
|
${QT_QTDECLARATIVE_LIBRARY}
|
2013-02-25 11:05:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_effect_XLIB_LIBS
|
2013-03-04 07:50:23 +00:00
|
|
|
${X11_X11_LIB}
|
2013-02-25 11:05:36 +00:00
|
|
|
${X11_Xcursor_LIB}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_effect_XCB_LIBS
|
|
|
|
${XCB_XCB_LIBRARIES}
|
|
|
|
${X11_XCB_LIBRARIES}
|
|
|
|
${XCB_IMAGE_LIBRARIES}
|
|
|
|
${XCB_XFIXES_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
if( KWIN_HAVE_XRENDER_COMPOSITING )
|
|
|
|
set(kwin_effect_XCB_LIBS ${kwin_effect_XCB_LIBS} ${XCB_RENDER_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(OPENGL_FOUND)
|
|
|
|
set(kwin_effect_OWN_LIBS ${kwin_effect_OWN_LIBS} kwinglutils)
|
|
|
|
elseif(OPENGLES_FOUND)
|
|
|
|
set(kwin_effect_OWN_LIBS ${kwin_effect_OWN_LIBS} kwinglesutils)
|
|
|
|
endif()
|
|
|
|
|
2011-07-17 15:27:14 +00:00
|
|
|
macro( KWIN4_ADD_EFFECT_BACKEND name )
|
|
|
|
kde4_add_plugin( ${name} ${ARGN} )
|
2013-03-11 08:33:38 +00:00
|
|
|
target_link_libraries( ${name} ${kwin_effect_OWN_LIBS} ${kwin_effect_KDE_LIBS} ${kwin_effect_QT_LIBS} ${kwin_effect_XLIB_LIBS} ${kwin_effect_XCB_LIBS})
|
2013-02-25 10:44:26 +00:00
|
|
|
endmacro()
|
2007-11-02 17:28:21 +00:00
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
# Adds effect plugin with given name. Sources are given after the name
|
2009-02-05 15:35:38 +00:00
|
|
|
macro( KWIN4_ADD_EFFECT name )
|
2011-07-17 15:27:14 +00: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)
|
2012-10-05 08:45:10 +00:00
|
|
|
if( KWIN_BUILD_OPENGL_1_COMPOSITING )
|
|
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGL_1)
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2011-08-03 14:39:36 +00:00
|
|
|
elseif(OPENGLES_FOUND)
|
2012-10-05 07:58:15 +00:00
|
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES")
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2012-03-16 07:37:09 +00:00
|
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_${name})
|
2011-07-17 15:27:14 +00:00
|
|
|
install( TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2011-07-17 15:27:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
if(OPENGLES_FOUND)
|
|
|
|
KWIN4_ADD_EFFECT_BACKEND(kwin4_effect_gles_${name} ${ARGN})
|
|
|
|
# OpenGL ES gets into a different library
|
2012-10-05 07:58:15 +00:00
|
|
|
set_target_properties(kwin4_effect_gles_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES")
|
2012-03-16 07:37:09 +00:00
|
|
|
set_target_properties(kwin4_effect_gles_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_gles_${name})
|
2011-07-17 15:27:14 +00:00
|
|
|
install( TARGETS kwin4_effect_gles_${name} DESTINATION ${PLUGIN_INSTALL_DIR} )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2013-02-25 10:44:26 +00:00
|
|
|
endmacro()
|
2009-02-05 15:35:38 +00:00
|
|
|
|
|
|
|
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} )
|
2013-02-25 13:47:07 +00:00
|
|
|
else()
|
2009-02-05 15:35:38 +00:00
|
|
|
set( kwin4_effect_src ${kwin4_effect_src} ${file} )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2013-02-25 10:44:26 +00:00
|
|
|
endforeach()
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
kde4_add_ui_files( kwin4_effect_src ${kwin4_effect_ui} )
|
|
|
|
kde4_add_plugin( kcm_kwin4_effect_${name} ${kwin4_effect_src} )
|
2011-09-04 16:28:31 +00:00
|
|
|
if(OPENGLES_FOUND)
|
2012-10-05 07:58:15 +00:00
|
|
|
set_target_properties(kcm_kwin4_effect_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES")
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2011-07-26 06:05:09 +00:00
|
|
|
target_link_libraries( kcm_kwin4_effect_${name} kwineffects ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS} )
|
2009-02-05 15:35:38 +00:00
|
|
|
install( TARGETS kcm_kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} )
|
2013-02-25 10:44:26 +00:00
|
|
|
endmacro()
|
2007-05-28 11:34:12 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
# Install the KWin/Effect service type
|
|
|
|
install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
|
2007-05-22 16:58:10 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
# Create initial variables
|
|
|
|
set( kwin4_effect_builtins_sources )
|
2011-05-10 16:25:21 +00:00
|
|
|
if( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
set( kwin4_effect_builtins_config_sources configs_builtins.cpp )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2009-02-05 15:35:38 +00:00
|
|
|
set( kwin4_effect_include_directories )
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2012-02-02 13:39:39 +00:00
|
|
|
# scripted effects
|
|
|
|
add_subdirectory( fade )
|
2013-01-14 07:38:18 +00:00
|
|
|
add_subdirectory( login )
|
2012-02-02 13:39:39 +00:00
|
|
|
|
2012-02-02 16:58:31 +00:00
|
|
|
# scripted effects only relevant to desktop
|
|
|
|
if( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
add_subdirectory( fadedesktop )
|
2012-10-26 09:50:44 +00:00
|
|
|
add_subdirectory( maximize )
|
2013-05-11 22:20:39 +00:00
|
|
|
add_subdirectory( scalein )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2012-02-02 16:58:31 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
###############################################################################
|
|
|
|
# Built-in effects go here
|
|
|
|
|
|
|
|
# Common effects
|
|
|
|
include( dialogparent/CMakeLists.txt )
|
|
|
|
include( presentwindows/CMakeLists.txt )
|
2013-01-31 12:31:49 +00:00
|
|
|
include( screenedge/CMakeLists.txt )
|
2009-07-23 19:06:50 +00:00
|
|
|
include( slidingpopups/CMakeLists.txt )
|
2009-02-05 15:35:38 +00:00
|
|
|
include( taskbarthumbnail/CMakeLists.txt )
|
2010-12-04 11:32:50 +00:00
|
|
|
|
2011-05-10 16:25:21 +00:00
|
|
|
# Common effects only relevant to desktop
|
|
|
|
if( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
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( 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 )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2007-10-21 13:44:40 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
# OpenGL-specific effects
|
2011-08-13 13:21:51 +00: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 08:53:36 +00:00
|
|
|
include( magnifier/CMakeLists.txt )
|
2012-07-27 05:58:21 +00:00
|
|
|
include( mouseclick/CMakeLists.txt )
|
2011-08-13 13:21:51 +00: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 )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
###############################################################################
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
# Add the builtins plugin
|
|
|
|
KWIN4_ADD_EFFECT( builtins ${kwin4_effect_builtins_sources} )
|
2011-05-10 16:25:21 +00:00
|
|
|
if( NOT KWIN_MOBILE_EFFECTS )
|
|
|
|
KWIN4_ADD_EFFECT_CONFIG( builtins ${kwin4_effect_builtins_config_sources} )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|