From cbe736ab583f316b4f3fbb3bd08231674d04c877 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Fri, 4 Sep 2026 19:25:57 +0300
Subject: [PATCH 67/67] Meson: Hard require sdl libs for sdl-clients

Configure phase was not considering
SDL2_image and SDL2_ttf hard requirements for sdl2-client, or
sdl3-image and sdl3-ttf hard requirements for sdl3-client.
Instead of proper configure time error message we got
much more mystique errors at build time when some library
was not present.

See RM #2207

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index c300aa45af..90646d844b 100644
--- a/meson.build
+++ b/meson.build
@@ -3989,8 +3989,8 @@ if host_system != 'emscripten'
     sdl2_gfx_cargs = '-DSDL2_GFX_FROM_TREE'
   endif
 
-  sdl2_image_dep = dependency('SDL2_image', required: false)
-  sdl2_ttf_dep = dependency('SDL2_ttf', required: false)
+  sdl2_image_dep = dependency('SDL2_image')
+  sdl2_ttf_dep = dependency('SDL2_ttf')
 endif
 
 executable('freeciv-sdl2',
@@ -4121,8 +4121,8 @@ sdl3_ttf_dep = []
 if host_system != 'emscripten'
   sdl3_gfx_inc = include_directories('dependencies')
 
-  sdl3_image_dep = dependency('sdl3-image', required: false)
-  sdl3_ttf_dep = dependency('sdl3-ttf', required: false)
+  sdl3_image_dep = dependency('sdl3-image')
+  sdl3_ttf_dep = dependency('sdl3-ttf')
 endif
 
 executable('freeciv-sdl3',
-- 
2.53.0

