Merge branch 'nirbheek/macos-library-versions' into 'master'

meson: Add macOS libtool versioning for ABI compatibility

See merge request GNOME/glib!282
This commit is contained in:
Philip Withnall 2018-10-24 00:00:35 +00:00
commit 25b7716e0d
6 changed files with 8 additions and 1 deletions

View File

@ -797,6 +797,7 @@ libgio = library('gio-2.0',
objects : internal_objects,
version : library_version,
soversion : soversion,
darwin_versions : darwin_versions,
install : true,
include_directories : [configinc, gioinc],
# '$(gio_win32_res_ldflag)',

View File

@ -256,6 +256,7 @@ libglib = library('glib-2.0',
objects : [charset_lib.extract_all_objects()] + gnulib_objects + pcre_objects,
version : library_version,
soversion : soversion,
darwin_versions : darwin_versions,
install : true,
# intl.lib is not compatible with SAFESEH
link_args : [noseh_link_args, glib_link_flags, win32_ldflags],

View File

@ -99,6 +99,7 @@ libgmodule = library('gmodule-2.0',
sources : gmodule_sources,
version : library_version,
soversion : soversion,
darwin_versions : darwin_versions,
install : true,
include_directories : [configinc, gmoduleinc],
dependencies : [libdl_dep, libglib_dep],

View File

@ -66,6 +66,7 @@ libgobject = library('gobject-2.0',
sources : gobject_sources,
version : library_version,
soversion : soversion,
darwin_versions : darwin_versions,
install : true,
include_directories : [configinc],
dependencies : [libffi_dep, libglib_dep],

View File

@ -16,6 +16,7 @@ libgthread = library('gthread-2.0',
sources : gthread_sources,
version : library_version,
soversion : soversion,
darwin_versions : darwin_versions,
install : true,
dependencies : [libglib_dep],
c_args : ['-DG_LOG_DOMAIN="GThread"' ] + glib_hidden_visibility_args,

View File

@ -45,7 +45,9 @@ binary_age = 100 * minor_version + micro_version
soversion = 0
# Maintain compatibility with previous libtool versioning
# current = minor * 100 + micro
library_version = '@0@.@1@.@2@'.format(soversion, binary_age - interface_age, interface_age)
current = binary_age - interface_age
library_version = '@0@.@1@.@2@'.format(soversion, current, interface_age)
darwin_versions = [current + 1, '@0@.@1@'.format(current + 1, interface_age)]
configinc = include_directories('.')
glibinc = include_directories('glib')