diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 05196fff1..5da4e94fd 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -270,9 +270,12 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source, static_cast (this->GlobalGenerator)->GetConfigurations(); this->WriteString("BuildFileStream ) << - cmSystemTools::RelativePath(this->Makefile->GetCurrentOutputDirectory(), - sourcePath.c_str()) << "\">\n"; + std::string path = + cmSystemTools::RelativePath( + this->Makefile->GetCurrentOutputDirectory(), + sourcePath.c_str()); + this->ConvertToWindowsSlash(path); + (*this->BuildFileStream ) << path << "\">\n"; for(std::vector::iterator i = configs->begin(); i != configs->end(); ++i) {