forked from latchset/jose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
76 lines (66 loc) · 1.79 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
project('jose', 'c', license: 'APL2',
version: '11',
default_options: [
'c_std=gnu99',
'prefix=/usr',
'warning_level=2',
'werror=true'
]
)
licensedir = join_paths(get_option('prefix'), 'share', 'licenses', meson.project_name())
if build_machine.system() == 'freebsd'
licensedir += '-'+meson.project_version()
endif
add_project_arguments(
'-Wstrict-aliasing',
'-Wchar-subscripts',
'-Wformat-security',
'-Wmissing-declarations',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wpointer-arith',
'-Wshadow',
'-Wsign-compare',
'-Wstrict-prototypes',
'-Wtype-limits',
'-Wunused-function',
'-Wno-missing-field-initializers',
'-Wno-unused-command-line-argument',
'-Wno-unused-parameter',
'-Wno-unknown-pragmas',
language: 'c'
)
zlib = dependency('zlib')
threads = dependency('threads')
jansson = dependency('jansson', version: '>=2.10')
libcrypto = dependency('libcrypto', version: '>=1.0.2')
a2x = find_program('a2x', required: false)
mans = []
licenses = ['COPYING']
subdir('include')
subdir('doc')
subdir('lib')
subdir('cmd')
subdir('tests')
install_data(licenses, install_dir: licensedir)
pkg = import('pkgconfig')
pkg.generate(
description: 'Library for managing JOSE objects',
version: meson.project_version(),
filebase: meson.project_name(),
name: 'José Library',
requires_private: [ 'zlib', 'libcrypto' ],
libraries: libjose_lib,
requires: 'jansson',
)
if a2x.found()
foreach m : mans
custom_target(m.split('/')[-1], input: m + '.adoc', output: m.split('/')[-1],
command: [a2x, '-f', 'manpage', '-D', meson.current_build_dir(), '@INPUT@'],
install_dir: join_paths(get_option('mandir'), 'man' + m.split('.')[-1]),
install: true
)
endforeach
else
warning('Will not build man pages due to missing dependencies!')
endif