Bläddra i källkod

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 år sedan
förälder
incheckning
ea3e135ae0
1 ändrade filer med 11 tillägg och 0 borttagningar
  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