build: Set a SONAME version in the libmks library

The libmks library is currently unversioned, but donwstream users expect
this library to have a proper SONAME version in order to package them.

A stable release has not yet happened because the project is still under
development and the API/ABI might change. But having a versioned SONAME
would allow distributions to package libmks, without the need to add any
downstream patch to set the library version.

Since the "0.1.0" version is already set as the meson project, let's use
it to set the library version as well. The meson build system will use the
first part of the version (0) as the SONAME version, which is aligned with
the convention used by other projects:

  $ ls ./lib/libmks-1.so* -1
  ./lib/libmks-1.so
  ./lib/libmks-1.so.0
  ./lib/libmks-1.so.0.1.0

  $ objdump -p ./lib/libmks-1.so.0.1.0 | grep SONAME
  SONAME               libmks-1.so.0
This commit is contained in:
Javier Martinez Canillas 2023-05-30 11:07:29 +02:00
parent 543c0cbbda
commit 868aad0244
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69

View File

@ -126,6 +126,7 @@ libmks = shared_library('mks-' + api_version,
include_directories: libmks_include_directories, include_directories: libmks_include_directories,
dependencies: libmks_deps, dependencies: libmks_deps,
install: true, install: true,
version: meson.project_version(),
) )
libmks_dep = declare_dependency( libmks_dep = declare_dependency(