Merge topic 'wix-disabled-components'

ad453f05 CPackWIX: Support CPACK_COMPONENT_<compName>_DISABLED
6f108f84 CPackComponent: Document the *_HIDDEN and *_DISABLED variables
This commit is contained in:
Brad King 2016-08-01 14:59:53 -04:00 committed by CMake Topic Stage
commit 5ec03c93fc
3 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,6 @@
wix-disabled-components
-----------------------
* The CPack WIX generator now supports
:variable:`CPACK_COMPONENT_<compName>_DISABLED`.
This can be used to deselect a component from being installed by default.

View File

@ -75,9 +75,17 @@
# #
# The dependencies (list of components) on which this component depends. # The dependencies (list of components) on which this component depends.
# #
# .. variable:: CPACK_COMPONENT_<compName>_HIDDEN
#
# True if this component is hidden from the user.
#
# .. variable:: CPACK_COMPONENT_<compName>_REQUIRED # .. variable:: CPACK_COMPONENT_<compName>_REQUIRED
# #
# True is this component is required. # True if this component is required.
#
# .. variable:: CPACK_COMPONENT_<compName>_DISABLED
#
# True if this component is not selected to be installed by default.
# #
# .. command:: cpack_add_component # .. command:: cpack_add_component
# #

View File

@ -86,6 +86,10 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponent(
AddAttribute("Display", "hidden"); AddAttribute("Display", "hidden");
} }
if (component.IsDisabledByDefault) {
AddAttribute("Level", "2");
}
EndElement("Feature"); EndElement("Feature");
} }