Commit 69bfef9e authored by Carlos Garnacho's avatar Carlos Garnacho

build: Set proper soversion to libraries

Leaving to '0' is not enough if several versions of the library are
installed (say, in different prefixes). Add back the library soversion,
similarly to how it was done in autotools.
parent 6af5f4b6
......@@ -7,10 +7,15 @@ cc = meson.get_compiler('c')
# This is the X.Y used in -llibtracker-FOO-X.Y
tracker_api_version = '2.0'
tracker_version = meson.project_version().split('-')[0]
tracker_major_version = tracker_version.split('.')[0].to_int()
tracker_minor_version = tracker_version.split('.')[1].to_int()
tracker_micro_version = tracker_version.split('.')[2].to_int()
tracker_interface_age = 0
tracker_binary_age = 100 * tracker_minor_version + tracker_micro_version - tracker_interface_age
# This the .Z used in libtracker-sparql-2.0.so.Z
# This version number is redundant, but it's needed for programs that build
# with libtool to be able to link against our libraries.
soversion = 0
soversion = '0.@0@.@1@'.format(tracker_binary_age - tracker_interface_age, tracker_interface_age)
libdir = join_paths(get_option('prefix'), get_option('libdir'))
datadir = join_paths(get_option('prefix'), get_option('datadir'))
......@@ -218,10 +223,6 @@ else
bash_completion_dir = get_option('bash_completion')
endif
tracker_major_version = meson.project_version().split('.')[0].to_int()
tracker_minor_version = meson.project_version().split('.')[1].to_int()
tracker_micro_version = meson.project_version().split('.')[2].to_int()
conf = configuration_data()
# Config that goes in config.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment