summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-28 13:53:04 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-08-28 13:53:10 (GMT)
commit55e281c3b78453fc4b692f55a87a9075a099258f (patch)
tree38586eed2e789f2a7337fa477f243f2fa48664a5 /Source/CPack
parent39889d778eaf87fbd095fc1781a0d421639041d4 (diff)
parent5fe64511d6a9e4c9a329bc48bcfc26789afc0794 (diff)
downloadCMake-55e281c3b78453fc4b692f55a87a9075a099258f.zip
CMake-55e281c3b78453fc4b692f55a87a9075a099258f.tar.gz
CMake-55e281c3b78453fc4b692f55a87a9075a099258f.tar.bz2
Merge topic 'cpackifw-repositories-directories'
5fe64511 CPackIFW: Add CPACK_IFW_REPOSITORIES_DIRECTORIES variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1150
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx39
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.h1
2 files changed, 40 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index a1df32c..97e792a 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -56,6 +56,22 @@ int cmCPackIFWGenerator::PackageFiles()
}
}
+ if (!this->RepoDirsVector.empty()) {
+ if (!this->IsVersionLess("3.1")) {
+ for (std::vector<std::string>::iterator it =
+ this->RepoDirsVector.begin();
+ it != this->RepoDirsVector.end(); ++it) {
+ ifwCmd += " --repository " + *it;
+ }
+ } else {
+ cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
+ << "variable is set, but content will be skiped, "
+ << "because this feature available only since "
+ << "QtIFW 3.1. Please update your QtIFW instance."
+ << std::endl);
+ }
+ }
+
if (!this->OnlineOnly && !this->DownloadedPackages.empty()) {
ifwCmd += " -i ";
std::set<cmCPackIFWPackage*>::iterator it =
@@ -128,6 +144,22 @@ int cmCPackIFWGenerator::PackageFiles()
}
}
+ if (!this->RepoDirsVector.empty()) {
+ if (!this->IsVersionLess("3.1")) {
+ for (std::vector<std::string>::iterator it =
+ this->RepoDirsVector.begin();
+ it != this->RepoDirsVector.end(); ++it) {
+ ifwCmd += " --repository " + *it;
+ }
+ } else {
+ cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
+ << "variable is set, but content will be skipped, "
+ << "because this feature available only since "
+ << "QtIFW 3.1. Please update your QtIFW instance."
+ << std::endl);
+ }
+ }
+
if (this->OnlineOnly) {
ifwCmd += " --online-only";
} else if (!this->DownloadedPackages.empty() &&
@@ -266,6 +298,13 @@ int cmCPackIFWGenerator::InitializeInternal()
cmSystemTools::ExpandListArgument(dirs, this->PkgsDirsVector);
}
+ // Additional repositories dirs
+ this->RepoDirsVector.clear();
+ if (const char* dirs =
+ this->GetOption("CPACK_IFW_REPOSITORIES_DIRECTORIES")) {
+ cmSystemTools::ExpandListArgument(dirs, this->RepoDirsVector);
+ }
+
// Installer
this->Installer.Generator = this;
this->Installer.ConfigureFromOptions();
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h
index 9d635f8..9fd14bd 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.h
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.h
@@ -148,6 +148,7 @@ private:
bool OnlineOnly;
bool ResolveDuplicateNames;
std::vector<std::string> PkgsDirsVector;
+ std::vector<std::string> RepoDirsVector;
};
#endif