From 0d1ebe082a9c5d688d504fe8a9e6a07096855d15 Mon Sep 17 00:00:00 2001
From: vanfanel <[EMAIL REDACTED]>
Date: Mon, 3 Nov 2025 21:02:13 +0100
Subject: [PATCH] Fix building tests without X11.
---
test/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5c831ba..d86e81e 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -115,14 +115,14 @@ if(APPLE)
elseif(WIN32)
set(TESTNATIVE_EXTRA "testnativew32.c")
elseif(UNIX AND NOT ANDROID)
- if(NOT SDL2COMPAT_DISABLE_X11)
+ if(SDL2COMPAT_X11)
find_package(X11 REQUIRED)
set(TESTNATIVE_EXTRA "testnativex11.c")
endif()
endif()
test_program(testnative SRC "testnative.c" "testutils.c" "${TESTNATIVE_EXTRA}")
if(UNIX AND NOT ANDROID AND NOT APPLE)
- if(NOT SDL2COMPAT_DISABLE_X11)
+ if(SDL2COMPAT_X11)
target_link_libraries(testnative PRIVATE X11)
endif()
endif()