diff options
| author | LiuKang <[email protected]> | 2022-03-20 10:31:21 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-20 10:31:21 +0800 |
| commit | 4e1b1751383207dc44c86e2fd3e6893dc50d0d48 (patch) | |
| tree | 5843a240e10420f6c65084c18340af644ddc68b9 /tools/vsc.py | |
| parent | 0c82e033dc4474cafa6a702489fe0c1f484b1357 (diff) | |
[update] 通过 SCons生成 CMakefile.txt 使用相对路径 (#5677)
* [update] 通过 SCons生成 CMakefile.txt 使用相对路径
* [update] 通过 SCons生成 VSC 使用相对路径
Diffstat (limited to 'tools/vsc.py')
| -rw-r--r-- | tools/vsc.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/vsc.py b/tools/vsc.py index 99a49789b7..5eed941bc8 100644 --- a/tools/vsc.py +++ b/tools/vsc.py @@ -29,6 +29,9 @@ import os import json import utils import rtconfig +import rtconfig +from utils import _make_path_relative + def GenerateCFiles(env): """ @@ -56,9 +59,9 @@ def GenerateCFiles(env): includePath = [] for i in info['CPPPATH']: if i[0] == '\"' and i[len(i) - 2:len(i)] == '\",': - includePath.append(i[1:len(i) - 2]) + includePath.append(_make_path_relative(os.getcwd(), i[1:len(i) - 2])) else: - includePath.append(i) + includePath.append(_make_path_relative(os.getcwd(), i)) config_obj['includePath'] = includePath json_obj = {} |
