From 8d5a0ac58155e94d70912d3ceb33f2af57454abf Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Mon, 28 Jul 2025 15:39:23 +0300 Subject: [PATCH] cmake: fix detection of libXext and libXv Also require them only if appropriate backends are getting built Signed-off-by: Alexander Golubev (cherry picked from commit 433b3113a37528443dddb26fe961affb51377a65) --- ConfigureChecks.cmake | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 1a82077..bbbed63 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -31,13 +31,14 @@ endif( WITH_GCC_VISIBILITY ) find_package( X11 ) -##### check for XShm, Xv - -if( X11_FOUND ) - elseif( NOT X11_XShm_FOUND ) - tde_message_fatal( "libXext is required, but was not found on your system." ) - elseif( NOT X11_Xv_FOUND ) - tde_message_fatal( "libXv is required, but was not found on your system." ) +##### check for XExt, Xv + +if( NOT X11_FOUND ) + tde_message_fatal( "X11 is required, but was not found on your system." ) +elseif( NOT X11_XExt_FOUND AND ( BUILD_KXVPLAYER OR BUILD_KXINEPLAYER ) ) + tde_message_fatal( "libXext is required, but was not found on your system." ) +elseif( NOT X11_Xv_FOUND AND BUILD_KXVPLAYER ) + tde_message_fatal( "libXv is required, but was not found on your system." ) endif()