meson: use current_source_dir instead of source_root

Use source_root breaks the build when used as a subproject.
This commit is contained in:
emersion 2018-03-12 12:15:26 +01:00
parent 1c5e035884
commit 375e1bdf2b
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -196,7 +196,7 @@ git = find_program('git', required: false)
if git.found()
all_files = run_command(
git,
['--git-dir=@0@/.git'.format(meson.source_root()),
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
'ls-files',
':/*.[ch]'])
all_files = files(all_files.stdout().split())