-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
51 lines (43 loc) · 1.2 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
project(
'cando',
'c',
version: '0.1.0',
license: 'MIT',
meson_version: '>=1.3.1',
default_options: [
'warning_level=2',
'werror=true',
'prefix=/usr/'
],
)
pargs = []
cc = meson.get_compiler('c')
so_version = '.'.join(meson.project_version())
project_name = meson.project_name()
src_root_dir = meson.current_source_dir()
build_root_dir = meson.current_build_dir()
inc = include_directories('include')
subdir('include')
pkg = import('pkgconfig')
pkglibs = []
pkgsubdirs = []
pkg.generate(libraries: pkglibs,
subdirs : pkgsubdirs,
version : so_version,
name : project_name,
filebase : 'cando',
description : 'A common utility library for C programs/libraries.')
if get_option('tests')
subdir('tests')
endif
if get_option('docs')
docs_dir = src_root_dir + '/docs'
docs_build_dir = build_root_dir + '/docs'
sphinx = find_program('sphinx-build-5', 'sphinx-build', required: true)
if sphinx.found()
subdir('docs')
custom_target('docs',
command: [sphinx, '-W', '-b', 'html', docs_dir, '@OUTPUT@'],
input: docs_src, output: 'docs', install: false, install_dir: '')
endif
endif