Change SONAME and all the library paths to libfprint-2
To avoid conflicts with previous libfprint version and make sure that the target version is the correct one (plus to allow parallel install in some distros), let's use a versioned naming for the library keeping the abi version in sync. Fixes #223
This commit is contained in:
parent
24e9363a46
commit
23fab3a20a
4 changed files with 11 additions and 10 deletions
|
@ -23,7 +23,7 @@ glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
|
||||||
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
|
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
|
||||||
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
|
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
|
||||||
|
|
||||||
gnome.gtkdoc(meson.project_name(),
|
gnome.gtkdoc(versioned_libname,
|
||||||
main_xml: 'libfprint-docs.xml',
|
main_xml: 'libfprint-docs.xml',
|
||||||
src_dir: join_paths(meson.source_root(), 'libfprint'),
|
src_dir: join_paths(meson.source_root(), 'libfprint'),
|
||||||
dependencies: libfprint_dep,
|
dependencies: libfprint_dep,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
ent_conf = configuration_data()
|
ent_conf = configuration_data()
|
||||||
ent_conf.set('PACKAGE', meson.project_name())
|
ent_conf.set('PACKAGE', versioned_libname)
|
||||||
ent_conf.set('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/libfprint/libfprint/issues')
|
ent_conf.set('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/libfprint/libfprint/issues')
|
||||||
ent_conf.set('PACKAGE_NAME', meson.project_name())
|
ent_conf.set('PACKAGE_NAME', versioned_libname)
|
||||||
ent_conf.set('PACKAGE_STRING', meson.project_name())
|
ent_conf.set('PACKAGE_STRING', versioned_libname)
|
||||||
ent_conf.set('PACKAGE_TARNAME', 'libfprint-' + meson.project_version())
|
ent_conf.set('PACKAGE_TARNAME', 'libfprint-' + meson.project_version())
|
||||||
ent_conf.set('PACKAGE_URL', 'https://fprint.freedesktop.org/')
|
ent_conf.set('PACKAGE_URL', 'https://fprint.freedesktop.org/')
|
||||||
ent_conf.set('PACKAGE_VERSION', meson.project_version())
|
ent_conf.set('PACKAGE_VERSION', meson.project_version())
|
||||||
|
|
|
@ -177,7 +177,7 @@ other_sources = []
|
||||||
fp_enums = gnome.mkenums_simple('fp-enums',
|
fp_enums = gnome.mkenums_simple('fp-enums',
|
||||||
sources: libfprint_public_headers,
|
sources: libfprint_public_headers,
|
||||||
install_header: true,
|
install_header: true,
|
||||||
install_dir: get_option('includedir') / meson.project_name(),
|
install_dir: get_option('includedir') / versioned_libname,
|
||||||
)
|
)
|
||||||
fp_enums_h = fp_enums[1]
|
fp_enums_h = fp_enums[1]
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ libfprint_drivers = static_library('fprint-drivers',
|
||||||
mapfile = files('libfprint.ver')
|
mapfile = files('libfprint.ver')
|
||||||
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.source_root(), mapfile[0])
|
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.source_root(), mapfile[0])
|
||||||
|
|
||||||
libfprint = library('fprint',
|
libfprint = library(versioned_libname.split('lib')[1],
|
||||||
sources: [
|
sources: [
|
||||||
fp_enums,
|
fp_enums,
|
||||||
libfprint_sources,
|
libfprint_sources,
|
||||||
|
@ -268,7 +268,7 @@ libfprint_dep = declare_dependency(link_with: libfprint,
|
||||||
])
|
])
|
||||||
|
|
||||||
install_headers(['fprint.h'] + libfprint_public_headers,
|
install_headers(['fprint.h'] + libfprint_public_headers,
|
||||||
subdir: meson.project_name()
|
subdir: versioned_libname
|
||||||
)
|
)
|
||||||
|
|
||||||
libfprint_private_dep = declare_dependency(
|
libfprint_private_dep = declare_dependency(
|
||||||
|
|
|
@ -75,6 +75,7 @@ soversion = 2
|
||||||
current = 0
|
current = 0
|
||||||
revision = 0
|
revision = 0
|
||||||
libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
|
libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
|
||||||
|
versioned_libname = meson.project_name() + '-' + soversion.to_string()
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
|
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
|
||||||
|
@ -206,10 +207,10 @@ subdir('tests')
|
||||||
|
|
||||||
pkgconfig = import('pkgconfig')
|
pkgconfig = import('pkgconfig')
|
||||||
pkgconfig.generate(
|
pkgconfig.generate(
|
||||||
name: meson.project_name(),
|
name: versioned_libname,
|
||||||
description: 'Generic C API for fingerprint reader access',
|
description: 'Generic C API for fingerprint reader access',
|
||||||
version: meson.project_version(),
|
version: meson.project_version(),
|
||||||
libraries: libfprint,
|
libraries: libfprint,
|
||||||
subdirs: meson.project_name(),
|
subdirs: versioned_libname,
|
||||||
filebase: meson.project_name() + '@0@'.format(soversion),
|
filebase: versioned_libname,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue