summaryrefslogtreecommitdiffstats
path: root/Source/CPack/IFW/cmCPackIFWGenerator.cxx
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2014-10-05 08:52:57 (GMT)
committerKonstantin Podsvirov <konstantin@podsvirov.pro>2014-10-05 08:52:57 (GMT)
commited9684a22cf4babeaa1f9083f4061d789e513ba9 (patch)
treeb9ee70182d4f8639770898479579373a65ca36d5 /Source/CPack/IFW/cmCPackIFWGenerator.cxx
parentf9f748745c6f4ef5b2dbf6d0732bc67a23d1cc63 (diff)
downloadCMake-ed9684a22cf4babeaa1f9083f4061d789e513ba9.zip
CMake-ed9684a22cf4babeaa1f9083f4061d789e513ba9.tar.gz
CMake-ed9684a22cf4babeaa1f9083f4061d789e513ba9.tar.bz2
CPackIFW: Added support for multiple repositories
Now user can add IFW specific repo with cpack_ifw_add_repository macro
Diffstat (limited to 'Source/CPack/IFW/cmCPackIFWGenerator.cxx')
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx30
1 files changed, 18 insertions, 12 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index dabb3b3..7f06e2d 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -56,7 +56,7 @@ int cmCPackIFWGenerator::PackageFiles()
ifwTmpFile += "/IFWOutput.log";
// Run repogen
- if (!DownloadSite.empty())
+ if (!Installer.Repositories.empty())
{
std::string ifwCmd = RepoGen;
ifwCmd += " -c " + this->toplevel + "/config/config.xml";
@@ -128,7 +128,7 @@ int cmCPackIFWGenerator::PackageFiles()
{
ifwCmd += " --online-only";
}
- else if (!DownloadedPackages.empty() && !DownloadSite.empty())
+ else if (!DownloadedPackages.empty() && !Installer.Repositories.empty())
{
ifwCmd += " -e ";
std::set<cmCPackIFWPackage*>::iterator it
@@ -278,16 +278,26 @@ int cmCPackIFWGenerator::InitializeInternal()
PkgsDirsVector);
}
- // Remote repository
+ // Installer
+ Installer.Generator = this;
+ Installer.ConfigureFromOptions();
- if (const char *site = this->GetOption("CPACK_DOWNLOAD_SITE"))
+ if (const char* ifwDownloadAll =
+ this->GetOption("CPACK_IFW_DOWNLOAD_ALL"))
{
- DownloadSite = site;
+ OnlineOnly = cmSystemTools::IsOn(ifwDownloadAll);
+ }
+ else if (const char* cpackDownloadAll =
+ this->GetOption("CPACK_DOWNLOAD_ALL"))
+ {
+ OnlineOnly = cmSystemTools::IsOn(cpackDownloadAll);
+ }
+ else
+ {
+ OnlineOnly = false;
}
- OnlineOnly = this->IsOn("CPACK_DOWNLOAD_ALL") ? true : false;
-
- if (!DownloadSite.empty() && RepoGen.empty()) {
+ if (!Installer.Repositories.empty() && RepoGen.empty()) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Cannot find QtIFW repository generator \"repogen\": "
"likely it is not installed, or not in your PATH"
@@ -295,10 +305,6 @@ int cmCPackIFWGenerator::InitializeInternal()
return 0;
}
- // Installer
- Installer.Generator = this;
- Installer.ConfigureFromOptions();
-
return this->Superclass::InitializeInternal();
}