The check for whether or not a file is allowed to be accessed from a subproject fails if the subproject is accessed via a symlink. Use the absolute path of the subproject without resolving symlinks to fix the check. Extend unit test 106 to check for this in the future.pull/10492/head
parent
9b21428006
commit
b49b9f52b2
6 changed files with 26 additions and 4 deletions
@ -0,0 +1,6 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
from sys import argv |
||||
from shutil import copy |
||||
|
||||
copy(argv[1], argv[2]) |
@ -1,8 +1,15 @@ |
||||
project('foo', 'c') |
||||
|
||||
symlinked_subproject = subproject('symlinked_subproject') |
||||
symlinked_subproject = subproject('symlinked_subproject').get_variable('dep') |
||||
|
||||
executable('foo', |
||||
sources : 'main.c', |
||||
dependencies : symlinked_subproject.get_variable('dep') |
||||
dependencies : symlinked_subproject |
||||
) |
||||
|
||||
custom_target( |
||||
input : symlinked_subproject.get_variable('datadir') / 'datafile', |
||||
output : 'datafile_copy', |
||||
command : [find_program('cp.py'), '@INPUT@', '@OUTPUT@'], |
||||
build_always : true |
||||
) |
||||
|
@ -0,0 +1 @@ |
||||
hello meson |
@ -0,0 +1 @@ |
||||
install_data('datafile') |
@ -1,3 +1,10 @@ |
||||
project('symlinked_subproject', 'c', version : '1.0.0') |
||||
|
||||
dep = declare_dependency(sources : 'src.c') |
||||
dep = declare_dependency( |
||||
sources : 'src.c', |
||||
variables : { |
||||
'datadir': meson.current_source_dir() / 'datadir' |
||||
} |
||||
) |
||||
|
||||
subdir('datadir') |
||||
|
Loading…
Reference in new issue