meson: use check_header to check for iconv

iconv is not a standalone library on Linux, so find_library is pointless
This commit is contained in:
Myaamori 2020-10-27 21:50:15 +00:00 committed by Ryan Lucia
parent 255a9fc846
commit af49c1586d
1 changed files with 2 additions and 5 deletions

View File

@ -50,13 +50,10 @@ cxx = meson.get_compiler('cpp')
cc = meson.get_compiler('c')
deps += cc.find_library('m', required: false)
deps += cc.find_library('dl', required: false)
iconv_dep = cc.find_library('iconv', required: false)
if not iconv_dep.found() and host_machine.system() == 'windows'
if not cxx.check_header('iconv.h')
iconv_sp = subproject('iconv') # this really needs to be replaced with a proper port
deps_inc += iconv_sp.get_variable('iconv_incs')
iconv_dep = iconv_sp.get_variable('libiconv_dep')
deps += iconv_sp.get_variable('libiconv_dep')
endif
deps += iconv_dep
deps += dependency('libass', version: '>=0.9.7',
fallback: ['libass', 'libass_dep'])