SDL: cmake: consider X11 as not available when xext.h is not found

From 16ad3e5af6ac12af6d6e06c49d78f4d6ec081519 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sun, 5 Jan 2025 16:05:21 +0100
Subject: [PATCH] cmake: consider X11 as not available when xext.h is not found

This is user friendlier than straight up erroring
---
 cmake/sdlchecks.cmake | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index b545c998393cd..890e9186b751b 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -313,10 +313,7 @@ macro(CheckX11)
     find_file(HAVE_XDBE_H NAMES "X11/extensions/Xdbe.h" HINTS "${X11_INCLUDEDIR}")
     find_file(HAVE_XEXT_H NAMES "X11/extensions/Xext.h" HINTS "${X11_INCLUDEDIR}")
 
-    if(X11_LIB)
-      if(NOT HAVE_XEXT_H)
-        message(FATAL_ERROR "Missing Xext.h, maybe you need to install the libxext-dev package?")
-      endif()
+    if(X11_LIB AND HAVE_XEXT_H)
 
       set(HAVE_X11 TRUE)
       set(HAVE_SDL_VIDEO TRUE)