From 01b7bb3a4b6f2a838b778e8571b62f50bc35cd16 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 8 Jun 2021 04:43:02 +0300 Subject: [PATCH 57/57] Meson: Link against libintl when needed See osdn #42485 Signed-off-by: Marko Lindqvist --- meson.build | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 64930193f1..e7938d5c47 100644 --- a/meson.build +++ b/meson.build @@ -340,6 +340,10 @@ endif if get_option('nls') pub_conf_data.set('FREECIV_ENABLE_NLS', 1) priv_conf_data.set('ENABLE_NLS', 1) + gettext_dep = c_compiler.find_library('intl', dirs: cross_lib_path, + required: false) +else + gettext_dep = [] endif if get_option('gitrev') @@ -600,6 +604,7 @@ common_lib = library('freeciv', c_compiler.find_library('libcurl', dirs: cross_lib_path), c_compiler.find_library('libsqlite3', dirs: cross_lib_path), ws2_dep, jansson_dep, lua_dep, lzma_dep, bcrypt_lib_dep, iconv_lib_dep, + gettext_dep, dependency('threads')], install : true ) @@ -722,7 +727,7 @@ executable(server_binary_name, include_directories: server_inc, link_with: [server_lib, common_lib, ais], dependencies: [c_compiler.find_library('m'), - ws2_dep, readline_dep], + ws2_dep, readline_dep, gettext_dep], install: true ) @@ -2638,7 +2643,7 @@ executable('freeciv-ruleup', link_with: [common_lib, server_lib, tool_lib, ais], include_directories: tool_inc, dependencies: [c_compiler.find_library('m'), - ws2_dep, readline_dep], + ws2_dep, readline_dep, gettext_dep], install: true ) @@ -2697,7 +2702,7 @@ executable('freeciv-ruledit', mocced_ruledit, include_directories: tool_inc, dependencies: [qt5_dep, c_compiler.find_library('m'), - ws2_dep, readline_dep], + ws2_dep, readline_dep, gettext_dep], link_with: [common_lib, server_lib, ais, tool_lib], install: true ) @@ -2711,7 +2716,7 @@ executable('freeciv-manual', include_directories: [tool_inc, include_directories('client', 'client/include')], dependencies: [c_compiler.find_library('m'), - ws2_dep, readline_dep], + ws2_dep, readline_dep, gettext_dep], install: true ) -- 2.30.2