diff options
author | Chun-wei Fan <fanc999@yahoo.com.tw> | 2023-01-03 17:49:33 +0800 |
---|---|---|
committer | Chun-wei Fan <fanc999@yahoo.com.tw> | 2023-01-03 17:49:33 +0800 |
commit | 4562834a1959053750157b46bd962cc15ce19afe (patch) | |
tree | 7e07d220e4f7d0bd5b96cbf01b5595dc7b65efde | |
parent | afbaa3639a97068a856801439a451a21bd27c1b5 (diff) | |
download | glibmm-fix-if-git-build-msvc-2-66.tar.gz |
meson: Fix if_git_build on Visual Studiofix-if-git-build-msvc-2-66
The root sourcedir needs to be converted to POSIX-style path before
trying to run GIT to check whether it is a GIT checkout or a directory
that results from extacting a source tarball, otherwise the sourcedir
gets rejected as-is.
-rw-r--r-- | meson.build | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meson.build b/meson.build index bf3a081b..76286313 100644 --- a/meson.build +++ b/meson.build @@ -58,13 +58,14 @@ endif # Do we build from a git repository? # Suppose we do if and only if the meson.build file is tracked by git. +fs = import('fs') cmd_py = ''' import shutil, subprocess, sys if not shutil.which('git'): sys.exit(1) cmd = [ 'git', 'ls-files', '--error-unmatch', 'meson.build' ] sys.exit(subprocess.run(cmd, cwd="@0@", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode) -'''.format(project_source_root) +'''.format(fs.as_posix(project_source_root)) is_git_build = run_command(python3, '-c', cmd_py, check: false).returncode() == 0 # Are we testing a dist tarball while it's being built? |