-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
64 lines (49 loc) · 1.45 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
#---------------------------------------------------------------------
# vim:set noexpandtab:
#---------------------------------------------------------------------
# Copyright (c) 2023 James O. D. Hunt <jamesodhunt@gmail.com>
#
# SPDX-License-Identifier: Apache-2.0
#---------------------------------------------------------------------
# Summary
project('abox',
'c',
version: '0.0.1',
license: 'Apache-2.0',
default_options: [
'c_std=gnu99',
'prefix=/usr',
],
meson_version : '>= 0.62.0',
)
name = meson.project_name()
#---------------------------------------------------------------------
# Setup
root_dir = meson.current_source_dir()
scripts_dir = join_paths('.', 'scripts')
util_script = files(join_paths(scripts_dir, '@0@-util.sh'.format(name)))
#---------------------------------------------------------------------
subdir('meson')
if git.found()
# Don't fail in case we're built from outside a git repo.
git_version = run_command(git,
'rev-parse',
'HEAD',
check: false).stdout().strip()
endif
if git_version == ''
git_version = 'unknown-version'
endif
# Load source
subdir('arch/@0@'.format(required_arch))
objects = [asm_objects, extra_c_sources]
binary = executable(
name,
objects,
install: true,
)
# Load tests
subdir('bats')
summary('BATS tests', enable_tests, section: 'tests')
summary('unit tests', enable_tests, section: 'tests')
summary(check_dep.name(), check_dep.version(), section: 'tests')