CPack single component packaging
RPM, DEB and archive packages were not created in cases when CPACK_<generator>_COMPONENT_INSTALL was set to ON and a single component existed. Patch also changes CPackRPM test to implicitly test for this case.
This commit is contained in:
parent
a3e2de3a31
commit
0ffd35340e
|
@ -1499,7 +1499,10 @@ bool cmCPackGenerator::SupportsComponentInstallation() const
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool cmCPackGenerator::WantsComponentInstallation() const
|
bool cmCPackGenerator::WantsComponentInstallation() const
|
||||||
{
|
{
|
||||||
return (!IsOn("CPACK_MONOLITHIC_INSTALL") & SupportsComponentInstallation());
|
return (!IsOn("CPACK_MONOLITHIC_INSTALL")
|
||||||
|
&& SupportsComponentInstallation()
|
||||||
|
// check that package at least has components
|
||||||
|
&& !(this->ComponentGroups.empty() || this->Components.empty()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
install(FILES CMakeLists.txt DESTINATION /not_relocatable COMPONENT static)
|
install(FILES CMakeLists.txt DESTINATION /not_relocatable COMPONENT static)
|
||||||
install(FILES CMakeLists.txt DESTINATION relocatable COMPONENT relocatable)
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_RELOCATABLE TRUE)
|
set(CPACK_PACKAGE_RELOCATABLE TRUE)
|
||||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt")
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt")
|
||||||
|
|
Loading…
Reference in New Issue