diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2015-10-12 19:53:08 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2015-10-12 19:53:08 (GMT) |
commit | 5a266095ee778fb700c067c55ff0b59777a72c50 (patch) | |
tree | 5b714661965f0787330de044fc4e196f4b54b90f /Source/CPack/WiX/cmWIXSourceWriter.cxx | |
parent | e5fb30fb5bdff2913cc9382649984da89e882b25 (diff) | |
download | CMake-5a266095ee778fb700c067c55ff0b59777a72c50.zip CMake-5a266095ee778fb700c067c55ff0b59777a72c50.tar.gz CMake-5a266095ee778fb700c067c55ff0b59777a72c50.tar.bz2 |
CPackWIX: Handle text nodes in XML patch content
Diffstat (limited to 'Source/CPack/WiX/cmWIXSourceWriter.cxx')
-rw-r--r-- | Source/CPack/WiX/cmWIXSourceWriter.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx index 8d38e9b..63acb27 100644 --- a/Source/CPack/WiX/cmWIXSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx @@ -102,6 +102,25 @@ void cmWIXSourceWriter::EndElement(std::string const& name) State = DEFAULT; } +void cmWIXSourceWriter::AddTextNode(std::string const& text) +{ + if(State == BEGIN) + { + File << ">"; + } + + if(Elements.empty()) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "can not add text without open WiX element in '" << + SourceFilename << "'" << std::endl); + return; + } + + File << this->EscapeAttributeValue(text); + State = DEFAULT; +} + void cmWIXSourceWriter::AddProcessingInstruction( std::string const& target, std::string const& content) { |