summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-11-16 15:14:26 +0100
committerAlejandro PiƱeiro <apinheiro@igalia.com>2019-03-09 11:58:15 +0100
commitaefba0b65da5ba96e0a0b4207416997ea73ffc42 (patch)
tree6fe8476cf7b3deaeaec6696d13d9e43161a81c07
parent5e451251e58b0dd6ad646087ee66b0f17cbf29e8 (diff)
downloadatk-aefba0b65da5ba96e0a0b4207416997ea73ffc42.tar.gz
meson: use an autotools compatible compatibility_version/current_version on macOS. Fixes #6
Use the same versioning scheme as libtool did with the autotools build. Otherwise switching atk from meson to autotools makes all library linking to it fail since the version is too low.
-rw-r--r--meson.build6
1 files changed, 4 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 0323896..7c66a8c 100644
--- a/meson.build
+++ b/meson.build
@@ -36,7 +36,9 @@ atk_conf.set_quoted('GETTEXT_PACKAGE', 'atk10')
# Maintain version scheme with libtool
atk_soversion = 0
-atk_libversion = '@0@.@1@.@2@'.format(atk_soversion, (atk_binary_age - atk_interface_age), atk_interface_age)
+current = atk_binary_age - atk_interface_age
+atk_libversion = '@0@.@1@.@2@'.format(atk_soversion, current, atk_interface_age)
+darwin_versions = ['@0@'.format(current + 1), '@0@.@1@'.format(current + 1, atk_interface_age)]
add_project_arguments([ '-DG_DISABLE_SINGLE_INCLUDES', '-DATK_DISABLE_SINGLE_INCLUDES' ], language: 'c')
@@ -75,7 +77,7 @@ endif
# Maintain compatibility with autotools on macOS
if host_machine.system() == 'darwin'
- common_ldflags += [ '-compatibility_version', '1', '-current_version', '1.0', ]
+ common_ldflags += [ '-compatibility_version', darwin_versions[0], '-current_version', darwin_versions[1]]
endif
# Functions