Merge topic 'CPackRPM-fix12096'

d3fd945 CPackRPM  Fix #12096: handle absolute install path with component install
This commit is contained in:
Brad King
2011-04-19 14:08:13 -04:00
committed by CMake Topic Stage
2 changed files with 36 additions and 0 deletions
+22
View File
@@ -867,6 +867,28 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Got some ABSOLUTE DESTINATION FILES: "
<< absoluteDestFiles << std::endl);
// define component specific var
if (componentInstall)
{
std::string absoluteDestFileComponent =
std::string("CPACK_ABSOLUTE_DESTINATION_FILES")
+ "_" + GetComponentInstallDirNameSuffix(installComponent);
if (NULL != this->GetOption(absoluteDestFileComponent.c_str()))
{
std::string absoluteDestFilesListComponent =
this->GetOption(absoluteDestFileComponent.c_str());
absoluteDestFilesListComponent +=";";
absoluteDestFilesListComponent +=
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
this->SetOption(absoluteDestFileComponent.c_str(),
absoluteDestFilesListComponent.c_str());
}
else
{
this->SetOption(absoluteDestFileComponent.c_str(),
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"));
}
}
}
if ( cmSystemTools::GetErrorOccuredFlag() || !res )
{