mirror of https://github.com/nirenjan/libx52.git
Merge branch 'master' into virtual-keyboard-mouse
commit
04025f0ac0
|
|
@ -11,6 +11,7 @@ install_headers('x52dcomm.h', subdir: meson.project_name())
|
|||
lib_libx52dcomm = library('x52dcomm', libx52dcomm_sources,
|
||||
dependencies: [dep_intl],
|
||||
version: libx52dcomm_version,
|
||||
install: true,
|
||||
include_directories: includes)
|
||||
|
||||
x52d_sources = [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
# Install Doxygen HTML and man trees from the build directory.
|
||||
# Arguments are paths relative to the install prefix (MESON_INSTALL_DESTDIR_PREFIX).
|
||||
set -e
|
||||
|
||||
doc_html="$1"
|
||||
mandir="$2"
|
||||
|
||||
WANTED_PAGES="man1/x52cli.1 man1/x52bugreport.1"
|
||||
|
||||
if [ -d "$MESON_BUILD_ROOT/docs/html" ]; then
|
||||
mkdir -p "$MESON_INSTALL_DESTDIR_PREFIX/$doc_html"
|
||||
cp -R "$MESON_BUILD_ROOT/docs/html"/. "$MESON_INSTALL_DESTDIR_PREFIX/$doc_html/"
|
||||
fi
|
||||
|
||||
if [ -d "$MESON_BUILD_ROOT/docs/man" ]; then
|
||||
MANDIR="$MESON_INSTALL_DESTDIR_PREFIX/$mandir"
|
||||
mkdir -p "$MANDIR"
|
||||
for manpage in $WANTED_PAGES
|
||||
do
|
||||
section=$(dirname "$manpage")
|
||||
mkdir -p "$MANDIR/$section"
|
||||
cp "$MESON_BUILD_ROOT/docs/man/$manpage" "$MANDIR/$section"
|
||||
done
|
||||
fi
|
||||
33
meson.build
33
meson.build
|
|
@ -1,6 +1,7 @@
|
|||
project('libx52', 'C',
|
||||
license: 'GPL-2.0-only WITH Classpath-exception-2.0',
|
||||
version: '0.3.3')
|
||||
version: '0.3.3',
|
||||
meson_version: '>=0.61')
|
||||
|
||||
dep_libusb = dependency('libusb-1.0', required: true)
|
||||
dep_hidapi = dependency('hidapi-hidraw', required: false)
|
||||
|
|
@ -135,36 +136,20 @@ if doxygen_program.found()
|
|||
configuration: {
|
||||
'PACKAGE_NAME': meson.project_name(),
|
||||
'PACKAGE_VERSION': meson.project_version(),
|
||||
'abs_top_builddir': meson.build_root(),
|
||||
'abs_top_srcdir': meson.source_root(),
|
||||
'abs_top_builddir': meson.project_build_root(),
|
||||
'abs_top_srcdir': meson.project_source_root(),
|
||||
}
|
||||
)
|
||||
|
||||
docs_tgt = custom_target('docs',
|
||||
custom_target('docs',
|
||||
depend_files: [doxyfile, 'DoxygenLayout.xml'],
|
||||
command: [doxygen_program],
|
||||
output: 'docs'
|
||||
)
|
||||
|
||||
install_subdir(meson.current_build_dir() / 'docs' / 'html',
|
||||
install_dir: get_option('prefix') / get_option('datadir') / 'doc' / meson.project_name(),
|
||||
strip_directory: true
|
||||
)
|
||||
|
||||
wanted_man_pages = ['x52cli.1', 'x52bugreport.1']
|
||||
foreach p: wanted_man_pages
|
||||
section = 'man' + p.split('.')[-1] # Extracts the section
|
||||
|
||||
custom_target(p,
|
||||
input: docs_tgt,
|
||||
output: p,
|
||||
command: ['cp', meson.current_build_dir() / 'docs' / 'man' / section / p, '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: get_option('prefix') / get_option('mandir') / section
|
||||
)
|
||||
endforeach
|
||||
install_subdir(meson.current_build_dir() / 'docs' / 'man',
|
||||
install_dir: get_option('prefix') / get_option('mandir'),
|
||||
strip_directory: true
|
||||
meson.add_install_script(
|
||||
'install-doxygen-docs.sh',
|
||||
get_option('datadir') / 'doc' / meson.project_name(),
|
||||
get_option('mandir'),
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue