summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPackWIX.cmake9
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx4
2 files changed, 13 insertions, 0 deletions
diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake
index 4f57efa..fce25f0 100644
--- a/Modules/CPackWIX.cmake
+++ b/Modules/CPackWIX.cmake
@@ -93,6 +93,15 @@
# http://wix.sourceforge.net/manual-wix3/WixUI_localization.htm
#
##end
+##variable
+# CPACK_WIX_TEMPLATE - Template file for WiX generation
+#
+# If this variable is set, the specified template will be used to generate the WiX wxs file.
+# This should be used if further customization of the output is required.
+#
+# If this variable is not set, the default MSI template included with CMake will be used.
+#
+##end
#=============================================================================
# Copyright 2012 Kitware, Inc.
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 373a14d..cc9dec7 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -451,6 +451,10 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
directoryDefinitions.EndElement();
std::string wixTemplate = FindTemplate("WIX.template.in");
+ if(GetOption("CPACK_WIX_TEMPLATE") != 0)
+ {
+ wixTemplate = GetOption("CPACK_WIX_TEMPLATE");
+ }
if(wixTemplate.empty())
{
cmCPackLogger(cmCPackLog::LOG_ERROR,