From d0f0405b133fad5b1f08bfd4e7367f1dbb97bc4e Mon Sep 17 00:00:00 2001 From: Christopher Nielsen Date: Sun, 3 Mar 2024 16:20:32 -0500 Subject: [PATCH] meson.build: add darwin dylib versioning --- src/meson.build | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/meson.build b/src/meson.build index ca7c13d..5d111f2 100644 --- a/src/meson.build +++ b/src/meson.build @@ -15,10 +15,14 @@ endif configure_file(output: 'config.h', configuration: config_h) +raqm_ver_major = raqm_version[0].to_int() +raqm_ver_minor = raqm_version[1].to_int() +raqm_ver_micro = raqm_version[2].to_int() + version_h = configuration_data() -version_h.set('RAQM_VERSION_MAJOR', raqm_version[0].to_int()) -version_h.set('RAQM_VERSION_MINOR', raqm_version[1].to_int()) -version_h.set('RAQM_VERSION_MICRO', raqm_version[2].to_int()) +version_h.set('RAQM_VERSION_MAJOR', raqm_ver_major) +version_h.set('RAQM_VERSION_MINOR', raqm_ver_minor) +version_h.set('RAQM_VERSION_MICRO', raqm_ver_micro) version_h.set('RAQM_VERSION', meson.project_version()) configure_file( @@ -32,11 +36,20 @@ configure_file( raqm_headers = files('raqm.h') install_headers(raqm_headers) +# ABI compatibility version should be that used for last non-meson release, 0.7.2 +raqm_ver_compat = 701 +raqm_ver_current = raqm_ver_major * 10000 + raqm_ver_minor * 100 + raqm_ver_micro + +raqm_dylib_ver_compat = '@0@.0.0'.format(raqm_ver_compat) +raqm_dylib_ver_current = '@0@.0.0'.format(raqm_ver_current) +raqm_darwin_versions = [raqm_dylib_ver_compat, raqm_dylib_ver_current] + libraqm = library( 'raqm', 'raqm.c', 'raqm.h', version: meson.project_version(), + darwin_versions: raqm_darwin_versions, dependencies: deps, c_args: ['-DHAVE_CONFIG_H'], install: true,