From df90dde5150729fcd8988265836770180149abbc Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 19 Dec 2025 03:34:21 +0200 Subject: [PATCH] Meson: Sanity check sdl2/sdl3 audio and sdl2/sdl3-client combinations See RM #1822 Signed-off-by: Marko Lindqvist --- meson.build | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meson.build b/meson.build index 2bc7200bb0..3919d0b367 100644 --- a/meson.build +++ b/meson.build @@ -4,6 +4,18 @@ project('freeciv', ['c'], version : run_command('fc_version', check : true).stdout(), default_options: ['warning_level=1']) +if get_option('audio') == 'sdl2' and get_option('clients').contains('sdl3') + error('''sdl3-client and sdl2 audio cannot be enabled simultaneously. +To build both sdl2-client and sdl3-client with audio support, +use separate build dirs.''') +endif + +if get_option('audio') == 'sdl3' and get_option('clients').contains('sdl2') + error('''sdl2-client and sdl3 audio cannot be enabled simultaneously. +To build both sdl2-client and sdl3-client with audio support, +use separate build dirs.''') +endif + c_compiler = meson.get_compiler('c') b_root = meson.project_build_root()