diff options
author | Simon McVittie <smcv@collabora.com> | 2022-04-05 14:55:11 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-04-05 14:57:04 +0100 |
commit | bda58e03a1ec1cbb160b88e60b0f8e625fef5aa9 (patch) | |
tree | 0b65623a9e1e7f6da8f591376427ea59c935aea5 | |
parent | 34a8c8bc870783611bc1b10f504fcf00f9eaa08e (diff) | |
download | bubblewrap-bda58e03a1ec1cbb160b88e60b0f8e625fef5aa9.tar.gz |
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>
-rw-r--r-- | meson.build | 12 | ||||
-rw-r--r-- | meson_options.txt | 5 |
2 files changed, 12 insertions, 5 deletions
diff --git a/meson.build b/meson.build index 5b63aa6..1f7d14e 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 2fa3a8c..1cd65ed 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', |