[gupnp] build: fix macOS dylib versioning



commit 5269c10d22cf7e991da64317ff6759ba0cab8d4b
Author: Tom Schoonjans <Tom Schoonjans diamond ac uk>
Date:   Thu Mar 14 12:41:04 2019 +0000

    build: fix macOS dylib versioning

 libgupnp/meson.build | 12 +++++++++++-
 meson.build          |  2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/libgupnp/meson.build b/libgupnp/meson.build
index 02350f4..816cd41 100644
--- a/libgupnp/meson.build
+++ b/libgupnp/meson.build
@@ -90,10 +90,20 @@ sources = files(
     'xml-util.c'
 )
 
+version = '0.0.0'
+version_arr = version.split('.')
+major_version = version_arr[0].to_int()
+minor_version = version_arr[1].to_int()
+micro_version = version_arr[2].to_int()
+current = major_version + minor_version + 1
+interface_age = micro_version
+darwin_versions = [current, '@0@.@1@'.format(current, interface_age)]
+
 libgupnp = library(
     'gupnp-1.2',
     sources + context_manager_impl + enums,
-    version : '0.0.0',
+    version : version,
+    darwin_versions : darwin_versions,
     dependencies : dependencies + system_deps,
     c_args : context_manager_args,
     include_directories: include_directories('..'),
diff --git a/meson.build b/meson.build
index b76d713..035d617 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('gupnp', 'c', version : '1.2.1')
+project('gupnp', 'c', version : '1.2.1', meson_version : '>= 0.48.0')
 gnome = import('gnome')
 pkg = import('pkgconfig')
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]