Skip to content

Commit

Permalink
meson: Add macOS libtool versioning for ABI compatibility
Browse files Browse the repository at this point in the history
With this, the compatibility version and current version values in macOS
and iOS dylibs will match the values set by Autotools.

See: mesonbuild/meson#1451
  • Loading branch information
nirbheek authored and TingPing committed Oct 25, 2018
1 parent 228a1d6 commit a5c78a5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions gio/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down
1 change: 1 addition & 0 deletions glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
1 change: 1 addition & 0 deletions gmodule/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
1 change: 1 addition & 0 deletions gobject/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
1 change: 1 addition & 0 deletions gthread/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit a5c78a5

Please sign in to comment.