summaryrefslogtreecommitdiffstats
path: root/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx')
-rw-r--r--Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx
index a7a0648..78c2208 100644
--- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmWIXFeaturesSourceWriter.h"
+#include "cmStringAlgorithms.h"
+
cmWIXFeaturesSourceWriter::cmWIXFeaturesSourceWriter(
cmCPackLog* logger, std::string const& filename, GuidType componentGuidType)
: cmWIXSourceWriter(logger, filename, componentGuidType)
@@ -17,7 +19,7 @@ void cmWIXFeaturesSourceWriter::CreateCMakePackageRegistryEntry(
AddAttribute("Guid", CreateGuidFromComponentId("CM_PACKAGE_REGISTRY"));
std::string registryKey =
- std::string("Software\\Kitware\\CMake\\Packages\\") + package;
+ cmStrCat(R"(Software\Kitware\CMake\Packages\)", package);
BeginElement("RegistryValue");
AddAttribute("Root", "HKLM");
@@ -35,7 +37,7 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponentGroup(
cmCPackComponentGroup const& group, cmWIXPatch& patch)
{
BeginElement("Feature");
- AddAttribute("Id", "CM_G_" + group.Name);
+ AddAttribute("Id", cmStrCat("CM_G_", group.Name));
if (group.IsExpandedByDefault) {
AddAttribute("Display", "expand");
@@ -44,7 +46,7 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponentGroup(
AddAttributeUnlessEmpty("Title", group.DisplayName);
AddAttributeUnlessEmpty("Description", group.Description);
- patch.ApplyFragment("CM_G_" + group.Name, *this);
+ patch.ApplyFragment(cmStrCat("CM_G_", group.Name), *this);
for (cmCPackComponentGroup* subgroup : group.Subgroups) {
EmitFeatureForComponentGroup(*subgroup, patch);
@@ -61,7 +63,7 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponent(
cmCPackComponent const& component, cmWIXPatch& patch)
{
BeginElement("Feature");
- AddAttribute("Id", "CM_C_" + component.Name);
+ AddAttribute("Id", cmStrCat("CM_C_", component.Name));
AddAttributeUnlessEmpty("Title", component.DisplayName);
AddAttributeUnlessEmpty("Description", component.Description);
@@ -78,7 +80,7 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponent(
AddAttribute("Level", "2");
}
- patch.ApplyFragment("CM_C_" + component.Name, *this);
+ patch.ApplyFragment(cmStrCat("CM_C_", component.Name), *this);
EndElement("Feature");
}