1 ########### configure tests ###############
3 # KWIN_HAVE_COMPOSITING - whether any compositing support is available
4 if( X11_Xcomposite_FOUND AND X11_Xdamage_FOUND )
5 set( KWIN_HAVE_COMPOSITING 1 )
6 endif( X11_Xcomposite_FOUND AND X11_Xdamage_FOUND )
8 # KWIN_HAVE_OPENGL_COMPOSITING - whether OpenGL-based compositing support is available
9 if( KWIN_HAVE_COMPOSITING AND OPENGL_FOUND )
10 set( KWIN_HAVE_OPENGL_COMPOSITING 1 )
11 endif( KWIN_HAVE_COMPOSITING AND OPENGL_FOUND )
13 # KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available
14 if( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND )
15 set( KWIN_HAVE_XRENDER_COMPOSITING 1 )
16 endif( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND )
19 if( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
21 else( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
22 set( KWIN_HAVE_COMPOSITING ) # unset
23 endif( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
25 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")
27 macro_bool_to_01( OPENGL_FOUND KWIN_HAVE_OPENGL )
29 # for things that are also used by kwin libraries
30 configure_file(lib/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/lib/kwinconfig.h )
31 # for kwin internal things
32 configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
35 ########### global ###############
38 ${CMAKE_CURRENT_BINARY_DIR}/lib
39 ${CMAKE_CURRENT_BINARY_DIR}
40 ${CMAKE_CURRENT_SOURCE_DIR}/lib
41 ${CMAKE_CURRENT_SOURCE_DIR}/effects
42 ${KDEBASE_WORKSPACE_SOURCE_DIR}/libs/kephal
46 add_subdirectory( lib )
47 add_subdirectory( killer )
48 add_subdirectory( kcmkwin )
49 add_subdirectory( clients )
50 add_subdirectory( data )
52 if( KWIN_HAVE_COMPOSITING )
53 add_subdirectory( effects )
54 endif( KWIN_HAVE_COMPOSITING )
56 ########### next target ###############
94 qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWin::Workspace )
98 kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
100 target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} kephal kdecorations kwineffects ${X11_LIBRARIES})
103 target_link_libraries(kdeinit_kwin ${OPENGL_gl_LIBRARY})
104 # -ldl used by OpenGL code
105 find_library(DL_LIBRARY dl)
107 target_link_libraries(kdeinit_kwin ${DL_LIBRARY})
109 # must be after opengl, to be initialized first by the linker
110 target_link_libraries(kdeinit_kwin kwinnvidiahack)
113 if (X11_Xrandr_FOUND)
114 target_link_libraries(kdeinit_kwin ${X11_Xrandr_LIB})
115 endif (X11_Xrandr_FOUND)
116 if (X11_Xcomposite_FOUND)
117 target_link_libraries(kdeinit_kwin ${X11_Xcomposite_LIB})
118 endif (X11_Xcomposite_FOUND)
119 if (X11_Xdamage_FOUND)
120 target_link_libraries(kdeinit_kwin ${X11_Xdamage_LIB})
121 endif (X11_Xdamage_FOUND)
122 if (X11_Xrender_FOUND)
123 target_link_libraries(kdeinit_kwin ${X11_Xrender_LIB})
124 endif (X11_Xrender_FOUND)
125 if (X11_Xfixes_FOUND)
126 target_link_libraries(kdeinit_kwin ${X11_Xfixes_LIB})
127 endif (X11_Xfixes_FOUND)
129 install(TARGETS kdeinit_kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
130 install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
133 ########### next target ###############
135 set( kwinnvidiahack_LIB_SRCS
139 kde4_add_library(kwinnvidiahack SHARED ${kwinnvidiahack_LIB_SRCS})
141 set_target_properties(kwinnvidiahack PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
142 install(TARGETS kwinnvidiahack ${INSTALL_TARGETS_DEFAULT_ARGS} )
144 ########### install files ###############
146 install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
147 install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwin )
148 install( FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
150 kde4_install_icons( ${ICON_INSTALL_DIR} )