meson: switch iconv to meson's handling
Fixes compilation under OpenWrt.
This commit is contained in:
parent
6a82bcbc2a
commit
b27d4b69ce
16
meson.build
16
meson.build
|
@ -1,6 +1,6 @@
|
||||||
project('libpsl', 'c',
|
project('libpsl', 'c',
|
||||||
version : files('version.txt'),
|
version : files('version.txt'),
|
||||||
meson_version : '>=0.57.0')
|
meson_version : '>=0.60.0')
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
|
@ -91,19 +91,7 @@ endif
|
||||||
if libidn2_dep.found() or libidn_dep.found()
|
if libidn2_dep.found() or libidn_dep.found()
|
||||||
# Check for libunistring, we need it for psl_str_to_utf8lower()
|
# Check for libunistring, we need it for psl_str_to_utf8lower()
|
||||||
libunistring = cc.find_library('unistring')
|
libunistring = cc.find_library('unistring')
|
||||||
found_iconv = false
|
libiconv_dep = dependency('iconv')
|
||||||
if cc.has_function('iconv_open')
|
|
||||||
libiconv_dep = []
|
|
||||||
found_iconv = true
|
|
||||||
endif
|
|
||||||
if not found_iconv and cc.has_header_symbol('iconv.h', 'iconv_open')
|
|
||||||
libiconv_dep = [cc.find_library('iconv')]
|
|
||||||
found_iconv = true
|
|
||||||
endif
|
|
||||||
|
|
||||||
if not found_iconv
|
|
||||||
error('iconv implementation not found')
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
|
|
Loading…
Reference in New Issue