summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGenerator.cxx
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2011-04-17 15:12:38 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2011-04-17 15:12:38 (GMT)
commitd3fd945900f1fc09816cb59745c2fb241fa9b36c (patch)
treed5776be634c94ea6d17a538ef1ed3ed1c99ff970 /Source/CPack/cmCPackGenerator.cxx
parent046b615bc87eb339d185627a82bab99d27c071e6 (diff)
downloadCMake-d3fd945900f1fc09816cb59745c2fb241fa9b36c.zip
CMake-d3fd945900f1fc09816cb59745c2fb241fa9b36c.tar.gz
CMake-d3fd945900f1fc09816cb59745c2fb241fa9b36c.tar.bz2
CPackRPM Fix #12096: handle absolute install path with component install
Diffstat (limited to 'Source/CPack/cmCPackGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index c8a77d1..7e5b26d 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -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 )
{