mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-03 04:03:23 +03:00
CPackArchive restore default behavior and provide new variable.
CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY should be set by the user in order to get the toplevel directory included in the archive whenever a componentized archive is requested. This solves bug #12129 and keeps fully backward compatible behavior.
This commit is contained in:
1 parent
3cab24a974
commit
5d18851b25
2 files changed
+2
-2
No files matched your search
@@ -58,7 +58,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive,
|
||||
// Change to local toplevel
|
||||
cmSystemTools::ChangeDirectory(localToplevel.c_str());
|
||||
std::string filePrefix;
|
||||
if (this->IsOn("CPACK_INCLUDE_TOPLEVEL_DIRECTORY"))
|
||||
if (this->IsOn("CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY"))
|
||||
{
|
||||
filePrefix = this->GetOption("CPACK_PACKAGE_FILE_NAME");
|
||||
filePrefix += "/";
|
||||
|
||||
@@ -691,7 +691,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
// one install directory for each component.
|
||||
tempInstallDirectory +=
|
||||
GetComponentInstallDirNameSuffix(installComponent);
|
||||
if (this->IsOn("CPACK_INCLUDE_TOPLEVEL_DIRECTORY"))
|
||||
if (this->IsOn("CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY"))
|
||||
{
|
||||
tempInstallDirectory += "/";
|
||||
tempInstallDirectory += this->GetOption("CPACK_PACKAGE_FILE_NAME");
|
||||
|
||||
Reference in new issue
Block a user