fprint: Move drivers to private internal library

This allows us to finally remove fpi_get_driver_types from the exported list
of symbols.
This commit is contained in:
Marco Trevisan (Treviño) 2019-12-11 20:21:01 +01:00
parent c3bf6fe863
commit 6f2b1f97da
2 changed files with 20 additions and 8 deletions

View file

@ -1,9 +1,6 @@
LIBFPRINT_2.0.0 { LIBFPRINT_2.0.0 {
global: global:
fp_*; fp_*;
/* Needs to be public for the listing commands. */
fpi_get_driver_types;
local: local:
*; *;
}; };

View file

@ -207,19 +207,26 @@ libnbis = static_library('nbis',
libfprint_private = static_library('fprint-private', libfprint_private = static_library('fprint-private',
sources: libfprint_private_sources + fpi_enums, sources: libfprint_private_sources + fpi_enums,
dependencies: deps, dependencies: deps,
link_with: libnbis,
install: false)
libfprint_drivers = static_library('fprint-drivers',
sources: drivers_sources + [ fp_enums_h ],
c_args: drivers_cflags,
dependencies: deps,
link_with: libfprint_private,
install: false) install: false)
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('fprint',
sources: libfprint_sources + fp_enums + drivers_sources + other_sources, sources: libfprint_sources + fp_enums + other_sources,
soversion: soversion, soversion: soversion,
version: libversion, version: libversion,
c_args: drivers_cflags,
link_args : vflag, link_args : vflag,
link_depends : mapfile, link_depends : mapfile,
link_with: [libnbis, libfprint_private], link_with: [libfprint_private, libfprint_drivers],
dependencies: deps, dependencies: deps,
install: true) install: true)
@ -230,9 +237,16 @@ libfprint_dep = declare_dependency(link_with: libfprint,
install_headers(['fprint.h'] + libfprint_public_headers, subdir: 'libfprint') install_headers(['fprint.h'] + libfprint_public_headers, subdir: 'libfprint')
libfprint_private_dep = declare_dependency(
include_directories: include_directories('.'),
link_with: libfprint_private,
dependencies: [ deps, libfprint_dep ]
)
udev_rules = executable('fprint-list-udev-rules', udev_rules = executable('fprint-list-udev-rules',
'fprint-list-udev-rules.c', 'fprint-list-udev-rules.c',
dependencies: [ deps, libfprint_dep ], dependencies: libfprint_private_dep,
link_with: libfprint_drivers,
install: false) install: false)
if get_option('udev_rules') if get_option('udev_rules')
@ -246,7 +260,8 @@ endif
supported_devices = executable('fprint-list-supported-devices', supported_devices = executable('fprint-list-supported-devices',
'fprint-list-supported-devices.c', 'fprint-list-supported-devices.c',
dependencies: [ deps, libfprint_dep ], dependencies: libfprint_private_dep,
link_with: libfprint_drivers,
install: false) install: false)