Debian Codegraph @

include/meson.build

raw
1 version = meson.project_version()
2 version_arr = version.split('.')
3 major = version_arr[0].to_int()
4 minor = version_arr[1].to_int()
5 patch = version_arr[2].to_int()
6
7 cdata = configuration_data()
8 cdata.set('LIBPSL_VERSION', version)
9 cdata.set('LIBPSL_VERSION_MAJOR', major)
10 cdata.set('LIBPSL_VERSION_MINOR', minor)
11 cdata.set('LIBPSL_VERSION_PATCH', patch)
12
13 hex = '0123456789abcdef'
14 ver = '0x@0@@1@@2@@3@@4@@5@'
15 cdata.set('LIBPSL_VERSION_NUMBER',
16 ver.format(
17 hex[major / 16], hex[major % 16],
18 hex[minor / 16], hex[minor % 16],
19 hex[patch / 16], hex[patch % 16]))
20
21 libpsl_h = configure_file(
22 input : 'libpsl.h.in',
23 output : 'libpsl.h',
24 configuration : cdata)
25
26 install_headers(libpsl_h)