Skip to content

Commit

Permalink
build: Set the appropriate versioning for the shared library
Browse files Browse the repository at this point in the history
We use the same versioning scheme that GLib and GTK+ use, with the API
version as part of the file name, and the minor and micro version as
part of the soname. This allows parallel installation based on the API
major version, with ABI-compatible updates within the same API version.
  • Loading branch information
ebassi committed Dec 28, 2016
1 parent d898391 commit fd5db19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions meson.build
Expand Up @@ -29,6 +29,11 @@ endif

emeus_binary_age = emeus_minor_version * 100 + emeus_micro_version

# Shared library versioning
current = emeus_binary_age - emeus_interface_age
revision = emeus_interface_age
libversion = '0.@0@.@1@'.format(current, revision)

# Paths for the pkg-config file
emeus_prefix = get_option('prefix')
emeus_bindir = join_paths(emeus_prefix, get_option('bindir'))
Expand Down
3 changes: 2 additions & 1 deletion src/meson.build
Expand Up @@ -63,7 +63,8 @@ libemeus_private = static_library('emeus-private',

libemeus = shared_library('emeus-@0@'.format(emeus_api_version),
sources: sources + solver_sources + private_headers,
version: meson.project_version(),
soversion: 0,
version: libversion,
install: true,
dependencies: [ gtk_dep, mathlib_dep ],
c_args: common_cflags + debug_cflags + gtk_version_cflags + [
Expand Down

0 comments on commit fd5db19

Please sign in to comment.