Fix including headers from another drive on VS backend

Include paths to different drives as absolute paths

fixes #8329
pull/10835/head
Vili Väinölä 2 years ago committed by Eli Schwartz
parent eb69fed2f6
commit 496dce0666
  1. 8
      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

Loading…
Cancel
Save