From 044280c538e3f9cc3925b2111dcb545cdb35d0ce Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jul 2024 17:02:30 +0200 Subject: [PATCH] meson.build: require Meson 1.0 Debian Bookworm (the current stable) has 1.0.1 and Ubuntu LTS 24.04 has 1.3.2. It's acceptable to require at least version 1.0 now. --- NEWS | 1 + doc/user.rst | 2 +- meson.build | 2 +- src/lib/icu/meson.build | 20 ++------------------ 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index 7dfde75c7..433328caf 100644 --- a/NEWS +++ b/NEWS @@ -63,6 +63,7 @@ ver 0.24 (not yet released) * remove Boost dependency * require libfmt 9 or later * documentation: switch to sphinx-rtd-theme +* require Meson 1.0 ver 0.23.15 (2023/12/20) * decoder diff --git a/doc/user.rst b/doc/user.rst index 5027ee10d..c8e398b8e 100644 --- a/doc/user.rst +++ b/doc/user.rst @@ -58,7 +58,7 @@ and unpack it (or `clone the git repository In any case, you need: * a C++20 compiler (e.g. GCC 10 or clang 11) -* `Meson 0.56.0 `__ and `Ninja +* `Meson 1.0 `__ and `Ninja `__ * pkg-config diff --git a/meson.build b/meson.build index aba8b635d..501ca1860 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'mpd', ['c', 'cpp'], version: '0.24', - meson_version: '>= 0.56.0', + meson_version: '>= 1.0', default_options: [ 'c_std=c11', 'build.c_std=c11', diff --git a/src/lib/icu/meson.build b/src/lib/icu/meson.build index 2eb5ce446..3ecc0a517 100644 --- a/src/lib/icu/meson.build +++ b/src/lib/icu/meson.build @@ -22,24 +22,8 @@ if icu_dep.found() 'Transliterator.cxx', ] else - if meson.version().version_compare('>= 0.60') - iconv_dep = dependency('iconv', required: get_option('iconv')) - conf.set('HAVE_ICONV', iconv_dep.found()) - elif not get_option('iconv').disabled() - iconv_open_snippet = '''#include - int main() { - iconv_open("",""); - }''' - have_iconv = compiler.links(iconv_open_snippet, name: 'iconv_open') - if not have_iconv - iconv_dep = compiler.find_library('iconv', required: false) - have_iconv = compiler.links(iconv_open_snippet, dependencies: iconv_dep, name: 'iconv_open') - endif - if not have_iconv and get_option('iconv').enabled() - error('iconv() not available') - endif - conf.set('HAVE_ICONV', have_iconv) - endif + iconv_dep = dependency('iconv', required: get_option('iconv')) + conf.set('HAVE_ICONV', iconv_dep.found()) endif icu = static_library(