mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-24 07:43:44 +02:00
49 lines
1.7 KiB
Meson
49 lines
1.7 KiB
Meson
project('libiconv', 'c', meson_version: '>=1.3.0')
|
|
|
|
configuration = {
|
|
'BROKEN_WCHAR_H': 0,
|
|
'DLL_VARIABLE': '',
|
|
'EILSEQ': '',
|
|
'HAVE_VISIBILITY': meson.get_compiler('c').compiles('__attribute__((__visibility__("default"))) void f(void) {}', name: 'GNU visibility attribute support check') ? 1 : 0,
|
|
'ICONV_CONST': '',
|
|
'USE_MBSTATE_T': 0,
|
|
}
|
|
|
|
libiconv = declare_dependency(
|
|
include_directories: '.',
|
|
link_with: library(
|
|
'iconv',
|
|
link_with: static_library(
|
|
'localcharset',
|
|
c_args: get_option('cflags') + ['-DBUILDING_LIBCHARSET'],
|
|
include_directories: 'libcharset/include',
|
|
sources: [
|
|
import('fs').copyfile(
|
|
'libcharset/config.h.in',
|
|
'config.h',
|
|
),
|
|
'libcharset/lib/localcharset.c',
|
|
],
|
|
pic: get_option('b_staticpic'),
|
|
gnu_symbol_visibility: 'hidden',
|
|
install: false,
|
|
),
|
|
c_args: get_option('cflags') + ['-DBUILDING_LIBICONV', '-DBUILDING_LIBCHARSET', '-DICONV_CONST=' + configuration['ICONV_CONST'], '-DENABLE_EXTRA'],
|
|
include_directories: 'include',
|
|
sources: [
|
|
configure_file(
|
|
input: 'libcharset/include/localcharset.h.build.in',
|
|
output: 'localcharset.h',
|
|
configuration: configuration,
|
|
),
|
|
configure_file(
|
|
input: 'include/iconv.h.build.in',
|
|
output: 'iconv.h',
|
|
configuration: configuration,
|
|
),
|
|
'lib/iconv.c',
|
|
],
|
|
pic: get_option('b_staticpic'),
|
|
gnu_symbol_visibility: 'hidden',
|
|
),
|
|
)
|