|
|
@@ -270,6 +270,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
|
|
|
|
|
|
void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
|
|
std::ostream& fout,
|
|
|
+ cmLocalGenerator* root,
|
|
|
OrderedTargetDependSet const& projectTargets)
|
|
|
{
|
|
|
for(OrderedTargetDependSet::const_iterator tt =
|
|
|
@@ -296,6 +297,12 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
|
|
{
|
|
|
cmMakefile* tmf = target->GetMakefile();
|
|
|
std::string dir = tmf->GetStartOutputDirectory();
|
|
|
+ dir = root->Convert(dir.c_str(),
|
|
|
+ cmLocalGenerator::START_OUTPUT);
|
|
|
+ if(dir == ".")
|
|
|
+ {
|
|
|
+ dir = ""; // msbuild cannot handle ".\" prefix
|
|
|
+ }
|
|
|
this->WriteProject(fout, vcprojName, dir.c_str(),
|
|
|
*target);
|
|
|
written = true;
|
|
|
@@ -385,7 +392,7 @@ void cmGlobalVisualStudio7Generator
|
|
|
this->GetTargetSets(projectTargets, originalTargets, root, generators);
|
|
|
OrderedTargetDependSet orderedProjectTargets(projectTargets);
|
|
|
|
|
|
- this->WriteTargetsToSolution(fout, orderedProjectTargets);
|
|
|
+ this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
|
|
|
|
|
|
bool useFolderProperty = this->UseFolderProperty();
|
|
|
if (useFolderProperty)
|
|
|
@@ -511,8 +518,8 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
|
|
|
|
|
|
fout << project
|
|
|
<< dspname << "\", \""
|
|
|
- << this->ConvertToSolutionPath(dir)
|
|
|
- << "\\" << dspname << ext << "\", \"{"
|
|
|
+ << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
|
|
|
+ << dspname << ext << "\", \"{"
|
|
|
<< this->GetGUID(dspname) << "}\"\nEndProject\n";
|
|
|
|
|
|
UtilityDependsMap::iterator ui = this->UtilityDepends.find(&target);
|
|
|
@@ -521,8 +528,8 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
|
|
|
const char* uname = ui->second.c_str();
|
|
|
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
|
|
|
<< uname << "\", \""
|
|
|
- << this->ConvertToSolutionPath(dir)
|
|
|
- << "\\" << uname << ".vcproj" << "\", \"{"
|
|
|
+ << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
|
|
|
+ << uname << ".vcproj" << "\", \"{"
|
|
|
<< this->GetGUID(uname) << "}\"\n"
|
|
|
<< "EndProject\n";
|
|
|
}
|