Skip to content

Commit ade6bb0

Browse files
authored
Merge pull request #493 from smcv/bwrapdir
meson: Allow installation directory to be set explicitly
2 parents 14d6a7f + bda58e0 commit ade6bb0

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

meson.build

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,14 @@ configure_file(
101101
configuration : cdata,
102102
)
103103

104-
if meson.is_subproject()
105-
bwrapdir = get_option('libexecdir')
104+
if meson.is_subproject() and get_option('program_prefix') == ''
105+
error('program_prefix option must be set when bwrap is a subproject')
106+
endif
106107

107-
if get_option('program_prefix') == ''
108-
error('program_prefix option must be set when bwrap is a subproject')
109-
endif
108+
if get_option('bwrapdir') != ''
109+
bwrapdir = get_option('bwrapdir')
110+
elif meson.is_subproject()
111+
bwrapdir = get_option('libexecdir')
110112
else
111113
bwrapdir = get_option('bindir')
112114
endif

meson_options.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ option(
1010
description : 'install bash completion script in this directory',
1111
value : '',
1212
)
13+
option(
14+
'bwrapdir',
15+
type : 'string',
16+
description : 'install bwrap in this directory [default: bindir, or libexecdir in subprojects]',
17+
)
1318
option(
1419
'man',
1520
type : 'feature',

0 commit comments

Comments
 (0)