build: fix invalid library version

Fixes the following error:

    meson.build:52:0: ERROR: Invalid Shared library version "0.2.0-dev". Must be of the form X.Y.Z where all three are numbers. Y and Z are optional.

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2023-02-15 10:33:08 +01:00
parent a9528b0c26
commit 29271352cf

View file

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