-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmeson.build
More file actions
58 lines (48 loc) · 2 KB
/
meson.build
File metadata and controls
58 lines (48 loc) · 2 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
# Build specification for the General Utilities Library
# Increase the major project version in project() on API breaking changes.
# Increase the minor project version in project() on API extensions
project('gul14', 'cpp',
default_options : [
'cpp_std=c++14',
'warning_level=3',
],
version : '2.13',
meson_version : '>=0.49')
# Enforce that the version number is according to specs
version_parts = meson.project_version().split('.')
libgul_api_version = '@0@.@1@'.format(version_parts[0], version_parts[1])
subdir('include')
subdir('src')
subdir('tools')
subdir('data')
subdir('tests')
message('Install prefix: ' + get_option('prefix'))
subdir('debian')
subdir('examples')
message('LIBGUL_API_VERSION @0@'.format(libgul_api_version))
message('GIT FULL API VERSION @0@'.format(git_full_api_version))
message('GIT VERSION TAG @0@'.format(git_version))
if deb_install
message('Debian package names ' + deb_name + ', ' + deb_dev_name)
message('Debian package version ' + debian_package_version)
endif
if git_version == 'unknown'
message('Shared library version patchlevel can\'t be determined from git')
endif
message('Shared library version ' + so_version)
# Check if the git version (git tag starting with 'v') interpreted as
# semantic version number matches the specified API version from above
if not (git_full_api_version == 'unknown')
git_vers_parts = git_full_api_version.split('.')
git_major_version_parts = git_vers_parts[0].split('v')
git_api_version = '@0@.@1@'.format(git_major_version_parts[1], git_vers_parts[1].split('-')[0])
if not (git_api_version == libgul_api_version)
message('API version parsed from GIT version: @0@'.format(git_api_version))
if deb_install
error('LIBGUL_API_VERSION and API version deduced from GIT VERSION do not match')
else
warning('LIBGUL_API_VERSION and API version deduced from GIT VERSION do not match')
endif
endif
endif
# vi:ts=4:sw=4:sts=4:et:syn=conf