meson: improve iconv detection
This commit is contained in:
parent
c6f4ea45aa
commit
2abb098bd1
2 changed files with 10 additions and 4 deletions
|
@ -77,10 +77,13 @@ cxx = meson.get_compiler('cpp')
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
deps += cc.find_library('m', required: false)
|
deps += cc.find_library('m', required: false)
|
||||||
deps += cc.find_library('dl', required: false)
|
deps += cc.find_library('dl', required: false)
|
||||||
if not cxx.check_header('iconv.h')
|
|
||||||
|
iconv_dep = cc.find_library('iconv', required: false)
|
||||||
|
if not (iconv_dep.found() or cc.has_function('iconv_open'))
|
||||||
iconv_sp = subproject('iconv') # this really needs to be replaced with a proper port
|
iconv_sp = subproject('iconv') # this really needs to be replaced with a proper port
|
||||||
deps += iconv_sp.get_variable('libiconv_dep')
|
iconv_dep = iconv_sp.get_variable('libiconv_dep')
|
||||||
endif
|
endif
|
||||||
|
deps += iconv_dep
|
||||||
|
|
||||||
deps += dependency('libass', version: '>=0.9.7',
|
deps += dependency('libass', version: '>=0.9.7',
|
||||||
fallback: ['libass', 'libass_dep'])
|
fallback: ['libass', 'libass_dep'])
|
||||||
|
|
|
@ -61,9 +61,12 @@ else
|
||||||
locale_args += '-DBOOST_LOCALE_NO_WINAPI_BACKEND=1'
|
locale_args += '-DBOOST_LOCALE_NO_WINAPI_BACKEND=1'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if not cpp.check_header('iconv.h')
|
cxx = meson.get_compiler('cpp')
|
||||||
locale_deps += dependency('iconv')
|
iconv_dep = cxx.find_library('iconv', required: false)
|
||||||
|
if not (iconv_dep.found() or cxx.has_function('iconv_open'))
|
||||||
|
iconv_dep = dependency('iconv')
|
||||||
endif
|
endif
|
||||||
|
locale_deps += iconv_dep
|
||||||
locale_args += '-DBOOST_LOCALE_WITH_ICONV=1'
|
locale_args += '-DBOOST_LOCALE_WITH_ICONV=1'
|
||||||
|
|
||||||
locale_deps += icu_deps
|
locale_deps += icu_deps
|
||||||
|
|
Loading…
Reference in a new issue