forked from spaceinventor/slash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
40 lines (30 loc) · 984 Bytes
/
meson.build
File metadata and controls
40 lines (30 loc) · 984 Bytes
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
project('slash', 'c')
slash_sources = files([
'src/slash.c',
'src/optparse.c',
'src/dflopt.c',
'src/run.c',
])
conf = configuration_data()
if meson.get_compiler('c').has_header('sys/termios.h')
conf.set('SLASH_HAVE_TERMIOS_H', true)
endif
if meson.get_compiler('c').has_header('sys/select.h') and host_machine.system() == 'linux'
conf.set('SLASH_HAVE_SELECT', true)
endif
if get_option('timestamp') == true
conf.set('SLASH_TIMESTAMP', true)
endif
slash_config_h = configure_file(output: 'slash_config.h', configuration: conf)
slash_inc = include_directories('.', 'include')
dependencies = dependency('libc', fallback: ['picolibc', 'picolibc_dep'], default_options: ['default_library=static'], required: false)
slash_lib = static_library('slash',
sources: [slash_sources, slash_config_h],
include_directories : slash_inc,
dependencies : dependencies,
install : false
)
slash_dep = declare_dependency(
include_directories : slash_inc,
link_with : slash_lib,
)