meson: Use preferred syntax everywhere
Meson files are normally using 4-spaces to indent and functions use first parameter on the same line while others at next indentation level, not following the parenthesis indentation. So adapt libfprint to follow the meson standard.
This commit is contained in:
parent
dd7d1baece
commit
099fa9f005
7 changed files with 116 additions and 116 deletions
|
@ -1,21 +1,24 @@
|
||||||
gtk_test_resources = gnome.compile_resources('gtk-test-resources', 'gtk-libfprint-test.gresource.xml',
|
gtk_test_resources = gnome.compile_resources('gtk-test-resources',
|
||||||
source_dir : '.',
|
'gtk-libfprint-test.gresource.xml',
|
||||||
c_name : 'gtk_test')
|
source_dir : '.',
|
||||||
|
c_name : 'gtk_test')
|
||||||
|
|
||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
bindir = join_paths(prefix, get_option('bindir'))
|
bindir = join_paths(prefix, get_option('bindir'))
|
||||||
datadir = join_paths(prefix, get_option('datadir'))
|
datadir = join_paths(prefix, get_option('datadir'))
|
||||||
|
|
||||||
executable('gtk-libfprint-test',
|
executable('gtk-libfprint-test',
|
||||||
[ 'gtk-libfprint-test.c', gtk_test_resources ],
|
[ 'gtk-libfprint-test.c', gtk_test_resources ],
|
||||||
dependencies: [ libfprint_dep, gtk_dep ],
|
dependencies: [ libfprint_dep, gtk_dep ],
|
||||||
include_directories: [
|
include_directories: [
|
||||||
root_inc,
|
root_inc,
|
||||||
],
|
],
|
||||||
c_args: [ common_cflags,
|
c_args: [
|
||||||
'-DPACKAGE_VERSION="' + meson.project_version() + '"' ],
|
common_cflags,
|
||||||
install: true,
|
'-DPACKAGE_VERSION="' + meson.project_version() + '"'
|
||||||
install_dir: bindir)
|
],
|
||||||
|
install: true,
|
||||||
|
install_dir: bindir)
|
||||||
|
|
||||||
appdata = 'org.freedesktop.libfprint.Demo.appdata.xml'
|
appdata = 'org.freedesktop.libfprint.Demo.appdata.xml'
|
||||||
install_data(appdata,
|
install_data(appdata,
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
subdir('xml')
|
subdir('xml')
|
||||||
|
|
||||||
private_headers = [
|
private_headers = [
|
||||||
'config.h',
|
'config.h',
|
||||||
'nbis-helpers.h',
|
'nbis-helpers.h',
|
||||||
'fprint.h',
|
'fprint.h',
|
||||||
'fp_internal.h',
|
'fp_internal.h',
|
||||||
|
|
||||||
# Subdirectories to ignore
|
# Subdirectories to ignore
|
||||||
'drivers',
|
'drivers',
|
||||||
'nbis',
|
'nbis',
|
||||||
]
|
]
|
||||||
|
|
||||||
html_images = [
|
html_images = [
|
||||||
|
@ -25,20 +25,20 @@ 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('libfprint',
|
gnome.gtkdoc('libfprint',
|
||||||
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,
|
||||||
content_files: content_files,
|
content_files: content_files,
|
||||||
expand_content_files: expand_content_files,
|
expand_content_files: expand_content_files,
|
||||||
scan_args: [
|
scan_args: [
|
||||||
#'--rebuild-sections',
|
#'--rebuild-sections',
|
||||||
'--ignore-decorators=API_EXPORTED',
|
'--ignore-decorators=API_EXPORTED',
|
||||||
'--ignore-headers=' + ' '.join(private_headers),
|
'--ignore-headers=' + ' '.join(private_headers),
|
||||||
],
|
],
|
||||||
fixxref_args: [
|
fixxref_args: [
|
||||||
'--html-dir=@0@'.format(docpath),
|
'--html-dir=@0@'.format(docpath),
|
||||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||||
],
|
],
|
||||||
html_assets: html_images,
|
html_assets: html_images,
|
||||||
install: true)
|
install: true)
|
||||||
|
|
|
@ -7,4 +7,6 @@ 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())
|
||||||
ent_conf.set('PACKAGE_API_VERSION', '1.0')
|
ent_conf.set('PACKAGE_API_VERSION', '1.0')
|
||||||
configure_file(input: 'gtkdocentities.ent.in', output: 'gtkdocentities.ent', configuration: ent_conf)
|
configure_file(input: 'gtkdocentities.ent.in',
|
||||||
|
output: 'gtkdocentities.ent',
|
||||||
|
configuration: ent_conf)
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
examples = [ 'enroll', 'verify', 'manage-prints' ]
|
examples = [ 'enroll', 'verify', 'manage-prints' ]
|
||||||
foreach example: examples
|
foreach example: examples
|
||||||
executable(example,
|
executable(example,
|
||||||
[example + '.c', 'storage.c', 'utilities.c'],
|
[ example + '.c', 'storage.c', 'utilities.c' ],
|
||||||
dependencies: [libfprint_dep, glib_dep],
|
dependencies: [ libfprint_dep, glib_dep ],
|
||||||
include_directories: [
|
include_directories: [
|
||||||
root_inc,
|
root_inc,
|
||||||
],
|
],
|
||||||
c_args: common_cflags)
|
c_args: common_cflags)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
executable('cpp-test',
|
executable('cpp-test',
|
||||||
'cpp-test.cpp',
|
'cpp-test.cpp',
|
||||||
dependencies: libfprint_dep,
|
dependencies: libfprint_dep,
|
||||||
include_directories: [
|
include_directories: [
|
||||||
root_inc,
|
root_inc,
|
||||||
],
|
],
|
||||||
c_args: common_cflags)
|
c_args: common_cflags)
|
||||||
|
|
|
@ -162,73 +162,73 @@ endif
|
||||||
other_sources = []
|
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)
|
||||||
fp_enums_h = fp_enums[1]
|
fp_enums_h = fp_enums[1]
|
||||||
|
|
||||||
fpi_enums = gnome.mkenums_simple('fpi-enums',
|
fpi_enums = gnome.mkenums_simple('fpi-enums',
|
||||||
sources: libfprint_private_headers,
|
sources: libfprint_private_headers,
|
||||||
install_header : true)
|
install_header : true)
|
||||||
fpi_enums_h = fpi_enums[1]
|
fpi_enums_h = fpi_enums[1]
|
||||||
|
|
||||||
drivers_sources += configure_file(input: 'empty_file',
|
drivers_sources += configure_file(input: 'empty_file',
|
||||||
output: 'fp-drivers.c',
|
output: 'fp-drivers.c',
|
||||||
capture: true,
|
capture: true,
|
||||||
command: [
|
command: [
|
||||||
'echo',
|
'echo',
|
||||||
drivers_type_list + '\n\n' + drivers_type_func
|
drivers_type_list + '\n\n' + drivers_type_func
|
||||||
])
|
])
|
||||||
|
|
||||||
mapfile = 'libfprint.ver'
|
mapfile = 'libfprint.ver'
|
||||||
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
|
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
|
||||||
|
|
||||||
deps = [ mathlib_dep, glib_dep, gusb_dep, nss_dep, imaging_dep, gio_dep ]
|
deps = [ mathlib_dep, glib_dep, gusb_dep, nss_dep, imaging_dep, gio_dep ]
|
||||||
libfprint = library('fprint',
|
libfprint = library('fprint',
|
||||||
libfprint_sources + fp_enums + fpi_enums +
|
libfprint_sources + fp_enums + fpi_enums +
|
||||||
drivers_sources + nbis_sources + other_sources,
|
drivers_sources + nbis_sources + other_sources,
|
||||||
soversion: soversion,
|
soversion: soversion,
|
||||||
version: libversion,
|
version: libversion,
|
||||||
c_args: common_cflags + drivers_cflags,
|
c_args: common_cflags + drivers_cflags,
|
||||||
include_directories: [
|
include_directories: [
|
||||||
root_inc,
|
root_inc,
|
||||||
include_directories('nbis/include'),
|
include_directories('nbis/include'),
|
||||||
],
|
],
|
||||||
link_args : vflag,
|
link_args : vflag,
|
||||||
link_depends : mapfile,
|
link_depends : mapfile,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
install: true)
|
install: true)
|
||||||
|
|
||||||
libfprint_dep = declare_dependency(link_with: libfprint,
|
libfprint_dep = declare_dependency(link_with: libfprint,
|
||||||
sources: [ fp_enums_h ],
|
sources: [ fp_enums_h ],
|
||||||
include_directories: root_inc,
|
include_directories: root_inc,
|
||||||
dependencies: [glib_dep, gusb_dep, gio_dep])
|
dependencies: [ glib_dep, gusb_dep, gio_dep ])
|
||||||
|
|
||||||
install_headers(['fprint.h'] + libfprint_public_headers, subdir: 'libfprint')
|
install_headers(['fprint.h'] + libfprint_public_headers, subdir: 'libfprint')
|
||||||
|
|
||||||
udev_rules = executable('fprint-list-udev-rules',
|
udev_rules = executable('fprint-list-udev-rules',
|
||||||
'fprint-list-udev-rules.c',
|
'fprint-list-udev-rules.c',
|
||||||
include_directories: [
|
include_directories: [
|
||||||
root_inc,
|
root_inc,
|
||||||
],
|
],
|
||||||
dependencies: [ deps, libfprint_dep ],
|
dependencies: [ deps, libfprint_dep ],
|
||||||
install: false)
|
install: false)
|
||||||
|
|
||||||
if get_option('udev_rules')
|
if get_option('udev_rules')
|
||||||
custom_target('udev-rules',
|
custom_target('udev-rules',
|
||||||
output: '60-fprint-autosuspend.rules',
|
output: '60-fprint-autosuspend.rules',
|
||||||
capture: true,
|
capture: true,
|
||||||
command: [ udev_rules ],
|
command: [ udev_rules ],
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: udev_rules_dir)
|
install_dir: udev_rules_dir)
|
||||||
endif
|
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',
|
||||||
include_directories: [
|
include_directories: [
|
||||||
root_inc,
|
root_inc,
|
||||||
],
|
],
|
||||||
dependencies: [ deps, libfprint_dep ],
|
dependencies: [ deps, libfprint_dep ],
|
||||||
install: false)
|
install: false)
|
||||||
|
|
||||||
|
|
||||||
if get_option('introspection')
|
if get_option('introspection')
|
||||||
|
@ -256,8 +256,7 @@ if get_option('introspection')
|
||||||
'GObject-2.0',
|
'GObject-2.0',
|
||||||
'GUsb-1.0',
|
'GUsb-1.0',
|
||||||
],
|
],
|
||||||
install : true
|
install : true)
|
||||||
)
|
|
||||||
libfprint_gir = libfprint_girtarget[0]
|
libfprint_gir = libfprint_girtarget[0]
|
||||||
libfprint_typelib = libfprint_girtarget[1]
|
libfprint_typelib = libfprint_girtarget[1]
|
||||||
endif
|
endif
|
||||||
|
|
31
meson.build
31
meson.build
|
@ -1,12 +1,12 @@
|
||||||
project('libfprint', [ 'c', 'cpp' ],
|
project('libfprint', [ 'c', 'cpp' ],
|
||||||
version: '1.90.0',
|
version: '1.90.0',
|
||||||
license: 'LGPLv2.1+',
|
license: 'LGPLv2.1+',
|
||||||
default_options: [
|
default_options: [
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
'warning_level=1',
|
'warning_level=1',
|
||||||
'c_std=c99',
|
'c_std=c99',
|
||||||
],
|
],
|
||||||
meson_version: '>= 0.46.0')
|
meson_version: '>= 0.46.0')
|
||||||
|
|
||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
|
|
||||||
|
@ -160,11 +160,10 @@ endif
|
||||||
|
|
||||||
pkgconfig = import('pkgconfig')
|
pkgconfig = import('pkgconfig')
|
||||||
pkgconfig.generate(
|
pkgconfig.generate(
|
||||||
name: 'libfprint',
|
name: 'libfprint',
|
||||||
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: 'libfprint',
|
subdirs: 'libfprint',
|
||||||
filebase: 'libfprint2',
|
filebase: 'libfprint2',
|
||||||
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
|
install_dir: join_paths(get_option('libdir'), 'pkgconfig'))
|
||||||
)
|
|
||||||
|
|
|
@ -16,8 +16,7 @@ envs.set('NO_AT_BRIDGE', '1')
|
||||||
|
|
||||||
if get_option('introspection')
|
if get_option('introspection')
|
||||||
if 'virtual_image' in drivers
|
if 'virtual_image' in drivers
|
||||||
test(
|
test('virtual-image',
|
||||||
'virtual-image',
|
|
||||||
find_program('virtual-image.py'),
|
find_program('virtual-image.py'),
|
||||||
args: '--verbose',
|
args: '--verbose',
|
||||||
env: envs,
|
env: envs,
|
||||||
|
@ -26,8 +25,7 @@ if get_option('introspection')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if 'vfs5011' in drivers
|
if 'vfs5011' in drivers
|
||||||
test(
|
test('vfs5011',
|
||||||
'vfs5011',
|
|
||||||
find_program('umockdev-test.py'),
|
find_program('umockdev-test.py'),
|
||||||
args: join_paths(meson.current_source_dir(), 'vfs5011'),
|
args: join_paths(meson.current_source_dir(), 'vfs5011'),
|
||||||
env: envs,
|
env: envs,
|
||||||
|
@ -37,8 +35,7 @@ if get_option('introspection')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if 'synaptics' in drivers
|
if 'synaptics' in drivers
|
||||||
test(
|
test('synaptics',
|
||||||
'synaptics',
|
|
||||||
find_program('umockdev-test.py'),
|
find_program('umockdev-test.py'),
|
||||||
args: join_paths(meson.current_source_dir(), 'synaptics'),
|
args: join_paths(meson.current_source_dir(), 'synaptics'),
|
||||||
env: envs,
|
env: envs,
|
||||||
|
|
Loading…
Reference in a new issue