mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 06:28:01 +02:00
Meson: Use mklink on Windows to create the srcdir link
Create the directory symlink '<builddir>/test/srcdir' -> '<sourcedir>' as done on UNIX. Invoke mklink /J to create a junction, which doesn't require developer mode nor admin rights. Note: we might also set the srcdir environment variable [1] [1] https://gitlab.freedesktop.org/cairo/cairo/-/blob/1.18.4/test/cairo-test.c?ref_type=tags#L198
This commit is contained in:
parent
04656d7450
commit
0ca7d6e6a2
1 changed files with 8 additions and 0 deletions
|
|
@ -670,6 +670,14 @@ if build_machine.system() != 'windows'
|
|||
meson.current_source_dir(),
|
||||
meson.current_build_dir() / 'srcdir',
|
||||
check: true)
|
||||
elif not fs.exists(meson.current_build_dir() / 'srcdir')
|
||||
cmd = find_program(find_program('cmd').full_path().replace('/', '\\'))
|
||||
run_command(cmd, '/C', 'mklink', '/j', '%LINK%', '%TARGET%',
|
||||
env: [
|
||||
'LINK="@0@"'.format(meson.current_build_dir() / 'srcdir'),
|
||||
'TARGET="@0@"'.format(meson.current_source_dir()),
|
||||
],
|
||||
check: true)
|
||||
endif
|
||||
|
||||
if ttx.found()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue