VS: Optionally generate remote directory for WinCE projects

Teach the VS 2008 and 2005 generators to set the `RemoteDirectory`
in `DeploymentTool` and the `RemoteExecutable` in `DebuggerTool`.
Use a `DEPLOYMENT_REMOTE_DIRECTORY` target property to specify the
value.
This commit is contained in:
Andrej Bosik
2016-02-15 13:02:50 +01:00
committed by Brad King
parent 1d4ab06a70
commit a22f996725
5 changed files with 55 additions and 0 deletions
+26
View File
@@ -1012,6 +1012,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
this->OutputTargetRules(fout, configName, target, libName);
this->OutputBuildTool(fout, configName, target, targetOptions);
this->OutputDeploymentDebuggerTool(fout, configName, target);
fout << "\t\t</Configuration>\n";
}
@@ -1374,6 +1375,31 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
}
}
void cmLocalVisualStudio7Generator::OutputDeploymentDebuggerTool(
std::ostream& fout, std::string const& config, cmGeneratorTarget* target)
{
if (this->WindowsCEProject)
{
if (const char* dir = target->GetProperty("DEPLOYMENT_REMOTE_DIRECTORY"))
{
fout <<
"\t\t\t<DeploymentTool\n"
"\t\t\t\tForceDirty=\"-1\"\n"
"\t\t\t\tRemoteDirectory=\"" << this->EscapeForXML(dir) << "\"\n"
"\t\t\t\tRegisterOutput=\"0\"\n"
"\t\t\t\tAdditionalFiles=\"\"/>\n"
;
std::string const exe = dir + std::string("\\") + target->GetFullName();
fout <<
"\t\t\t<DebuggerTool\n"
"\t\t\t\tRemoteExecutable=\"" << this->EscapeForXML(exe) << "\"\n"
"\t\t\t\tArguments=\"\"\n"
"\t\t\t/>\n"
;
}
}
}
//----------------------------------------------------------------------------
void
cmLocalVisualStudio7Generator