summaryrefslogtreecommitdiffstats
path: root/Source/CPack/IFW/cmCPackIFWGenerator.cxx
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2017-08-17 18:30:22 (GMT)
committerKonstantin Podsvirov <konstantin@podsvirov.pro>2017-08-17 18:41:16 (GMT)
commit5fe64511d6a9e4c9a329bc48bcfc26789afc0794 (patch)
tree43da6c7995c1027cff83438fafe559faf3f69178 /Source/CPack/IFW/cmCPackIFWGenerator.cxx
parentd3760354a522fa91dcef88aa768fa22654636686 (diff)
downloadCMake-5fe64511d6a9e4c9a329bc48bcfc26789afc0794.zip
CMake-5fe64511d6a9e4c9a329bc48bcfc26789afc0794.tar.gz
CMake-5fe64511d6a9e4c9a329bc48bcfc26789afc0794.tar.bz2
CPackIFW: Add CPACK_IFW_REPOSITORIES_DIRECTORIES variable
Add CPACK_IFW_REPOSITORIES_DIRECTORIES variable to specify additional repositories dirs that will be used to resolve and repack dependent components
Diffstat (limited to 'Source/CPack/IFW/cmCPackIFWGenerator.cxx')
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx39
1 files changed, 39 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index 6861623..02940af 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();