From 868aad0244ad6180009e3c3f4611cb6c3aea8630 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Tue, 30 May 2023 11:07:29 +0200 Subject: [PATCH] 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 --- lib/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/meson.build b/lib/meson.build index 6c0a2c5..4f9c1bf 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -126,6 +126,7 @@ libmks = shared_library('mks-' + api_version, include_directories: libmks_include_directories, dependencies: libmks_deps, install: true, + version: meson.project_version(), ) libmks_dep = declare_dependency(