2008-01-03 15:22:19 +00:00
########### configure tests ###############
# KWIN_HAVE_COMPOSITING - whether any compositing support is available
if( X11_Xcomposite_FOUND AND X11_Xdamage_FOUND )
set( KWIN_HAVE_COMPOSITING 1 )
endif( X11_Xcomposite_FOUND AND X11_Xdamage_FOUND )
# KWIN_HAVE_OPENGL_COMPOSITING - whether OpenGL-based compositing support is available
if( KWIN_HAVE_COMPOSITING AND OPENGL_FOUND )
set( KWIN_HAVE_OPENGL_COMPOSITING 1 )
endif( KWIN_HAVE_COMPOSITING AND OPENGL_FOUND )
# KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available
if( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND )
set( KWIN_HAVE_XRENDER_COMPOSITING 1 )
endif( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND )
# safety
if( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
# ok
else( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
set( KWIN_HAVE_COMPOSITING ) # unset
endif( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
2008-06-17 00:43:34 +00:00
macro_log_feature(KWIN_HAVE_COMPOSITING "Compositing support" "X11 Compositing support" "http://www.x.org/" FALSE "" "XComposite and XDamage extensions and OpenGL or XRender with XFixes are required for KWin compositing support")
2008-01-03 15:32:37 +00:00
2008-01-03 15:22:19 +00:00
macro_bool_to_01( OPENGL_FOUND KWIN_HAVE_OPENGL )
2010-03-05 18:30:04 +00:00
if(OPENGL_FOUND)
include_directories(${OPENGL_INCLUDE_DIR})
endif(OPENGL_FOUND)
2008-01-03 15:22:19 +00:00
# for things that are also used by kwin libraries
configure_file(lib/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/lib/kwinconfig.h )
# for kwin internal things
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
########### global ###############
2007-04-29 17:35:43 +00:00
include_directories(
${CMAKE_CURRENT_BINARY_DIR}/lib
2007-06-22 16:32:06 +00:00
${CMAKE_CURRENT_BINARY_DIR}
2007-04-29 17:35:43 +00:00
${CMAKE_CURRENT_SOURCE_DIR}/lib
${CMAKE_CURRENT_SOURCE_DIR}/effects
2009-09-13 11:36:45 +00:00
${CMAKE_CURRENT_SOURCE_DIR}/tabbox
2008-11-15 15:31:07 +00:00
${KDEBASE_WORKSPACE_SOURCE_DIR}/libs/kephal
2010-05-11 20:30:20 +00:00
${KDEBASE_WORKSPACE_SOURCE_DIR}/libs/kworkspace
2007-04-29 17:35:43 +00:00
)
2008-01-03 15:22:19 +00:00
add_subdirectory( lib )
2007-06-22 16:32:06 +00:00
add_subdirectory( killer )
2010-05-13 17:59:34 +00:00
add_subdirectory( kcmkwin )
2007-06-22 16:32:06 +00:00
add_subdirectory( clients )
add_subdirectory( data )
2008-06-06 11:07:15 +00:00
if( KWIN_HAVE_COMPOSITING )
add_subdirectory( effects )
endif( KWIN_HAVE_COMPOSITING )
2007-04-29 17:35:43 +00:00
########### next target ###############
set(kwin_KDEINIT_SRCS
workspace.cpp
client.cpp
2009-11-15 03:24:04 +00:00
clientgroup.cpp
2007-04-29 17:35:43 +00:00
placement.cpp
atoms.cpp
utils.cpp
layers.cpp
main.cpp
2009-09-13 11:36:45 +00:00
tabbox.cpp
tabbox/clientitemdelegate.cpp
tabbox/clientmodel.cpp
tabbox/desktopitemdelegate.cpp
tabbox/desktopmodel.cpp
tabbox/itemlayoutconfig.cpp
tabbox/tabboxconfig.cpp
tabbox/tabboxhandler.cpp
tabbox/tabboxview.cpp
2009-04-06 16:09:34 +00:00
desktopchangeosd.cpp
2007-04-29 17:35:43 +00:00
options.cpp
plugins.cpp
events.cpp
killwindow.cpp
geometrytip.cpp
sm.cpp
group.cpp
bridge.cpp
manage.cpp
notifications.cpp
activation.cpp
useractions.cpp
geometry.cpp
rules.cpp
composite.cpp
toplevel.cpp
unmanaged.cpp
scene.cpp
scene_basic.cpp
scene_xrender.cpp
scene_opengl.cpp
deleted.cpp
effects.cpp
2007-09-18 13:59:06 +00:00
compositingprefs.cpp
2009-02-14 09:46:12 +00:00
desktoplayout.cpp
2009-04-22 17:29:56 +00:00
paintredirector.cpp
2010-04-25 16:43:14 +00:00
tile.cpp
tiling.cpp
tilinglayout.cpp
tilinglayoutfactory.cpp
# tiling layouts
# spiral
#tilinglayouts/spiral/spiralfactory.cpp
tilinglayouts/spiral/spiral.cpp
# columns
#tilinglayouts/columns/columnsfactory.cpp
tilinglayouts/columns/columns.cpp
# floating
tilinglayouts/floating/floating.cpp
2007-04-29 17:35:43 +00:00
)
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWin::Workspace )
kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
2010-05-11 20:30:20 +00:00
target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${QT_QTXML_LIBRARY} kephal kworkspace kdecorations kwineffects ${X11_LIBRARIES})
2008-04-25 20:37:59 +00:00
2007-04-29 17:35:43 +00:00
if(OPENGL_FOUND)
2010-02-26 20:47:00 +00:00
add_subdirectory(opengltest)
2007-04-29 17:35:43 +00:00
target_link_libraries(kdeinit_kwin ${OPENGL_gl_LIBRARY})
# -ldl used by OpenGL code
2007-05-10 12:49:57 +00:00
find_library(DL_LIBRARY dl)
if (DL_LIBRARY)
target_link_libraries(kdeinit_kwin ${DL_LIBRARY})
endif(DL_LIBRARY)
2007-12-17 14:19:41 +00:00
# must be after opengl, to be initialized first by the linker
target_link_libraries(kdeinit_kwin kwinnvidiahack)
2007-04-29 17:35:43 +00:00
endif(OPENGL_FOUND)
2008-04-25 20:37:59 +00:00
2007-04-29 17:35:43 +00:00
if (X11_Xrandr_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xrandr_LIB})
endif (X11_Xrandr_FOUND)
if (X11_Xcomposite_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xcomposite_LIB})
endif (X11_Xcomposite_FOUND)
if (X11_Xdamage_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xdamage_LIB})
endif (X11_Xdamage_FOUND)
if (X11_Xrender_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xrender_LIB})
endif (X11_Xrender_FOUND)
if (X11_Xfixes_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xfixes_LIB})
endif (X11_Xfixes_FOUND)
2008-04-01 16:42:27 +00:00
install(TARGETS kdeinit_kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
2008-04-11 06:52:03 +00:00
install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
2007-04-29 17:35:43 +00:00
2007-12-17 14:19:41 +00:00
########### next target ###############
set( kwinnvidiahack_LIB_SRCS
nvidiahack.cpp )
kde4_add_library(kwinnvidiahack SHARED ${kwinnvidiahack_LIB_SRCS})
set_target_properties(kwinnvidiahack PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
2008-04-01 16:42:27 +00:00
install(TARGETS kwinnvidiahack ${INSTALL_TARGETS_DEFAULT_ARGS} )
2007-12-17 14:19:41 +00:00
2007-04-29 17:35:43 +00:00
########### install files ###############
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwin )
2007-07-23 07:01:14 +00:00
install( FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
2009-09-13 11:36:45 +00:00
install( FILES tabbox/DefaultTabBoxLayouts.xml DESTINATION ${DATA_INSTALL_DIR}/kwin )
2007-04-29 17:35:43 +00:00
kde4_install_icons( ${ICON_INSTALL_DIR} )