mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-09 12:23:34 +02:00
build: Add meson build system
Reuse the generated dbus interface .xml files from fprintd to avoid unnecessary copies.
This commit is contained in:
committed by
Bastien Nocera
parent
5c5849dca7
commit
eb6dbb6953
28
doc/dbus/meson.build
Normal file
28
doc/dbus/meson.build
Normal file
@ -0,0 +1,28 @@
|
||||
docbook_xml_header = custom_target('docbook_xml_header',
|
||||
output: 'docbook-xml-header.xml',
|
||||
command: [
|
||||
'echo', '-n',
|
||||
'<?xml version="1.0"?>',
|
||||
'<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">',
|
||||
],
|
||||
capture: true,
|
||||
)
|
||||
|
||||
dbus_interfaces_refs = []
|
||||
foreach interface_file: dbus_interfaces_files
|
||||
basename = run_command('basename', interface_file.full_path(), '.xml').stdout().strip()
|
||||
dbus_interfaces_refs += custom_target(basename + '_ref',
|
||||
input: docbook_xml_header,
|
||||
output: basename + '.ref.xml',
|
||||
depends: interface_file,
|
||||
capture: true,
|
||||
command: [
|
||||
bash, '-c',
|
||||
'cat @INPUT@;' +
|
||||
xsltproc.path() + ' @0@/@1@ '.format(
|
||||
meson.source_root(),
|
||||
files('spec-to-docbook.xsl')[0]) +
|
||||
interface_file.full_path() + '| tail -n +2;',
|
||||
],
|
||||
)
|
||||
endforeach
|
||||
27
doc/meson.build
Normal file
27
doc/meson.build
Normal file
@ -0,0 +1,27 @@
|
||||
subdir('dbus')
|
||||
|
||||
version_file = configure_file(
|
||||
input: 'version.xml.in',
|
||||
output: 'version.xml',
|
||||
configuration: configuration_data({
|
||||
'VERSION': meson.project_version(),
|
||||
}),
|
||||
)
|
||||
|
||||
gnome.gtkdoc(meson.project_name(),
|
||||
main_xml: 'fprintd-docs.xml',
|
||||
src_dir: meson.source_root() / 'src',
|
||||
dependencies: [
|
||||
declare_dependency(
|
||||
sources: dbus_interfaces_refs,
|
||||
link_with: libfprintd_private,
|
||||
),
|
||||
],
|
||||
content_files: [
|
||||
version_file,
|
||||
dbus_interfaces_refs,
|
||||
],
|
||||
ignore_headers: [
|
||||
'config.h',
|
||||
],
|
||||
install: true)
|
||||
Reference in New Issue
Block a user