summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorjakoblover <jakob.lover@nordicsemi.no>2022-05-03 13:07:17 (GMT)
committerBrad King <brad.king@kitware.com>2022-05-05 13:11:57 (GMT)
commitcae7e5e38df6035779f1de473cf3debbc4a9260f (patch)
treefadf4bee0ca0c7612549e9a494650bf446f94308 /Source/CPack
parentef10e61b6b7d3bb264cdbf72e143dbef7be8c736 (diff)
downloadCMake-cae7e5e38df6035779f1de473cf3debbc4a9260f.zip
CMake-cae7e5e38df6035779f1de473cf3debbc4a9260f.tar.gz
CMake-cae7e5e38df6035779f1de473cf3debbc4a9260f.tar.bz2
CPack/WIX: Add CPACK_WIX_ARCHITECTURE to support Windows for ARM installers
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 6a0095b..594f408 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -89,10 +89,21 @@ bool cmCPackWIXGenerator::RunCandleCommand(std::string const& sourceFile,
return false;
}
+ std::string arch;
+ if (cmValue archOpt = GetOption("CPACK_WIX_ARCHITECTURE")) {
+ arch = *archOpt;
+ } else {
+ arch = GetArchitecture();
+ cmCPackLogger(
+ cmCPackLog::LOG_VERBOSE,
+ "CPACK_WIX_ARCHITECTURE was not set. Invoking WiX with architecture "
+ << arch << " . " << std::endl);
+ }
+
std::ostringstream command;
command << QuotePath(executable);
command << " -nologo";
- command << " -arch " << GetArchitecture();
+ command << " -arch " << arch;
command << " -out " << QuotePath(objectFile);
for (std::string const& ext : CandleExtensions) {