meson: Maintain macOS ABI through dylib versioning
authorNirbheek Chauhan <nirbheek@centricular.com>
Fri, 31 Aug 2018 09:12:15 +0000 (14:42 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 31 Aug 2018 09:12:48 +0000 (14:42 +0530)
Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library

gst/rtsp-server/meson.build
meson.build

index c2d7b37..d0fbde1 100644 (file)
@@ -51,6 +51,7 @@ gst_rtsp_server = library('gstrtspserver-@0@'.format(api_version),
   c_args: rtspserver_args,
   version : libversion,
   soversion : soversion,
+  darwin_versions : osxversion,
   install : true,
   dependencies : gst_rtsp_server_deps)
 
index be0674c..2d79283 100644 (file)
@@ -21,7 +21,9 @@ api_version = '1.0'
 soversion = 0
 # maintaining compatibility with the previous libtool versioning
 # current = minor * 100 + micro
-libversion = '@0@.@1@.0'.format(soversion, gst_version_minor * 100 + gst_version_micro)
+curversion = gst_version_minor * 100 + gst_version_micro
+libversion = '@0@.@1@.0'.format(soversion, curversion)
+osxversion = curversion + 1
 
 plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))