-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
40 lines (36 loc) · 1.34 KB
/
meson.build
File metadata and controls
40 lines (36 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
project('libxkbfile', 'c',
version: '1.1.3',
meson_version: '>= 0.57.0',
license: 'MIT'
)
cc = meson.get_compiler('c')
cc_conf = configuration_data({
'HAVE_REALLOCF': cc.has_function('reallocf') ? '1' : false,
'HAVE_STRNDUP': cc.has_function('strndup') and
cc.has_header_symbol('string.h', 'strndup') ? '1' : false,
'HAVE_UNLOCKED_STDIO': cc.has_function('getc_unlocked') ? '1' : false
})
# strcasecmp is spelled '_stricmp' on Windows
if not cc.has_function('strcasecmp')
if cc.has_function('_stricmp')
cc_conf.set('strcasecmp', '_stricmp', description: 'Replacement for strcasecmp, if necessary')
else
error('strcasecmp (or _stricmp) is mandatory')
endif
endif
configure_file(output: 'config.h',
configuration: cc_conf)
add_project_arguments('-DHAVE_CONFIG_H', language : ['c'])
pc_conf = configuration_data({
'prefix': get_option('prefix'),
'exec_prefix': '${prefix}',
'libdir': '${exec_prefix}' / get_option('libdir'),
'includedir': '${prefix}' / get_option('includedir'),
'PACKAGE_VERSION': meson.project_version()
})
configure_file(output: 'xkbfile.pc',
input: 'xkbfile.pc.in',
install: true,
install_dir: get_option('libdir') / 'pkgconfig',
configuration: pc_conf)
subdir('src')