summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-11-16 15:14:26 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-11-16 15:14:26 +0100
commit08d8063b972e5a9542b0d0e9b9f5ef587b74c73f (patch)
tree6fe8476cf7b3deaeaec6696d13d9e43161a81c07
parent0cb3e626cc4a0897d9ff63ab9b76fa2e98430ad2 (diff)
downloadatk-08d8063b972e5a9542b0d0e9b9f5ef587b74c73f.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