This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
67 lines (57 loc) · 1.68 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
# SPDX-License-Identifer: LGPL-3.0-or-later
project(
'rbh-fsevents',
'c',
version: '0.0.0',
license: 'LGPL3.0-or-later',
default_options: [
'warning_level=2',
'werror=true',
],
)
# GNU extensions
add_project_arguments(['-D_DEFAULT_SOURCE', '-D_GNU_SOURCE',], language: 'c')
# Configuration checks
conf_data = configuration_data()
## Functions
cc = meson.get_compiler('c')
have_statx = cc.has_function('statx', args: '-D_GNU_SOURCE',
prefix: '#include <sys/stat.h>')
conf_data.set('HAVE_STATX', have_statx)
configure_file(input: 'config.h.in', output: 'config.h',
configuration: conf_data)
add_project_arguments(['-DHAVE_CONFIG_H',], language: 'c')
# Dependencies
extra_sources = []
extra_dependencies = []
librobinhood = dependency('robinhood', version: '>=0.0.0')
miniyaml = dependency('miniyaml', version: '>=0.0.0')
liblustre = dependency('lustre', required: false)
if not liblustre.found()
liblustre = cc.find_library('lustreapi', required: false)
endif
if liblustre.found()
extra_sources += [
'src/sources/lustre.c',
'src/enrichers/lustre.c',
]
add_project_arguments(['-DHAVE_LUSTRE',], language: 'c')
endif
includes = include_directories('.', 'include')
executable(
'rbh-fsevents',
sources: [
'rbh-fsevents.c',
'src/deduplicator.c',
'src/enricher.c',
'src/enrichers/posix.c',
'src/serialization.c',
'src/sources/file.c',
'src/sinks/backend.c',
'src/sinks/file.c',
] + extra_sources,
include_directories: includes,
dependencies: [librobinhood, miniyaml, liblustre],
install: true,
)
subdir('tests')