I tried to use the CPack wix generator. Not knowing much about wix, I went to the wix toolset website and followed the instructions to install it.
CPack then fails with some message about “not finding
candle”. It seems to me that CMake/CPack only supports wix v3, although this is not mentioned anywhere (according to the wix documentation, wix is now only a single executable).
So until CPack is updated for v4, make sure you install/use v3.