I am trying to add the functionality to uninstall a previous version before installing a new version of a certain installer. The CPackWIX documentation page (https://cmake.org/cmake/help/v3.3/module/CPackWIX.html) is not clear about how to use CPACK_WIX_PROPERTY_PROPERTY or CPACK_WIX_PATCH_FILE to modify CPack generated WiX XMLs. Let's assume the following doesn't already exist in the CPack generated XMLs. Is there a way to add the following to them using a patch file?
<InstallExecuteSequence>
<RemoveExistingProducts Before='InstallFinalize' />
</InstallExecuteSequence>
The documentation shows how one could add an environment element to a component. Is there a way we can do the above extending that logic?