aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.py8
-rw-r--r--vs2010backend.py2
2 files changed, 8 insertions, 2 deletions
diff --git a/build.py b/build.py
index 6d6c013..e838b67 100644
--- a/build.py
+++ b/build.py
@@ -170,7 +170,13 @@ class BuildTarget():
self.validate_sources()
def get_id(self):
- return self.subproject + ':' + self.name + self.type_suffix()
+ # This ID must also be a valid file name on all OSs.
+ # It should also avoid shell metacharacters for obvious
+ # reasons.
+ base = self.name + self.type_suffix()
+ if self.subproject == '':
+ return base
+ return self.subproject + '@@' + base
def check_unknown_kwargs(self, kwargs):
# Override this method in derived classes that have more
diff --git a/vs2010backend.py b/vs2010backend.py
index e834584..c909c35 100644
--- a/vs2010backend.py
+++ b/vs2010backend.py
@@ -123,7 +123,7 @@ class Vs2010Backend(backends.Backend):
def generate_projects(self):
projlist = []
for name, target in self.build.targets.items():
- outdir = os.path.join(self.environment.get_build_dir(), target.subdir)
+ outdir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(target))
fname = name + '.vcxproj'
relname = os.path.join(target.subdir, fname)
projfile = os.path.join(outdir, fname)