build: Set the library version and SOVERSION

We use semantic versioning but will still have ABI breaks in the 0.x.x
series so we will just bump the SONAME every new minor release.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
This commit is contained in:
Sebastian Wick 2023-02-09 14:42:53 +01:00 committed by Sebastian Wick
parent 506925a66b
commit c88cd24e97

View file

@ -10,6 +10,8 @@ project(
],
)
assert(meson.project_version().split('.')[0] == '0')
dep_hwdata = dependency('hwdata', required: false, native: true)
if dep_hwdata.found()
hwdata_dir = dep_hwdata.get_variable(pkgconfig: 'pkgdatadir')
@ -67,6 +69,8 @@ di_lib = library(
link_args: symbols_flag,
link_depends: symbols_file,
install: true,
version: meson.project_version(),
soversion: meson.project_version().split('.')[1],
)
install_subdir(