meson: Allow installation directory to be set explicitly
Overriding the libexecdir via default_options doesn't always work when used as a subproject. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
12
meson.build
12
meson.build
@@ -101,12 +101,14 @@ configure_file(
|
|||||||
configuration : cdata,
|
configuration : cdata,
|
||||||
)
|
)
|
||||||
|
|
||||||
if meson.is_subproject()
|
if meson.is_subproject() and get_option('program_prefix') == ''
|
||||||
bwrapdir = get_option('libexecdir')
|
error('program_prefix option must be set when bwrap is a subproject')
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('program_prefix') == ''
|
if get_option('bwrapdir') != ''
|
||||||
error('program_prefix option must be set when bwrap is a subproject')
|
bwrapdir = get_option('bwrapdir')
|
||||||
endif
|
elif meson.is_subproject()
|
||||||
|
bwrapdir = get_option('libexecdir')
|
||||||
else
|
else
|
||||||
bwrapdir = get_option('bindir')
|
bwrapdir = get_option('bindir')
|
||||||
endif
|
endif
|
||||||
|
@@ -10,6 +10,11 @@ option(
|
|||||||
description : 'install bash completion script in this directory',
|
description : 'install bash completion script in this directory',
|
||||||
value : '',
|
value : '',
|
||||||
)
|
)
|
||||||
|
option(
|
||||||
|
'bwrapdir',
|
||||||
|
type : 'string',
|
||||||
|
description : 'install bwrap in this directory [default: bindir, or libexecdir in subprojects]',
|
||||||
|
)
|
||||||
option(
|
option(
|
||||||
'man',
|
'man',
|
||||||
type : 'feature',
|
type : 'feature',
|
||||||
|
Reference in New Issue
Block a user