From f730c7fda84b1746b38cf22dbd5859a61b6aab48 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 9 Feb 2023 18:52:56 +0200 Subject: [PATCH 35/35] Meson: Fix build when SDL2 is not present Reported by lachu See osdn #47328 Signed-off-by: Marko Lindqvist --- meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 5ff055b174..e757be6eae 100644 --- a/meson.build +++ b/meson.build @@ -599,8 +599,10 @@ if get_option('audio') audio_sdl2_dep = c_compiler.find_library('SDL2_mixer', dirs: cross_lib_path) audio_dep = [sdl2main_dep, audio_sdl2_dep] + audio_sdl_src = 'client/audio_sdl.c' else audio_dep = [] + audio_sdl_src = [] endif if get_option('json-protocol') @@ -1696,7 +1698,6 @@ client_common = static_library('fc_client_common', 'client/attribute.c', 'client/audio.c', 'client/audio_none.c', - 'client/audio_sdl.c', 'client/chatline_common.c', 'client/citydlg_common.c', 'client/cityrepdata.c', @@ -1732,7 +1733,7 @@ client_common = static_library('fc_client_common', 'client/update_queue.c', 'client/voteinfo.c', 'client/zoom.c', - sources: [pack_client, + sources: [audio_sdl_src, pack_client, tolua.process('client/luascript/tolua_client.pkg')], include_directories: client_inc, link_with: [common_lib], -- 2.39.1