|
|
@@ -171,7 +171,8 @@ int cmCPackGenerator::InstallProject()
|
|
|
std::string bareTempInstallDirectory
|
|
|
= this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
|
|
|
std::string tempInstallDirectoryStr = bareTempInstallDirectory;
|
|
|
- bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR"));
|
|
|
+ bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR"))
|
|
|
+ | cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"));
|
|
|
if (!setDestDir)
|
|
|
{
|
|
|
tempInstallDirectoryStr += this->GetPackagingInstallPrefix();
|
|
|
@@ -414,7 +415,8 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
|
|
|
// underneath the tempInstallDirectory. The value of the project's
|
|
|
// CMAKE_INSTALL_PREFIX is sent in here as the value of the
|
|
|
// CPACK_INSTALL_PREFIX variable.
|
|
|
- std::string dir;
|
|
|
+
|
|
|
+ std::string dir;
|
|
|
if (this->GetOption("CPACK_INSTALL_PREFIX"))
|
|
|
{
|
|
|
dir += this->GetOption("CPACK_INSTALL_PREFIX");
|
|
|
@@ -643,6 +645,16 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|
|
// value of the project's CMAKE_INSTALL_PREFIX is sent in here as
|
|
|
// the value of the CPACK_INSTALL_PREFIX variable.
|
|
|
//
|
|
|
+ // If DESTDIR has been 'internally set ON' this means that
|
|
|
+ // the underlying CPack specific generator did ask for that
|
|
|
+ // In this case we may overrode CPACK_INSTALL_PREFIX with
|
|
|
+ // CPACK_PACKAGING_INSTALL_PREFIX
|
|
|
+ // I know this is tricky and awkward but it's the price for
|
|
|
+ // CPACK_SET_DESTDIR backward compatibility.
|
|
|
+ if (cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR")))
|
|
|
+ {
|
|
|
+ this->SetOption("CPACK_INSTALL_PREFIX",this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"));
|
|
|
+ }
|
|
|
std::string dir;
|
|
|
if (this->GetOption("CPACK_INSTALL_PREFIX"))
|
|
|
{
|