# CPack wix and required components group

**URL:** <https://discourse.cmake.org/t/cpack-wix-and-required-components-group/5822>\
**Category:** Code\
**Tags:** os:windows, comp:msvc, gen:vs\
**Created:** [June 8, 2022, 11:02am UTC](https://discourse.cmake.org/t/cpack-wix-and-required-components-group/5822 "2022-06-08T11:02:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr\_ppetrov](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dr_ppetrov/32/2000_2.png) [@dr\_ppetrov](https://discourse.cmake.org/u/dr_ppetrov)\
**Post date:** [June 8, 2022, 11:02am UTC](https://discourse.cmake.org/t/cpack-wix-and-required-components-group/5822/1 "2022-06-08T11:02:09Z")

</div>

I am using cmake/cpack with Wix to generate .msi installers for windows. Recently I introduced optional components are part of the installer. However, I faced quite a limitation, while the call to cpack\_add\_component allows for REQUIRED tag the call to cpack\_add\_component\_group does not. This leads to the peculiar situation that a component is marked as required but not the group it belongs to. The final result is broken installer where required components can be omitted.

Did I miss something?
