Skip to content

cpack wix: add Cygwin support

Stephen Sorley requested to merge stephen-sorley/cmake:cpack-wix-cygwin into master

This patch allows the WiX toolset to be called by CPack when running under Cygwin.

For our use case, we typically build windows software remotely on our build server by ssh'ing into Cygwin, and then cross-compiling for Windows using the MinGW packages from Cygwin's repository. This patch allows us to package the resulting windows binaries from inside Cygwin as well.

Note that WiX does not need to be installed in any special way to be usable from Cygwin - the WIX environment variable from an installation of WiX is visible from within Cygwin. This patch makes the following two changes:

(1) Adds calls to libuuid to generate GUID's when not running directly on Windows. (2) Converts cygwin file paths to native Windows paths using the 'cygpath' utility.

For Cygwin, the libuuid DLL is a system component that's installed by default, so it does not need to be distributed with CMake. However, to enable WiX support when building CMake on Cygwin, you do need to have the libuuid-dev package installed (WiX will be disabled, otherwise).

Merge request reports