From 5d1871702b97313134e19c71aa30420db064963d Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 3 Apr 2021 08:38:51 +0300 Subject: [PATCH 42/42] Meson: Add xz compression support See osdn #41907 Signed-off-by: Marko Lindqvist --- gen_headers/meson_freeciv_config.h.in | 3 +++ meson.build | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gen_headers/meson_freeciv_config.h.in b/gen_headers/meson_freeciv_config.h.in index d0fd9bddb8..e1a8128df6 100644 --- a/gen_headers/meson_freeciv_config.h.in +++ b/gen_headers/meson_freeciv_config.h.in @@ -104,6 +104,9 @@ /* Readline support */ #mesondefine FREECIV_HAVE_LIBREADLINE +/* liblzma is available */ +#mesondefine FREECIV_HAVE_LIBLZMA + /* winsock2.h available */ #mesondefine FREECIV_HAVE_WINSOCK2_H diff --git a/meson.build b/meson.build index a5d31c2ffa..2f1d215c82 100644 --- a/meson.build +++ b/meson.build @@ -165,6 +165,12 @@ if readline_dep.found() pub_conf_data.set('FREECIV_HAVE_LIBREADLINE', 1) endif +lzma_dep = c_compiler.find_library('lzma', required:false) + +if lzma_dep.found() + pub_conf_data.set('FREECIV_HAVE_LIBLZMA', 1) +endif + syslua = get_option('syslua') lua_dep_tmp = dependency('lua-5.4', required:false) @@ -528,7 +534,7 @@ common_lib = library('freeciv', c_compiler.find_library('z', dirs: cross_lib_path), c_compiler.find_library('libcurl', dirs: cross_lib_path), c_compiler.find_library('libsqlite3', dirs: cross_lib_path), - ws2_dep, jansson_dep, lua_dep, dependency('threads')], + ws2_dep, jansson_dep, lua_dep, lzma_dep, dependency('threads')], install : true ) -- 2.30.2