This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
meson.build
43 lines (33 loc) · 1.6 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
project('compfy', 'c', version: '1.7.2',
default_options: ['c_std=c11', 'warning_level=1', 'buildtype=release'])
cc = meson.get_compiler('c')
# use project version by default
version = 'v'+meson.project_version()
add_global_arguments('-DCOMPFY_VERSION="'+version+'"', language: 'c')
if get_option('buildtype') == 'release'
add_global_arguments('-DNDEBUG', language: 'c')
endif
add_global_arguments('-D_GNU_SOURCE', language: 'c')
if cc.has_header('stdc-predef.h')
add_global_arguments('-DHAS_STDC_PREDEF_H', language: 'c')
endif
if get_option('warning_level') != '0'
warns = [ 'cast-function-type', 'ignored-qualifiers', 'missing-parameter-type',
'nonnull', 'shadow', 'no-type-limits', 'old-style-declaration', 'override-init',
'sign-compare', 'type-limits', 'uninitialized', 'shift-negative-value',
'unused-but-set-parameter', 'unused-parameter', 'implicit-fallthrough=2',
'no-unknown-warning-option', 'no-missing-braces', 'conversion', 'empty-body' ]
foreach w : warns
if cc.has_argument('-W'+w)
add_global_arguments('-W'+w, language: 'c')
endif
endforeach
endif
if get_option('with_docs')
install_data('./man/compfy.1', install_dir: join_paths(get_option('mandir'), 'man1'))
endif
subdir('src')
install_data('compfy.desktop', install_dir: 'share/applications')
install_data('compfy.desktop', install_dir: get_option('sysconfdir') / 'xdg' / 'autostart')
install_data('media/compfy.svg', install_dir: 'share/icons/hicolor/scalable/apps')
install_data('media/icons/compfy.png', install_dir: 'share/icons/hicolor/48x48/apps')