From d2f4836f8ed1144aa6f2883953e9db658211afe2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 21 Mar 2024 16:40:27 -0400 Subject: [PATCH] CPack/WIX: Prepare to provide version-specific WiX templates Move our template for WiX Toolset v3 to a versioned location. --- Modules/Internal/CPack/{ => WIX-v3}/WIX.template.in | 0 Source/CPack/WiX/cmCPackWIXGenerator.cxx | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) rename Modules/Internal/CPack/{ => WIX-v3}/WIX.template.in (100%) diff --git a/Modules/Internal/CPack/WIX.template.in b/Modules/Internal/CPack/WIX-v3/WIX.template.in similarity index 100% rename from Modules/Internal/CPack/WIX.template.in rename to Modules/Internal/CPack/WIX-v3/WIX.template.in diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 3cc09daf38..9a1d335199 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -635,9 +635,13 @@ std::string cmCPackWIXGenerator::GetRootFolderId() const bool cmCPackWIXGenerator::GenerateMainSourceFileFromTemplate() { - std::string wixTemplate = FindTemplate("WIX.template.in"); + std::string wixTemplate; if (cmValue wixtpl = GetOption("CPACK_WIX_TEMPLATE")) { wixTemplate = *wixtpl; + } else { + cm::optional alt; + alt = "WIX-v3/"_s; + wixTemplate = FindTemplate("WIX.template.in"_s, alt); } if (wixTemplate.empty()) {