2018-12-10 21:02:33 +01:00
|
|
|
version = meson.project_version()
|
|
|
|
version_arr = version.split('.')
|
|
|
|
major = version_arr[0].to_int()
|
|
|
|
minor = version_arr[1].to_int()
|
|
|
|
patch = version_arr[2].to_int()
|
|
|
|
|
2018-12-06 15:16:13 +01:00
|
|
|
cdata = configuration_data()
|
2018-12-10 21:02:33 +01:00
|
|
|
cdata.set('LIBPSL_VERSION', version)
|
|
|
|
cdata.set('LIBPSL_VERSION_MAJOR', major)
|
|
|
|
cdata.set('LIBPSL_VERSION_MINOR', minor)
|
|
|
|
cdata.set('LIBPSL_VERSION_PATCH', patch)
|
2018-12-06 15:16:13 +01:00
|
|
|
|
2018-12-10 21:02:33 +01:00
|
|
|
hex = '0123456789abcdef'
|
|
|
|
ver = '0x@0@@1@@2@@3@@4@@5@'
|
|
|
|
cdata.set('LIBPSL_VERSION_NUMBER',
|
|
|
|
ver.format(
|
|
|
|
hex[major / 16], hex[major % 16],
|
|
|
|
hex[minor / 16], hex[minor % 16],
|
|
|
|
hex[patch / 16], hex[minor % 16]))
|
2018-12-06 15:16:13 +01:00
|
|
|
|
2018-12-31 14:53:32 +01:00
|
|
|
libpsl_h = configure_file(
|
2018-12-06 15:16:13 +01:00
|
|
|
input : 'libpsl.h.in',
|
|
|
|
output : 'libpsl.h',
|
|
|
|
configuration : cdata)
|
2018-12-31 14:53:32 +01:00
|
|
|
|
|
|
|
install_headers(libpsl_h)
|