Merge topic 'cpack-one-component-only'

0ffd3534 CPack single component packaging
This commit is contained in:
Brad King 2015-04-06 09:11:34 -04:00 committed by CMake Topic Stage
commit 0e6b00ee49
2 changed files with 4 additions and 2 deletions

View File

@ -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()));
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -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")