Generate and install a man page

pull/69/head
Andri Yngvason 2020-09-26 14:43:46 +00:00
parent c20474604e
commit b93d55d068
2 changed files with 22 additions and 0 deletions

View File

@ -133,3 +133,23 @@ executable(
include_directories: inc, include_directories: inc,
install: true, install: true,
) )
scdoc = dependency('scdoc', native: true, required: get_option('man-pages'))
if scdoc.found()
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
sh = find_program('sh', native: true)
mandir = get_option('mandir')
input = 'wayvnc.scd'
output = 'wayvnc.1'
custom_target(
output,
input: input,
output: output,
command: [
sh, '-c', '@0@ <@INPUT@ >@1@'.format(scdoc_prog.path(), output)
],
install: true,
install_dir: '@0@/man.1'.format(mandir)
)
endif

View File

@ -1,2 +1,4 @@
option('screencopy-dmabuf', type: 'feature', value: 'disabled', option('screencopy-dmabuf', type: 'feature', value: 'disabled',
description: 'Enable GPU-side screencopy (experimental)') description: 'Enable GPU-side screencopy (experimental)')
option('man-pages', type: 'feature', value: 'auto',
description: 'Generate and install man pages')