meson: Maintain macOS ABI through dylib versioning

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
This commit is contained in:
Nirbheek Chauhan 2018-08-31 14:36:30 +05:30
parent 0c85af51d8
commit a9cab426d0
13 changed files with 15 additions and 2 deletions

View file

@ -14,6 +14,7 @@ gstallocators = library('gstallocators-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : [gst_dep], dependencies : [gst_dep],
) )

View file

@ -24,6 +24,7 @@ gstapp = library('gstapp-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : [gst_base_dep], dependencies : [gst_base_dep],
) )

View file

@ -145,6 +145,7 @@ gstaudio = library('gstaudio-@0@'.format(api_version),
link_with : simd_dependencies, link_with : simd_dependencies,
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : gstaudio_deps, dependencies : gstaudio_deps,
) )

View file

@ -31,6 +31,7 @@ gstfft = library('gstfft-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : [gst_dep, libm], dependencies : [gst_dep, libm],
) )

View file

@ -872,6 +872,7 @@ if build_gstgl
include_directories : [configinc, libsinc, gl_includes], include_directories : [configinc, libsinc, gl_includes],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : [gst_base_dep, video_dep, allocators_dep, gmodule_dep, dependencies : [gst_base_dep, video_dep, allocators_dep, gmodule_dep,
gl_lib_deps, gl_platform_deps, gl_winsys_deps, gl_misc_deps]) gl_lib_deps, gl_platform_deps, gl_winsys_deps, gl_misc_deps])

View file

@ -54,6 +54,7 @@ pbutils = library('gstpbutils-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : gstpbutils_deps, dependencies : gstpbutils_deps,
) )

View file

@ -20,6 +20,7 @@ gstriff = library('gstriff-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : riff_deps, dependencies : riff_deps,
) )

View file

@ -38,6 +38,7 @@ gst_rtp = library('gstrtp-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : gstrtp_deps, dependencies : gstrtp_deps,
) )

View file

@ -45,6 +45,7 @@ gst_rtsp = library('gstrtsp-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : gstrtsp_deps, dependencies : gstrtsp_deps,
) )

View file

@ -15,6 +15,7 @@ gstsdp = library('gstsdp-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : rtsp_deps, dependencies : rtsp_deps,
) )

View file

@ -79,6 +79,7 @@ gsttag = library('gsttag-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : tag_deps, dependencies : tag_deps,
) )

View file

@ -124,6 +124,7 @@ gstvideo = library('gstvideo-@0@'.format(api_version),
include_directories: [configinc, libsinc], include_directories: [configinc, libsinc],
version : libversion, version : libversion,
soversion : soversion, soversion : soversion,
darwin_versions : osxversion,
install : true, install : true,
dependencies : gstvideo_deps, dependencies : gstvideo_deps,
) )

View file

@ -27,8 +27,9 @@ api_version = '1.0'
soversion = 0 soversion = 0
# maintaining compatibility with the previous libtool versioning # maintaining compatibility with the previous libtool versioning
# current = minor * 100 + micro # current = minor * 100 + micro
# FIXME: should be able to convert string to int somehow so we can just do maths curversion = gst_version_minor * 100 + gst_version_micro
libversion = '@0@.@1@.0'.format(soversion, 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')) plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))