diff options
author | Max Gaukler <development@maxgaukler.de> | 2023-11-07 21:02:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-16 19:15:38 (GMT) |
commit | 60661f67701d890b6c8200261953d01b66462158 (patch) | |
tree | 42c9b7ffe9d17c1f9db03915cc17d5016110aa02 /Modules/Internal | |
parent | f22ecbacb6824881e755b19f498607793e19969c (diff) | |
download | CMake-60661f67701d890b6c8200261953d01b66462158.zip CMake-60661f67701d890b6c8200261953d01b66462158.tar.gz CMake-60661f67701d890b6c8200261953d01b66462158.tar.bz2 |
CPack/WiX: Make InstallScope configurable
Add a new `CPACK_WIX_INSTALL_SCOPE` variable to set the `InstallScope`
when using the default WiX template. Set the default to the bug-free
value `perMachine`.
Fixes: #20962
Diffstat (limited to 'Modules/Internal')
-rw-r--r-- | Modules/Internal/CPack/CPackWIX.cmake | 4 | ||||
-rw-r--r-- | Modules/Internal/CPack/WIX.template.in | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Modules/Internal/CPack/CPackWIX.cmake b/Modules/Internal/CPack/CPackWIX.cmake index d1875f2..5fe772e 100644 --- a/Modules/Internal/CPack/CPackWIX.cmake +++ b/Modules/Internal/CPack/CPackWIX.cmake @@ -18,3 +18,7 @@ find_program(CPACK_WIX_LIGHT_EXECUTABLE light if(NOT CPACK_WIX_LIGHT_EXECUTABLE) message(FATAL_ERROR "Could not find the WiX light executable.") endif() + +if(NOT DEFINED CPACK_WIX_INSTALL_SCOPE) + set(CPACK_WIX_INSTALL_SCOPE "perMachine") +endif() diff --git a/Modules/Internal/CPack/WIX.template.in b/Modules/Internal/CPack/WIX.template.in index c0bf935..fdd8278 100644 --- a/Modules/Internal/CPack/WIX.template.in +++ b/Modules/Internal/CPack/WIX.template.in @@ -12,7 +12,12 @@ Manufacturer="$(var.CPACK_PACKAGE_VENDOR)" UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)"> + + <?if $(var.CPACK_WIX_INSTALL_SCOPE) = "NONE" ?> <Package InstallerVersion="301" Compressed="yes"/> + <?else?> + <Package InstallerVersion="301" Compressed="yes" InstallScope="$(var.CPACK_WIX_INSTALL_SCOPE)"/> + <?endif?> <Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/> |