Commit a22f9967 authored by Andrej Bosik's avatar Andrej Bosik Committed by Brad King
Browse files

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
parent 1d4ab06a
......@@ -141,6 +141,7 @@ Properties on Targets
Set the WinCE project ``RemoteDirectory`` in ``DeploymentTool`` and
``RemoteExecutable`` in ``DebuggerTool`` in ``.vcproj`` files generated
by the :generator:`Visual Studio 9 2008` and :generator:`Visual Studio 8 2005`
generators. This is useful when you want to debug on remote WinCE device.
For example:
.. code-block:: cmake
<DeploymentTool RemoteDirectory="\FlashStorage" ... />
<DebuggerTool RemoteExecutable="\FlashStorage\target_file" ... />
* The :generator:`Visual Studio 9 2008` and :generator:`Visual Studio 8 2005`
generators learned to generate the remote directory for WinCE project
deployment and debugger settings. See the
:prop_tgt:`DEPLOYMENT_REMOTE_DIRECTORY` target property.
......@@ -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\tRemoteDirectory=\"" << this->EscapeForXML(dir) << "\"\n"
std::string const exe = dir + std::string("\\") + target->GetFullName();
fout <<
"\t\t\t\tRemoteExecutable=\"" << this->EscapeForXML(exe) << "\"\n"
......@@ -92,6 +92,9 @@ private:
const std::string& libName);
void OutputBuildTool(std::ostream& fout, const std::string& configName,
cmGeneratorTarget* t, const Options& targetOptions);
void OutputDeploymentDebuggerTool(std::ostream& fout,
std::string const& config,
cmGeneratorTarget* target);
void OutputLibraryDirectories(std::ostream& fout,
std::vector<std::string> const& dirs);
void WriteProjectSCC(std::ostream& fout, cmGeneratorTarget *target);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment