From e00149fccb0a16b445359c8037a6f4cfd484a10f Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Tue, 28 Sep 2021 08:15:18 +0200 Subject: meson: Set a SONAME version in the libcamera libraries The libcamera and libcamera-base libraries are currently unversioned, but donwstream users expect these 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 libcamera, without the need to add any downstream patch to set the version. Since the "0.0.0" version is already used in different places, let's also use that as the library version. 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 /lib64/libcamera*so* -1 /lib64/libcamera-base.so /lib64/libcamera-base.so.0 /lib64/libcamera-base.so.0.0.0 /lib64/libcamera.so /lib64/libcamera.so.0 /lib64/libcamera.so.0.0.0 $ objdump -p /lib64/libcamera.so.0.0.0 | grep SONAME SONAME libcamera.so.0 Signed-off-by: Javier Martinez Canillas Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/libcamera/base/meson.build | 1 + src/libcamera/meson.build | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build index 8e125744..d17249a0 100644 --- a/src/libcamera/base/meson.build +++ b/src/libcamera/base/meson.build @@ -29,6 +29,7 @@ libcamera_base_args = [ '-DLIBCAMERA_BASE_PRIVATE' ] libcamera_base_lib = shared_library('libcamera-base', [libcamera_base_sources, libcamera_base_headers], + version : libcamera_version, name_prefix : '', install : true, cpp_args : libcamera_base_args, diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index bf82d38b..243dd3c1 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -128,6 +128,7 @@ libcamera_deps = [ libcamera = shared_library('libcamera', libcamera_sources, + version : libcamera_version, name_prefix : '', install : true, include_directories : includes, -- cgit v1.2.1