summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2015-04-07 20:00:57 +0800
committerBernard Xiong <[email protected]>2015-04-07 20:00:57 +0800
commita3919b90fe655ae25f0f932fc10e445960349dc2 (patch)
treeabde50a443b213e76c54d86588b927423d1724c6
parent8ab28da02c72829d63c302674ea344a8162a7761 (diff)
parent2eaaa2cb0562a619d47cecd521ecc9659f93920d (diff)
Merge pull request #450 from www220/master
生成vs文件时将区分编译目录,防止同名的源文件不能编译的情况
-rw-r--r--tools/vs2012.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/vs2012.py b/tools/vs2012.py
index 14da3dcace..6badef8ad9 100644
--- a/tools/vs2012.py
+++ b/tools/vs2012.py
@@ -99,11 +99,14 @@ def VS_add_ItemGroup(parent, file_type, files, project_path):
name = fn.name
path = os.path.dirname(fn.abspath)
- path = _make_path_relative(project_path, path)
+ objpath = path = _make_path_relative(project_path, path)
path = os.path.join(path, name)
File = SubElement(ItemGroup, item_tag)
File.set('Include', path.decode(fs_encoding))
+ if file_type == 'C' :
+ ObjName = SubElement(File, 'ObjectFileName')
+ ObjName.text = ''.join('$(IntDir)'+objpath+'\\')
def VS_add_HeadFiles(program, elem, project_path):
building.source_ext = []