summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-03-01 20:30:10 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-03-01 20:30:10 (GMT)
commitc55ce31c6e8a8e05333fcd8b159939aeef7f8aff (patch)
treea8e89e531326fdda5e230739e11f6f52bc573101 /Source
parentc34b0eac257e4054804348476d1b5f9585fe58d1 (diff)
parent5b4cbdb45e1f0efb2c55b29a4ca2521f38e88f96 (diff)
downloadCMake-c55ce31c6e8a8e05333fcd8b159939aeef7f8aff.zip
CMake-c55ce31c6e8a8e05333fcd8b159939aeef7f8aff.tar.gz
CMake-c55ce31c6e8a8e05333fcd8b159939aeef7f8aff.tar.bz2
Merge topic 'CPackRPM-AvoidSpaceInName-Fixbug9932'
5b4cbdb CPackRPM Replace space in some CPACK_ vars (Fix bug 9932)
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackRPMGenerator.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx
index 2d675c1..cc50580 100644
--- a/Source/CPack/cmCPackRPMGenerator.cxx
+++ b/Source/CPack/cmCPackRPMGenerator.cxx
@@ -31,6 +31,21 @@ int cmCPackRPMGenerator::InitializeInternal()
{
this->SetOption("CPACK_SET_DESTDIR", "I_ON");
}
+ /* Replace space in CPACK_PACKAGE_NAME in order to avoid
+ * rpmbuild scream on unwanted space in filename issue
+ * Moreover RPM file do not usually embed space in filename
+ */
+ if (this->GetOption("CPACK_PACKAGE_NAME")) {
+ std::string packageName=this->GetOption("CPACK_PACKAGE_NAME");
+ cmSystemTools::ReplaceString(packageName," ","-");
+ this->SetOption("CPACK_PACKAGE_NAME",packageName.c_str());
+ }
+ /* same for CPACK_PACKAGE_FILE_NAME */
+ if (this->GetOption("CPACK_PACKAGE_FILE_NAME")) {
+ std::string packageName=this->GetOption("CPACK_PACKAGE_FILE_NAME");
+ cmSystemTools::ReplaceString(packageName," ","-");
+ this->SetOption("CPACK_PACKAGE_FILE_NAME",packageName.c_str());
+ }
return this->Superclass::InitializeInternal();
}