aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-01-29 19:54:15 +0100
committerEli Schwartz <eschwartz93@gmail.com>2022-02-09 11:04:59 -0500
commitdf451f10130fc5d64cf1c65504a69bedd2fbdfdd (patch)
treeefc457f194ce5312bb59da5791f5f10eaa2bbabf /docs/markdown/snippets
parentd2d9df3121d228797d0b3bccfd614849b637c0fe (diff)
downloadmeson-df451f10130fc5d64cf1c65504a69bedd2fbdfdd.zip
meson-df451f10130fc5d64cf1c65504a69bedd2fbdfdd.tar.gz
meson-df451f10130fc5d64cf1c65504a69bedd2fbdfdd.tar.bz2
meson: Allow directory options outside of prefix
This bring us in line with Autotools and CMake and it is useful for platforms like Nix, which install projects into multiple independent prefixes. As a consequence, `get_option` might return absolute paths for some directory options, if a directory outside of prefix is passed. This is technically a backwards incompatible change but its effect should be minimal, thanks to widespread use of `join_paths`/`/` operator and pkg-config generator module. It should only cause an issue when a path were constructed by concatenating the value of directory path option. Also remove a comment about commonpath since we do not use that since <https://github.com/mesonbuild/meson/commit/00f5dadd5b7d71c30bd7393d165a87f554eb92e5>. Fixes: https://github.com/mesonbuild/meson/issues/2561
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/dir_options_outside_prefix.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/markdown/snippets/dir_options_outside_prefix.md b/docs/markdown/snippets/dir_options_outside_prefix.md
new file mode 100644
index 0000000..ceb5e50
--- /dev/null
+++ b/docs/markdown/snippets/dir_options_outside_prefix.md
@@ -0,0 +1,12 @@
+## All directory options now support paths outside of prefix
+
+Previously, Meson only allowed most directory options to be relative to prefix.
+This restriction has been now lifted, bringing us in line with Autotools and
+CMake. It is also useful for platforms like Nix, which install projects into
+multiple independent prefixes.
+
+As a consequence, `get_option` might return absolute paths for any
+directory option, if a directory outside of prefix is passed. This
+is technically a backwards incompatible change but its effect
+should be minimal, thanks to widespread use of `join_paths`/
+`/` operator and pkg-config generator module.