-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmeson.build
58 lines (49 loc) · 1.09 KB
/
meson.build
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
project(
'plot',
'c',
version: '0.5.1',
license: 'MIT',
meson_version: '>=0.44.1',
default_options: [
'c_std=c99',
'warning_level=3',
],
)
cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments([
'-Wundef',
'-Wlogical-op',
'-Wmissing-include-dirs',
'-Wold-style-definition',
'-Wpointer-arith',
'-Winit-self',
'-Wstrict-prototypes',
'-Wimplicit-fallthrough=2',
'-Wendif-labels',
'-Wstrict-aliasing=2',
'-Woverflow',
'-Wno-missing-braces',
'-Wno-missing-field-initializers',
'-Wno-unused-parameter',
]), language: 'c')
git = find_program('git', required: false)
if git.found()
git_rev_parse = run_command(git, 'rev-parse', '--short', '@')
git_sha = git_rev_parse.stdout().strip()
else
git_sha = 'unknown'
endif
version_info = configuration_data()
version_info.set('version', meson.project_version())
version_info.set('vcs_tag', git_sha)
libm = cc.find_library('m', required: true)
subdir('include')
subdir('lib')
subdir('cli')
subdir('examples')
if get_option('test')
subdir('tests')
endif
if get_option('build_docs') != 'disabled'
subdir('docs')
endif