summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx27
-rw-r--r--Tests/CPackComponents/CMakeLists.txt8
-rw-r--r--Tests/CPackComponents/Issue 7470.html9
3 files changed, 33 insertions, 11 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 460ede9..b90348d 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -793,20 +793,25 @@ CreateComponentDescription(cmCPackComponent *component,
macrosOut << " IntCmp $" << component->Name << "_was_installed 0 noremove_"
<< component->Name << "\n";
std::vector<std::string>::iterator pathIt;
- for (pathIt = component->Files.begin();
- pathIt != component->Files.end();
- ++pathIt)
- {
- macrosOut << " Delete \"$INSTDIR\\"
- << cmSystemTools::ConvertToWindowsOutputPath(pathIt->c_str())
+ std::string path;
+ for (pathIt = component->Files.begin();
+ pathIt != component->Files.end();
+ ++pathIt)
+ {
+ path = *pathIt;
+ cmSystemTools::ReplaceString(path, "/", "\\");
+ macrosOut << " Delete \"$INSTDIR\\"
+ << path.c_str()
<< "\"\n";
}
- for (pathIt = component->Directories.begin();
- pathIt != component->Directories.end();
- ++pathIt)
+ for (pathIt = component->Directories.begin();
+ pathIt != component->Directories.end();
+ ++pathIt)
{
- macrosOut << " RMDir \"$INSTDIR\\"
- << cmSystemTools::ConvertToWindowsOutputPath(pathIt->c_str())
+ path = *pathIt;
+ cmSystemTools::ReplaceString(path, "/", "\\");
+ macrosOut << " RMDir \"$INSTDIR\\"
+ << path.c_str()
<< "\"\n";
}
macrosOut << " noremove_" << component->Name << ":\n";
diff --git a/Tests/CPackComponents/CMakeLists.txt b/Tests/CPackComponents/CMakeLists.txt
index d41faa0..862d139 100644
--- a/Tests/CPackComponents/CMakeLists.txt
+++ b/Tests/CPackComponents/CMakeLists.txt
@@ -39,6 +39,9 @@ install(TARGETS mylibapp
install(FILES mylib.h
DESTINATION include
COMPONENT headers)
+install(FILES "Issue 7470.html"
+ DESTINATION docs
+ COMPONENT documentation)
if(mylib_install_to_absolute_path)
install(FILES mylib.cpp
@@ -77,6 +80,11 @@ cpack_add_component(applications
DESCRIPTION "An extremely useful application that makes use of MyLib"
GROUP Runtime
INSTALL_TYPES Full)
+cpack_add_component(documentation
+ DISPLAY_NAME "MyLib Documentation"
+ DESCRIPTION "The extensive suite of MyLib Application documentation files"
+ GROUP Runtime
+ INSTALL_TYPES Full)
cpack_add_component(libraries
DISPLAY_NAME "Libraries"
DESCRIPTION "Static libraries used to build programs with MyLib"
diff --git a/Tests/CPackComponents/Issue 7470.html b/Tests/CPackComponents/Issue 7470.html
new file mode 100644
index 0000000..12df2c8
--- /dev/null
+++ b/Tests/CPackComponents/Issue 7470.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+The install rule for this file demonstrates the problem described in<br/>
+CMake issue #7470:<br/>
+<br/>
+<a href="http://public.kitware.com/Bug/view.php?id=7470">
+http://public.kitware.com/Bug/view.php?id=7470</a><br/>
+</body>
+</html>