mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
CPack/WIX: Improve formatting of CPACK_WIX_CUSTOM_XMLNS expansion
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<?include "cpack_variables.wxi"?>
|
||||
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" @CPACK_WIX_CUSTOM_XMLNS_EXPANDED@
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"@CPACK_WIX_CUSTOM_XMLNS_EXPANDED@
|
||||
RequiredVersion="3.6.3303.0">
|
||||
|
||||
<Product Id="$(var.CPACK_WIX_PRODUCT_GUID)"
|
||||
|
||||
@@ -1184,12 +1184,7 @@ void cmCPackWIXGenerator::CollectExtensions(std::string const& variableName,
|
||||
void cmCPackWIXGenerator::CollectXmlNamespaces(std::string const& variableName,
|
||||
xmlns_map_t& namespaces)
|
||||
{
|
||||
cmValue variableContent = GetOption(variableName);
|
||||
if (!variableContent) {
|
||||
return;
|
||||
}
|
||||
|
||||
cmList list{ variableContent };
|
||||
cmList list{ GetOption(variableName) };
|
||||
for (std::string const& str : list) {
|
||||
auto pos = str.find('=');
|
||||
if (pos != std::string::npos) {
|
||||
@@ -1203,12 +1198,12 @@ void cmCPackWIXGenerator::CollectXmlNamespaces(std::string const& variableName,
|
||||
<< str << '"' << std::endl);
|
||||
}
|
||||
}
|
||||
std::ostringstream oss;
|
||||
std::string xmlns;
|
||||
for (auto& ns : namespaces) {
|
||||
oss << " xmlns:" << ns.first << "=\""
|
||||
<< cmWIXSourceWriter::EscapeAttributeValue(ns.second) << '"';
|
||||
xmlns = cmStrCat(xmlns, "\n xmlns:", ns.first, "=\"",
|
||||
cmWIXSourceWriter::EscapeAttributeValue(ns.second), '"');
|
||||
}
|
||||
SetOption("CPACK_WIX_CUSTOM_XMLNS_EXPANDED", oss.str());
|
||||
SetOption("CPACK_WIX_CUSTOM_XMLNS_EXPANDED", xmlns);
|
||||
}
|
||||
|
||||
void cmCPackWIXGenerator::AddCustomFlags(std::string const& variableName,
|
||||
|
||||
Reference in New Issue
Block a user