-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
42 lines (34 loc) · 920 Bytes
/
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
project('picard', ['c'],
version: '0.0.1',
default_options: [ 'c_std=c11' ],
)
cc = meson.get_compiler('c')
add_project_arguments('-DPROJECT_VERSION="'+meson.project_version()+'"', language : ['c', 'cpp'])
add_project_arguments('-DPROJECT_NAME="'+meson.project_name()+'"', language : ['c', 'cpp'])
'''
foreach a: [ '-fanalyzer' ]
if cc.has_argument(a)
add_project_arguments(a, language : 'c')
endif
endforeach
'''
foreach a : [ '-ffunction-sections', '-Wshadow', '-Wsign-compare' ]
if cc.has_argument(a)
add_project_arguments(a, language : 'c')
endif
endforeach
foreach a : [ '-Wl,--gc-sections' ]
if cc.has_link_argument(a)
add_project_link_arguments(a, language : 'c')
endif
endforeach
lm = cc.find_library('m', required: false)
subdir('src')
includes = include_directories('src')
picard = executable(
'picard',
pid_sources,
include_directories: includes,
dependencies: lm,
install: true,
)