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.
This commit is contained in:
Max Kellermann 2024-07-05 17:02:30 +02:00
parent 473fb4e19f
commit 044280c538
4 changed files with 5 additions and 20 deletions

1
NEWS
View File

@ -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

View File

@ -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 <http://mesonbuild.com/>`__ and `Ninja
* `Meson 1.0 <http://mesonbuild.com/>`__ and `Ninja
<https://ninja-build.org/>`__
* pkg-config

View File

@ -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',

View File

@ -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 <iconv.h>
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
endif
icu = static_library(