diff options
-rw-r--r-- | ConfigureChecks.cmake | 7 | ||||
-rw-r--r-- | twin/compton-tde/CMakeLists.txt | 10 | ||||
-rw-r--r-- | twin/compton-tde/common.h | 2 | ||||
-rw-r--r-- | twin/compton-tde/compton_config.h.cmake | 4 |
4 files changed, 17 insertions, 6 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index f89bfa09f..96c7feac6 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -136,6 +136,13 @@ if( WITH_XCOMPOSITE ) tde_message_fatal( "xext is required for xcomposite support, but was not found on your system" ) endif( ) + # for (twin/compton) + # older libXext (e.g.in debian-6.0) doesn't provide XSyncFence + tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${XEXT_INCLUDE_DIRS}" ) + tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${XEXT_LIBRARIES}" ) + check_symbol_exists( "XSyncCreateFence" "X11/Xlib.h;X11/extensions/sync.h" HAVE_XEXT_XSYNCFENCE ) + tde_restore( CMAKE_REQUIRED_LIBRARIES ) + tde_restore( CMAKE_REQUIRED_INCLUDES ) endif( ) diff --git a/twin/compton-tde/CMakeLists.txt b/twin/compton-tde/CMakeLists.txt index 1f6d6e682..ebaf38f33 100644 --- a/twin/compton-tde/CMakeLists.txt +++ b/twin/compton-tde/CMakeLists.txt @@ -28,31 +28,35 @@ include_directories( # TDE to compton config option map # WITH_XINNERAMA -> CONFIG_XINERAMA # WITH_XRANDR -> CONFIG_XANDR +# HAVE_XEXT_XSYNCFENCE -> CONFIG_XSYNC # WITH_OPENGL -> CONFIG_VSYNC_OPENGL # WITH_OPENGL -> CONFIG_VSYNC_OPENGL_GLSL # WITH_OPENGL -> CONFIG_VSYNC_OPENGL_FBO -# WITH_OPENGL -> CONFIG_GLX_XSYNC # WITH_PCRE -> CONFIG_REGEX_PCRE # WITH_PCRE -> CONFIG_REGEX_PCRE_JIT # WITH_LIBCONFIG -> CONFIG_LIBCONFIG # # HAVE_LIBCONFIG_OLD_API -> CONFIG_LIBCONFIG_LEGACY (set up in compton_config.h) +# CONFIG_XSYNC -> CONFIG_GLX_SYNC # # CONFIG_DBUS - always ON # CONFIG_C2 - always ON -# CONFIG_XSYNC - always ON (utilieses Xext) # TODO: think about some configuration option for CONFIG_VSYNC_DRM +# NOTE: HAVE__XEXT_XSYNCFENCE is an automatically detected feature that shows +# that libXext provides coresponding feature. add_definitions("-std=c99") set( compton_SRCS compton.c ) +set( CONFIG_XSYNC ${HAVE_XEXT_XSYNCFENCE} ) + if( WITH_OPENGL ) set( CONFIG_VSYNC_OPENGL ${WITH_OPENGL} ) set( CONFIG_VSYNC_OPENGL_GLSL ${WITH_OPENGL} ) set( CONFIG_VSYNC_OPENGL_FBO ${WITH_OPENGL} ) - set( CONFIG_GLX_XSYNC ${WITH_OPENGL} ) + set( CONFIG_GLX_SYNC ${CONFIG_XSYNC} ) list( APPEND compton_LIBRARIES ${GL_LIBRARIES}) list( APPEND compton_SRCS opengl.c ) endif( ) diff --git a/twin/compton-tde/common.h b/twin/compton-tde/common.h index 6f61e7822..8a7bae6d5 100644 --- a/twin/compton-tde/common.h +++ b/twin/compton-tde/common.h @@ -61,7 +61,7 @@ // Whether to enable X Sync support. // #define CONFIG_XSYNC 1 // Whether to enable GLX Sync support. -// #define CONFIG_GLX_XSYNC 1 +// #define CONFIG_GLX_SYNC 1 // TDE specific options // #define USE_ENV_HOME 1 diff --git a/twin/compton-tde/compton_config.h.cmake b/twin/compton-tde/compton_config.h.cmake index a77d93b57..bf3f22543 100644 --- a/twin/compton-tde/compton_config.h.cmake +++ b/twin/compton-tde/compton_config.h.cmake @@ -21,7 +21,7 @@ #define CONFIG_C2 1 // Whether to enable X Sync support. -#define CONFIG_XSYNC 1 +#cmakedefine CONFIG_XSYNC 1 // Whether to enable OpenGL support #cmakedefine CONFIG_VSYNC_OPENGL 1 @@ -30,7 +30,7 @@ // Whether to enable GLX FBO support #cmakedefine CONFIG_VSYNC_OPENGL_FBO 1 // Whether to enable GLX Sync support. -#cmakedefine CONFIG_GLX_XSYNC 1 +#cmakedefine CONFIG_GLX_SYNC 1 // Whether to enable Xranr support #cmakedefine CONFIG_XRANDR 1 |