diff options
author | David Cole <david.cole@kitware.com> | 2012-12-05 15:31:05 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-12-05 15:31:05 (GMT) |
commit | 2bb2745fa8c260d12aca33d2e1fd26a92d3bfa6b (patch) | |
tree | 1199ee50029eb12ff9cb068f18006bbce29118cd /Modules/CPackWIX.cmake | |
parent | 799befa21535c828e22b2fce3c472ea2f1eabd3c (diff) | |
parent | a74bd470a4d01cfa06710d039bb435b02682ac3f (diff) | |
download | CMake-2bb2745fa8c260d12aca33d2e1fd26a92d3bfa6b.zip CMake-2bb2745fa8c260d12aca33d2e1fd26a92d3bfa6b.tar.gz CMake-2bb2745fa8c260d12aca33d2e1fd26a92d3bfa6b.tar.bz2 |
Merge topic 'fix-11575-add-wix-support-to-cpack'
a74bd47 CPack: Fix dashboard errors and warnings (#11575)
ad0f735 CPack: Fix dashboard warnings (#11575)
0729ad4 CPack: Fix dashboard errors (#11575)
85baac1 CPack: Add a WiX Generator (#11575)
Diffstat (limited to 'Modules/CPackWIX.cmake')
-rw-r--r-- | Modules/CPackWIX.cmake | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake new file mode 100644 index 0000000..f278953 --- /dev/null +++ b/Modules/CPackWIX.cmake @@ -0,0 +1,83 @@ +##section Variables specific to CPack WiX generator +##end +##module +# - CPack WiX generator specific options +# +# The following variables are specific to the installers built +# on Windows using WiX. +##end +##variable +# CPACK_WIX_UPGRADE_GUID - Upgrade GUID (Product/@UpgradeCode) +# +# Will be automatically generated unless explicitly provided. +# +# It should be explicitly set to a constant generated +# gloabally unique identifier (GUID) to allow your installers +# to replace existing installations that use the same GUID. +# +# You may for example explicitly set this variable in +# your CMakeLists.txt to the value that has been generated per default. +# You should not use GUIDs that you did not generate yourself or which may +# belong to other projects. +# +# A GUID shall have the following fixed length syntax: +# XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX +# (each X represents an uppercase hexadecimal digit) +##end +##variable +# CPACK_WIX_PRODUCT_GUID - Product GUID (Product/@Id) +# +# Will be automatically generated unless explicitly provided. +# +# If explicitly provided this will set the Product Id of your installer. +# +# The installer will abort if it detects a pre-existing installation that uses +# the same GUID. +# +# The GUID shall use the syntax described for CPACK_WIX_UPGRADE_GUID. +##end +##variable +# CPACK_WIX_LICENSE_RTF - RTF License File +# +# If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension +# it is used as-is. +# +# If CPACK_RESOURCE_FILE_LICENSE has an .txt extension +# it is implicitly converted to RTF by the WiX Generator. +# +# With CPACK_WIX_LICENSE_RTF you can override the license file used +# by the WiX Generator in case CPACK_RESOURCE_FILE_LICENSE +# is in an unsupported format or the .txt -> .rtf +# conversion does not work as expected. +##end + +#============================================================================= +# Copyright 2012 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +if(NOT CPACK_WIX_ROOT) + file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT) +endif() + +find_program(CPACK_WIX_CANDLE_EXECUTABLE candle + PATHS "${CPACK_WIX_ROOT}/bin") + +if(NOT CPACK_WIX_CANDLE_EXECUTABLE) + message(FATAL_ERROR "Could not find the WiX candle executable.") +endif() + +find_program(CPACK_WIX_LIGHT_EXECUTABLE light + PATHS "${CPACK_WIX_ROOT}/bin") + +if(NOT CPACK_WIX_LIGHT_EXECUTABLE) + message(FATAL_ERROR "Could not find the WiX light executable.") +endif() |