build: set pkgconfig/dependency variables for features
This allows libseat users to e.g. advise people to chmod a+s the executable if libseat is built with the builtin backend. While bumping the Meson version, adjust the scdoc logic to avoid the following warnings: WARNING: Project targeting '>=0.56.0' but tried to use feature deprecated since '0.56.0': Dependency.get_pkgconfig_variable. use Dependency.get_variable(pkgconfig : ...) instead WARNING: Project targeting '>=0.56.0' but tried to use feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead
This commit is contained in:
parent
5884a6003a
commit
81ff0a09a9
1 changed files with 11 additions and 3 deletions
14
meson.build
14
meson.build
|
@ -3,7 +3,7 @@ project(
|
|||
'c',
|
||||
version: '0.5.0',
|
||||
license: 'MIT',
|
||||
meson_version: '>=0.53.0',
|
||||
meson_version: '>=0.56.0',
|
||||
default_options: [
|
||||
'c_std=c11',
|
||||
'warning_level=3',
|
||||
|
@ -167,18 +167,26 @@ lib = library(
|
|||
|
||||
install_headers('include/libseat.h')
|
||||
|
||||
libseat_vars = {
|
||||
'have_seatd': with_seatd.to_string(),
|
||||
'have_logind': logind.found().to_string(),
|
||||
'have_builtin': with_builtin.to_string(),
|
||||
}
|
||||
|
||||
pkgconfig = import('pkgconfig')
|
||||
pkgconfig.generate(lib,
|
||||
version: meson.project_version(),
|
||||
filebase: 'libseat',
|
||||
name: 'libseat',
|
||||
description: 'Seat management library',
|
||||
variables: libseat_vars,
|
||||
)
|
||||
|
||||
libseat = declare_dependency(
|
||||
link_with: lib,
|
||||
dependencies: private_deps,
|
||||
include_directories: include_directories('include', is_system: true),
|
||||
variables: libseat_vars,
|
||||
)
|
||||
|
||||
if with_server
|
||||
|
@ -220,7 +228,7 @@ else
|
|||
endif
|
||||
|
||||
if scdoc.found()
|
||||
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
|
||||
scdoc_prog = find_program(scdoc.get_variable(pkgconfig: 'scdoc'), native: true)
|
||||
mandir = get_option('mandir')
|
||||
|
||||
foreach src : ['seatd.1.scd']
|
||||
|
@ -233,7 +241,7 @@ if scdoc.found()
|
|||
input: 'man/' + src,
|
||||
output: output,
|
||||
command: [
|
||||
'sh', '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output)
|
||||
'sh', '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.full_path(), output)
|
||||
],
|
||||
install: true,
|
||||
install_dir: '@0@/man@1@'.format(mandir, section)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue