From b771b2c3001e2137293de4197a8567e5cd9f6466 Mon Sep 17 00:00:00 2001 From: Frank Goyens Date: Fri, 29 Jun 2018 15:41:41 +0200 Subject: VS: extended OutputDeploymentDebuggerTool for AdditionalFiles The `OutputDeploymentDebuggerTool` function now also retrieves a target property that is used for setting the `AdditionalFiles` attribute of `DeploymentTool`. --- Source/cmLocalVisualStudio7Generator.cxx | 50 ++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 2c1a95c..c90c5b8 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1245,30 +1245,44 @@ static std::string cmLocalVisualStudio7GeneratorEscapeForXML( return ret; } +static std::string GetEscapedPropertyIfValueNotNULL(const char* propertyValue) +{ + return propertyValue == nullptr + ? std::string() + : cmLocalVisualStudio7GeneratorEscapeForXML(propertyValue); +} + void cmLocalVisualStudio7Generator::OutputDeploymentDebuggerTool( std::ostream& fout, std::string const& config, cmGeneratorTarget* target) { if (this->WindowsCEProject) { - if (const char* dir = target->GetProperty("DEPLOYMENT_REMOTE_DIRECTORY")) { - /* clang-format off */ - fout << - "\t\t\tEscapeForXML(dir) << "\"\n" - "\t\t\t\tRegisterOutput=\"0\"\n" - "\t\t\t\tAdditionalFiles=\"\"/>\n" - ; - /* clang-format on */ + const char* dir = target->GetProperty("DEPLOYMENT_REMOTE_DIRECTORY"); + const char* additionalFiles = + target->GetProperty("DEPLOYMENT_ADDITIONAL_FILES"); + + if (dir == nullptr && additionalFiles == nullptr) { + return; + } + + fout << "\t\t\t\n"; + + if (dir != nullptr) { std::string const exe = dir + std::string("\\") + target->GetFullName(config); - /* clang-format off */ - fout << - "\t\t\tEscapeForXML(exe) << "\"\n" - "\t\t\t\tArguments=\"\"\n" - "\t\t\t/>\n" - ; - /* clang-format on */ + + fout << "\t\t\tEscapeForXML(exe) + << "\"\n" + "\t\t\t\tArguments=\"\"\n" + "\t\t\t/>\n"; } } } -- cgit v0.12