diff options
author | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2016-05-23 12:32:22 (GMT) |
---|---|---|
committer | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2016-05-23 16:09:03 (GMT) |
commit | 06ca7795f4c0a7503d98e856384f986a0047f811 (patch) | |
tree | 30ca6e8fa792d80a4fa496f0541417c20c988300 | |
parent | 222fa595cd6106cb6a4948eedeb55b0314338dff (diff) | |
download | CMake-06ca7795f4c0a7503d98e856384f986a0047f811.zip CMake-06ca7795f4c0a7503d98e856384f986a0047f811.tar.gz CMake-06ca7795f4c0a7503d98e856384f986a0047f811.tar.bz2 |
CPackIFW: Command cpack_ifw_configure_component learned ESSENTIAL option
-rw-r--r-- | Modules/CPackIFW.cmake | 7 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWPackage.cxx | 11 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWPackage.h | 3 |
3 files changed, 19 insertions, 2 deletions
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 2e82f7e..083fc28 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -189,7 +189,7 @@ # # :: # -# cpack_ifw_configure_component(<compname> [COMMON] +# cpack_ifw_configure_component(<compname> [COMMON] [ESSENTIAL] # [NAME <name>] # [VERSION <version>] # [SCRIPT <script>] @@ -202,6 +202,9 @@ # ``COMMON`` if set, then the component will be packaged and installed as part # of a group to which it belongs. # +# ``ESSENTIAL`` if set, then the package manager stays disabled until that +# component is updated. +# # ``NAME`` is used to create domain-like identification for this component. # By default used origin component name. # @@ -545,7 +548,7 @@ macro(cpack_ifw_configure_component compname) string(TOUPPER ${compname} _CPACK_IFWCOMP_UNAME) - set(_IFW_OPT COMMON) + set(_IFW_OPT COMMON ESSENTIAL) set(_IFW_ARGS NAME VERSION SCRIPT PRIORITY) set(_IFW_MULTI_ARGS DEPENDS LICENSES) cmake_parse_arguments(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN}) diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx index 5bc1a0b..df612e5 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.cxx +++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx @@ -146,6 +146,7 @@ void cmCPackIFWPackage::DefaultConfiguration() Licenses.clear(); SortingPriority = ""; Default = ""; + Essential = ""; Virtual = ""; ForcedInstallation = ""; } @@ -267,6 +268,11 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component) // Default Default = component->IsDisabledByDefault ? "false" : "true"; + // Essential + if (this->IsOn(prefix + "ESSENTIAL")) { + Essential = "true"; + } + // Virtual Virtual = component->IsHidden ? "true" : ""; @@ -452,6 +458,11 @@ void cmCPackIFWPackage::GeneratePackageFile() xout.Element("Default", Default); } + // Essential + if (!Essential.empty()) { + xout.Element("Essential", Essential); + } + // Priority if (!SortingPriority.empty()) { xout.Element("SortingPriority", SortingPriority); diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h index 8a566cb..55b07ec 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.h +++ b/Source/CPack/IFW/cmCPackIFWPackage.h @@ -101,6 +101,9 @@ public: /// Set to true to preselect the component in the installer std::string Default; + /// Marks the package as essential to force a restart of the MaintenanceTool + std::string Essential; + /// Set to true to hide the component from the installer std::string Virtual; |