From 496dce0666d8be925452d50d75fb46ef0f6b29a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20V=C3=A4in=C3=B6l=C3=A4?= Date: Sat, 17 Sep 2022 14:20:47 +0300 Subject: Fix including headers from another drive on VS backend Include paths to different drives as absolute paths fixes #8329 --- mesonbuild/backend/vs2010backend.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mesonbuild') diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index fa97720..6e72828 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -1043,8 +1043,12 @@ class Vs2010Backend(backends.Backend): # reversed is used to keep order of includes for i in reversed(d.get_incdirs()): curdir = os.path.join(d.get_curdir(), i) - args.append('-I' + self.relpath(curdir, target.subdir)) # build dir - args.append('-I' + os.path.join(proj_to_src_root, curdir)) # src dir + try: + args.append('-I' + self.relpath(curdir, target.subdir)) # build dir + args.append('-I' + os.path.join(proj_to_src_root, curdir)) # src dir + except ValueError: + # Include is on different drive + args.append('-I' + os.path.normpath(curdir)) for i in d.get_extra_build_dirs(): curdir = os.path.join(d.get_curdir(), i) args.append('-I' + self.relpath(curdir, target.subdir)) # build dir -- cgit v1.1