summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javierm@redhat.com>2021-09-28 08:15:18 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-28 11:08:29 +0300
commite00149fccb0a16b445359c8037a6f4cfd484a10f (patch)
treedb1b9b24eefe5d8bcda0da5b3192fad41266feda /src
parent7f035328fb8acd90f655a632c4e102294da3b39a (diff)
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 <javierm@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/base/meson.build1
-rw-r--r--src/libcamera/meson.build1
2 files changed, 2 insertions, 0 deletions
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,