meson: add basic libiconv subproject functionality
This commit is contained in:
parent
631dad170f
commit
9aeaceb6e7
2 changed files with 26 additions and 1 deletions
|
@ -36,7 +36,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)
|
||||||
deps += cc.find_library('iconv', required: false)
|
iconv_dep = cc.find_library('iconv', required: false)
|
||||||
|
if not iconv_dep.found() and host_machine.system() == 'windows'
|
||||||
|
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')
|
||||||
|
endif
|
||||||
|
deps += iconv_dep
|
||||||
|
|
||||||
deps += dependency('libass', version: '>=0.9.7')
|
deps += dependency('libass', version: '>=0.9.7')
|
||||||
deps += dependency('boost', version: '>=1.50.0',
|
deps += dependency('boost', version: '>=1.50.0',
|
||||||
|
|
19
subprojects/iconv/meson.build
Normal file
19
subprojects/iconv/meson.build
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
project('iconv', 'c', license: 'LGPL',
|
||||||
|
meson_version: '>=0.49.0')
|
||||||
|
|
||||||
|
iconv_src = [
|
||||||
|
'libcharset/localcharset.c',
|
||||||
|
'libiconv/iconv.c'
|
||||||
|
]
|
||||||
|
|
||||||
|
iconv_headers = ['include/iconv.h']
|
||||||
|
|
||||||
|
iconv_incs = include_directories(
|
||||||
|
'include',
|
||||||
|
'libcharset',
|
||||||
|
'libiconv'
|
||||||
|
)
|
||||||
|
|
||||||
|
libiconv = library('iconv', iconv_src, include_directories: iconv_incs)
|
||||||
|
libiconv_dep = declare_dependency(link_with: libiconv,
|
||||||
|
include_directories: iconv_incs)
|
Loading…
Reference in a new issue