Redo checks for KWIN_HAVE(_XXX)_COMPOSITING again, in order
to have it the same also in makefiles. svn path=/trunk/KDE/kdebase/workspace/; revision=756678
This commit is contained in:
parent
f293b965c6
commit
f97bd45da9
5 changed files with 45 additions and 58 deletions
|
@ -1,4 +1,36 @@
|
|||
add_subdirectory( lib )
|
||||
########### 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 )
|
||||
|
||||
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 ###############
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lib
|
||||
|
@ -7,16 +39,14 @@ include_directories(
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/effects
|
||||
)
|
||||
|
||||
|
||||
add_subdirectory( lib )
|
||||
add_subdirectory( killer )
|
||||
add_subdirectory( kcmkwin )
|
||||
add_subdirectory( clients )
|
||||
add_subdirectory( effects )
|
||||
add_subdirectory( data )
|
||||
|
||||
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
|
||||
########### next target ###############
|
||||
|
||||
set(kwin_KDEINIT_SRCS
|
||||
|
|
|
@ -91,7 +91,7 @@ install( FILES
|
|||
zoom_config.desktop
|
||||
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
|
||||
|
||||
if(OPENGL_FOUND)
|
||||
if(KWIN_HAVE_OPENGL_COMPOSITING)
|
||||
# opengl-based effects
|
||||
SET(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
|
||||
blur.cpp
|
||||
|
@ -154,10 +154,10 @@ if(OPENGL_FOUND)
|
|||
sharpen_config.desktop
|
||||
trackmouse_config.desktop
|
||||
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
|
||||
endif(OPENGL_FOUND)
|
||||
endif(KWIN_HAVE_OPENGL_COMPOSITING)
|
||||
|
||||
# showfps, showpaint - need both xrender and opengl
|
||||
if( OPENGL_FOUND AND X11_Xrender_FOUND )
|
||||
if(KWIN_HAVE_OPENGL_COMPOSITING AND KWIN_HAVE_XRENDER_COMPOSITING)
|
||||
SET(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
|
||||
showfps.cpp
|
||||
showpaint.cpp
|
||||
|
@ -166,16 +166,16 @@ if( OPENGL_FOUND AND X11_Xrender_FOUND )
|
|||
showfps.desktop
|
||||
showpaint.desktop
|
||||
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
|
||||
endif( OPENGL_FOUND AND X11_Xrender_FOUND )
|
||||
endif(KWIN_HAVE_OPENGL_COMPOSITING AND KWIN_HAVE_XRENDER_COMPOSITING)
|
||||
|
||||
# add the plugin
|
||||
KWIN4_ADD_EFFECT(builtins ${kwin4_effect_builtins_sources})
|
||||
KWIN4_ADD_EFFECT_CONFIG(builtins ${kwin4_effect_builtins_config_sources})
|
||||
# link to xrender if necessary
|
||||
# note that libkwineffects already links to opengl, so no need to add this here
|
||||
if (X11_Xrender_FOUND)
|
||||
if (KWIN_HAVE_XRENDER_COMPOSITING)
|
||||
target_link_libraries(kwin4_effect_builtins ${X11_Xrender_LIB})
|
||||
endif (X11_Xrender_FOUND)
|
||||
endif (KWIN_HAVE_XRENDER_COMPOSITING)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
|
||||
configure_file(kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kwinconfig.h )
|
||||
|
||||
|
||||
########### next target ###############
|
||||
|
||||
set(kdecorations_LIB_SRCS
|
||||
|
|
|
@ -15,30 +15,6 @@
|
|||
#undef KWIN_HAVE_OPENGL
|
||||
#endif
|
||||
|
||||
#if ${HAVE_XRENDER}
|
||||
#define KWIN_HAVE_XRENDER 1
|
||||
#else
|
||||
#undef KWIN_HAVE_XRENDER
|
||||
#endif
|
||||
|
||||
#if ${HAVE_XFIXES}
|
||||
#define KWIN_HAVE_XFIXES 1
|
||||
#else
|
||||
#undef KWIN_HAVE_XFIXES
|
||||
#endif
|
||||
|
||||
#if ${HAVE_XDAMAGE}
|
||||
#define KWIN_HAVE_XDAMAGE 1
|
||||
#else
|
||||
#undef KWIN_HAVE_XDAMAGE
|
||||
#endif
|
||||
|
||||
#if ${HAVE_XCOMPOSITE}
|
||||
#define KWIN_HAVE_XCOMPOSITE 1
|
||||
#else
|
||||
#undef KWIN_HAVE_XCOMPOSITE
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
These should be primarily used to detect what kind of compositing
|
||||
|
@ -47,28 +23,13 @@
|
|||
*/
|
||||
|
||||
/* KWIN_HAVE_COMPOSITING - whether any compositing support is available */
|
||||
#if defined( KWIN_HAVE_XCOMPOSITE ) && defined( KWIN_HAVE_XDAMAGE )
|
||||
#define KWIN_HAVE_COMPOSITING 1
|
||||
#else
|
||||
#undef KWIN_HAVE_COMPOSITING
|
||||
#endif
|
||||
#cmakedefine KWIN_HAVE_COMPOSITING
|
||||
|
||||
/* KWIN_HAVE_OPENGL_COMPOSITING - whether OpenGL-based compositing support is available */
|
||||
#if defined( KWIN_HAVE_COMPOSITING ) && defined( KWIN_HAVE_OPENGL )
|
||||
#define KWIN_HAVE_OPENGL_COMPOSITING 1
|
||||
#else
|
||||
#undef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
#endif
|
||||
#cmakedefine KWIN_HAVE_OPENGL_COMPOSITING
|
||||
|
||||
/* KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available */
|
||||
#if defined( KWIN_HAVE_COMPOSITING ) && defined( KWIN_HAVE_XRENDER ) && defined( KWIN_HAVE_XFIXES )
|
||||
#define KWIN_HAVE_XRENDER_COMPOSITING 1
|
||||
#else
|
||||
#undef KWIN_HAVE_XRENDER_COMPOSITING
|
||||
#endif
|
||||
#cmakedefine KWIN_HAVE_XRENDER_COMPOSITING
|
||||
|
||||
#if !defined( KWIN_HAVE_OPENGL_COMPOSITING ) && !defined( KWIN_HAVE_XRENDER_COMPOSITING )
|
||||
#undef KWIN_HAVE_COMPOSITING
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef KWIN_HAVE_XRENDER
|
||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue