summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorRobert Schuster <rob3rt.schuster@gmail.com>2024-06-19 11:09:58 (GMT)
committerBrad King <brad.king@kitware.com>2024-06-21 16:27:50 (GMT)
commit55524c48a45ec4f05ede9e19db65edecacca61b5 (patch)
treecc42d63021c3a3b964e56d18c84e767293536adf /Source/CPack
parenta022705a2e99c11fc946fadcdfbe0beac20f3a12 (diff)
downloadCMake-55524c48a45ec4f05ede9e19db65edecacca61b5.zip
CMake-55524c48a45ec4f05ede9e19db65edecacca61b5.tar.gz
CMake-55524c48a45ec4f05ede9e19db65edecacca61b5.tar.bz2
CPack/DEB: Add Multi-Arch support
Add support for Multi-Arch in control files of Debian packages. Valid values: same, foreign, allowed Fixes: #21445
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 31191a9..d721cf1 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -789,6 +789,21 @@ bool cmCPackDebGenerator::createDeb()
if (cmNonempty(debian_pkg_replaces)) {
controlValues["Replaces"] = *debian_pkg_replaces;
}
+ cmValue debian_pkg_multiarch =
+ this->GetOption("GEN_CPACK_DEBIAN_PACKAGE_MULTIARCH");
+ if (cmNonempty(debian_pkg_multiarch)) {
+ // check for valid values: same, foreign, allowed
+ if (*debian_pkg_multiarch != "same" &&
+ *debian_pkg_multiarch != "foreign" &&
+ *debian_pkg_multiarch != "allowed") {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error: invalid value for Multi-Arch: "
+ << *debian_pkg_multiarch
+ << ". Valid values are: same, foreign, allowed\n");
+ return false;
+ }
+ controlValues["Multi-Arch"] = *debian_pkg_multiarch;
+ }
const std::string strGenWDIR(this->GetOption("GEN_WDIR"));
const std::string shlibsfilename = strGenWDIR + "/shlibs";