-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmeson.build
More file actions
70 lines (58 loc) · 2.34 KB
/
meson.build
File metadata and controls
70 lines (58 loc) · 2.34 KB
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
project('dtp', 'c', subproject_dir: 'extern', version: '0.1.0')
add_project_arguments(['-Wall', '-Wextra', '-Wstrict-prototypes', '-Wmissing-prototypes', '-Wno-unused-parameter'], language: 'c')
include = include_directories('include')
install_subdir('include', install_dir : '.')
subdir('src')
gen_doc = find_program('gen-sidoc', required: false)
if gen_doc.found()
doc_out = meson.current_build_dir() / '@OUTPUT@'
doc = custom_target('doc',
output : 'DTP.pdf',
input : ['doc/dtp.rst', 'README.rst'],
command : ['gen-sidoc', '-t', 'MAN', 'DTP', '@INPUT0@', '-o', doc_out],
build_by_default: false
)
endif
doxygen = find_program('doxygen', required : false)
if doxygen.found()
cdata = configuration_data()
cdata.set('VERSION', meson.project_version())
if find_program('dot', required : false).found()
cdata.set('HAVE_DOT', 'YES')
else
cdata.set('HAVE_DOT', 'NO')
endif
cdata.set('TOP_SRCDIR', meson.project_source_root())
cdata.set('TOP_BLDDIR', meson.project_build_root())
doxyfile = configure_file(input: 'Doxyfile.in',
output: 'Doxyfile',
configuration: cdata,
install: false)
html_target = custom_target('api-docs',
input: doxyfile,
output: 'html',
command: [doxygen, doxyfile],
build_by_default: false)
endif
dtp_client_dep = declare_dependency(include_directories : include, link_with : dtp_client_lib, dependencies: dtp_lib_dep)
dtp_server_dep = declare_dependency(include_directories : include, link_with : dtp_server_lib, dependencies: dtp_lib_dep)
dtp_dep = declare_dependency(include_directories : include, link_with : [dtp_lib, dtp_server_lib, dtp_client_lib], dependencies: [dtp_client_dep, dtp_server_dep])
if not meson.is_subproject()
subdir('tests')
pkg = import('pkgconfig')
pkg.generate(
dtp_lib,
version: meson.project_version(),
description: 'Data Transfer Protocol over CSP, all libraries'
)
pkg.generate(
dtp_client_lib,
version: meson.project_version(),
description: 'Data Transfer Protocol over CSP, client libraries'
)
pkg.generate(
dtp_server_lib,
version: meson.project_version(),
description: 'Data Transfer Protocol over CSP, server libraries'
)
endif