summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-05-10 16:30:17 +0100
committerGitHub <noreply@github.com>2022-05-10 16:30:17 +0100
commitade6bb0ff77d8487c7f9b6f6bdd748ebabfcb462 (patch)
tree2096ea68c206237cfa9d94d87ed448493dfbbc1e
parent14d6a7f0dfa67c049cb95d6468d2a4097c21b84a (diff)
parentbda58e03a1ec1cbb160b88e60b0f8e625fef5aa9 (diff)
downloadbubblewrap-ade6bb0ff77d8487c7f9b6f6bdd748ebabfcb462.tar.gz
Merge pull request #493 from smcv/bwrapdir
meson: Allow installation directory to be set explicitly
-rw-r--r--meson.build12
-rw-r--r--meson_options.txt5
2 files changed, 12 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index c4ba441..7d51a85 100644
--- a/meson.build
+++ b/meson.build
@@ -101,12 +101,14 @@ configure_file(
configuration : cdata,
)
-if meson.is_subproject()
- bwrapdir = get_option('libexecdir')
+if meson.is_subproject() and get_option('program_prefix') == ''
+ error('program_prefix option must be set when bwrap is a subproject')
+endif
- if get_option('program_prefix') == ''
- error('program_prefix option must be set when bwrap is a subproject')
- endif
+if get_option('bwrapdir') != ''
+ bwrapdir = get_option('bwrapdir')
+elif meson.is_subproject()
+ bwrapdir = get_option('libexecdir')
else
bwrapdir = get_option('bindir')
endif
diff --git a/meson_options.txt b/meson_options.txt
index a136a3c..87bac9c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -11,6 +11,11 @@ option(
value : '',
)
option(
+ 'bwrapdir',
+ type : 'string',
+ description : 'install bwrap in this directory [default: bindir, or libexecdir in subprojects]',
+)
+option(
'man',
type : 'feature',
description : 'generate man pages',