CPack: Fix single component packaging

Refine logic added in commit 0ffd3534 (CPack single component packaging,
2015-04-02).  Component packaging should be enabled if either at least
one component or one group is set and should not require both.
This commit is contained in:
Raffi Enficiaud 2015-04-16 22:14:51 +02:00 committed by Brad King
parent 0ffd35340e
commit ed0b063085
1 changed files with 2 additions and 2 deletions

View File

@ -1501,8 +1501,8 @@ bool cmCPackGenerator::WantsComponentInstallation() const
{
return (!IsOn("CPACK_MONOLITHIC_INSTALL")
&& SupportsComponentInstallation()
// check that package at least has components
&& !(this->ComponentGroups.empty() || this->Components.empty()));
// check that we have at least one group or component
&& (!this->ComponentGroups.empty() || !this->Components.empty()));
}
//----------------------------------------------------------------------