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-01-03 15:32:37 +00:00
macro_log_feature ( KWIN_HAVE_COMPOSITING "Compositing support" "XComposite and XDamage extensions and OpenGL or XRender with XFixes are required for KWin compositing support" "http://www.x.org/" )
2008-01-03 15:22:19 +00:00
macro_bool_to_01 ( OPENGL_FOUND KWIN_HAVE_OPENGL )
# 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 (
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / l i b
2007-06-22 16:32:06 +00:00
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R }
2007-04-29 17:35:43 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / l i b
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / e f f e c t s
)
2008-01-03 15:22:19 +00:00
add_subdirectory ( lib )
2007-06-22 16:32:06 +00:00
add_subdirectory ( killer )
add_subdirectory ( kcmkwin )
add_subdirectory ( clients )
add_subdirectory ( effects )
add_subdirectory ( data )
2007-04-29 17:35:43 +00:00
########### next target ###############
set ( kwin_KDEINIT_SRCS
w o r k s p a c e . c p p
c l i e n t . c p p
p l a c e m e n t . c p p
a t o m s . c p p
u t i l s . c p p
l a y e r s . c p p
m a i n . c p p
p o p u p i n f o . c p p
t a b b o x . c p p
o p t i o n s . c p p
p l u g i n s . c p p
e v e n t s . c p p
k i l l w i n d o w . c p p
g e o m e t r y t i p . c p p
s m . c p p
g r o u p . c p p
b r i d g e . c p p
m a n a g e . c p p
n o t i f i c a t i o n s . c p p
a c t i v a t i o n . c p p
u s e r a c t i o n s . c p p
g e o m e t r y . c p p
r u l e s . c p p
c o m p o s i t e . c p p
t o p l e v e l . c p p
u n m a n a g e d . c p p
s c e n e . c p p
s c e n e _ b a s i c . c p p
s c e n e _ x r e n d e r . c p p
s c e n e _ o p e n g l . c p p
d e l e t e d . c p p
e f f e c t s . c p p
2007-09-18 13:59:06 +00:00
c o m p o s i t i n g p r e f s . c p p
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 } )
2007-11-26 15:42:44 +00:00
target_link_libraries ( kdeinit_kwin ${ KDE4_KDEUI_LIBS } kdecorations kwineffects ${ X11_LIBRARIES } )
2007-04-29 17:35:43 +00:00
if ( OPENGL_FOUND )
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 )
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 )
install ( TARGETS kdeinit_kwin DESTINATION ${ LIB_INSTALL_DIR } )
target_link_libraries ( kwin kdeinit_kwin )
install ( TARGETS kwin DESTINATION ${ BIN_INSTALL_DIR } )
2007-12-17 14:19:41 +00:00
########### next target ###############
set ( kwinnvidiahack_LIB_SRCS
n v i d i a h a c k . c p p )
kde4_add_library ( kwinnvidiahack SHARED ${ kwinnvidiahack_LIB_SRCS } )
set_target_properties ( kwinnvidiahack PROPERTIES VERSION ${ GENERIC_LIB_VERSION } SOVERSION ${ GENERIC_LIB_SOVERSION } )
install ( TARGETS kwinnvidiahack DESTINATION ${ LIB_INSTALL_DIR } )
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 } )
2007-04-29 17:35:43 +00:00
kde4_install_icons ( ${ ICON_INSTALL_DIR } )