From df451f10130fc5d64cf1c65504a69bedd2fbdfdd Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 29 Jan 2022 19:54:15 +0100 Subject: 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 . Fixes: https://github.com/mesonbuild/meson/issues/2561 --- test cases/failing/38 libdir must be inside prefix/meson.build | 6 ------ test cases/failing/38 libdir must be inside prefix/test.json | 10 ---------- 2 files changed, 16 deletions(-) delete mode 100644 test cases/failing/38 libdir must be inside prefix/meson.build delete mode 100644 test cases/failing/38 libdir must be inside prefix/test.json (limited to 'test cases') diff --git a/test cases/failing/38 libdir must be inside prefix/meson.build b/test cases/failing/38 libdir must be inside prefix/meson.build deleted file mode 100644 index 4cce7f81c..000000000 --- a/test cases/failing/38 libdir must be inside prefix/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('libdir prefix', 'c', - default_options : ['libdir=/opt/lib']) - -if host_machine.system() == 'windows' - error('MESON_SKIP_TEST: this test does not work on Windows since /foo is not absolute') -endif \ No newline at end of file diff --git a/test cases/failing/38 libdir must be inside prefix/test.json b/test cases/failing/38 libdir must be inside prefix/test.json deleted file mode 100644 index d9256d1a2..000000000 --- a/test cases/failing/38 libdir must be inside prefix/test.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "do_not_set_opts": [ - "libdir" - ], - "stdout": [ - { - "line": "test cases/failing/38 libdir must be inside prefix/meson.build:1:0: ERROR: The value of the 'libdir' option is '/opt/lib' which must be a subdir of the prefix '/usr'." - } - ] -} -- cgit v1.2.3