From fa327203de6ea63c1999b43539ff06e49dbf7f14 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 28 Nov 2022 21:58:00 +0200 Subject: [PATCH 39/39] Meson: Substitute @FREECIV_STORAGE_DIR@ in fc_config.h Reported by ddeanbrown See osdn #46134 Signed-off-by: Marko Lindqvist --- meson.build | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index f153829ca7..86b3771ebb 100644 --- a/meson.build +++ b/meson.build @@ -85,21 +85,25 @@ else endif if host_system == 'windows' - def_storage_dir = '"~\\\\.freeciv"' + def_storage_dir = '~\\\\.freeciv' else if host_system == 'haiku' - def_storage_dir = '"~/config/settings/freeciv"' + def_storage_dir = '~/config/settings/freeciv' else - def_storage_dir = '"~/.freeciv"' + def_storage_dir = '~/.freeciv' endif endif -if storage_dir != '' - pub_conf_data.set('FREECIV_STORAGE_DIR', '"' + storage_dir + '"') -else - pub_conf_data.set('FREECIV_STORAGE_DIR', def_storage_dir) +if storage_dir == '' + storage_dir = def_storage_dir endif +# pub conf defines a macro for FREECIV_STORAGE_DIR +# priv conf does substitution in data path macros +# They need this in different formats. +pub_conf_data.set('FREECIV_STORAGE_DIR', '"' + storage_dir + '"') +priv_conf_data.set('FREECIV_STORAGE_DIR', storage_dir) + if host_system == 'windows' priv_conf_data.set('LOCALEDIR', join_paths('.', get_option('datadir'), 'locale')) -- 2.35.1