浏览代码

lib: use libtool like versioning

In order to be safe for future ABI changes and to fulfill packaging
requirements for e.g. Fedora, provide libtool like versioning for
both libraries, i.e. libgamemode and libgamemodeauto.
Christian Kellner 6 年之前
父节点
当前提交
ea3e135ae0
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      lib/meson.build

+ 11 - 0
lib/meson.build

@@ -1,3 +1,10 @@
+# Libtool like versioning (current.revision.age) for the libraries
+# See https://www.sourceware.org/autobook/autobook/autobook_61.html#Library-Versioning
+lt_current = '0'
+lt_revision = '0'
+lt_age = '0'
+lt_version = '@0@.@1@.@2@'.format(lt_current, lt_age, lt_revision)
+
 # Main client library to message the daemon
 gamemode = shared_library(
     'gamemode',
@@ -8,6 +15,8 @@ gamemode = shared_library(
         dep_systemd,
     ],
     install: true,
+    soversion: lt_current,
+    version: lt_version,
 )
 
 libgamemode_includes = [
@@ -24,6 +33,8 @@ gamemodeauto = shared_library(
         libdl,
     ],
     install: true,
+    soversion: lt_current,
+    version: lt_version,
 )
 
 # Install the gamemode_client header