SDL: cmake: fix building testautomation without X11 support

From 684709a5b696cbf2bdc368bff57eae9ef599214e Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 15 Mar 2023 04:55:11 +0100
Subject: [PATCH] cmake: fix building testautomation without X11 support

---
 test/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 55bc234281d0..23a25ecb1171 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -233,6 +233,10 @@ if(HAVE_WFORMAT_EXTRA_ARGS)
     target_compile_definitions(testautomation PRIVATE HAVE_WFORMAT_EXTRA_ARGS)
 endif()
 
+if(NOT HAVE_X11)
+    target_compile_definitions(testautomation PRIVATE SDL_DISABLE_SYSWM_X11)
+endif()
+
 if(SDL_DUMMYAUDIO)
   list(APPEND SDL_TESTS_NONINTERACTIVE
     testaudioinfo