msdev: find relative include path

This commit is contained in:
mittorn 2019-04-09 09:43:12 +00:00 committed by Alibek Omarov
parent 7ccc9b0795
commit d4638a9cf4
1 changed files with 7 additions and 1 deletions

View File

@ -592,7 +592,13 @@ class MsDevProject(MsDev):
for dep in deps:
uselib_incs = bld.env['INCLUDES_%s' % dep]
for uselib_inc in uselib_incs:
includes.append(uselib_inc)
root = bld.path.abspath().replace('\\', '/')
pref = os.path.commonprefix([root, userlib_inc])
if pref == root:
node = bld.root.find_dir(include)
if node:
includes.append(node.path_from(gen.path).replace('/', '\\'))
incluses.append(userlib_inc)
return includes
def get_compiler_defines(self, gen):