summaryrefslogtreecommitdiff
path: root/Source/cmInstallExportGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmInstallExportGenerator.cxx')
-rw-r--r--Source/cmInstallExportGenerator.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx
index 28a19d7..0a645a8 100644
--- a/Source/cmInstallExportGenerator.cxx
+++ b/Source/cmInstallExportGenerator.cxx
@@ -23,10 +23,11 @@
#include "cmInstallFilesGenerator.h"
#include "cmExportInstallFileGenerator.h"
+#include "cmExportSet.h"
//----------------------------------------------------------------------------
cmInstallExportGenerator::cmInstallExportGenerator(
- const char* name,
+ cmExportSet* exportSet,
const char* destination,
const char* file_permissions,
std::vector<std::string> const& configurations,
@@ -34,13 +35,14 @@ cmInstallExportGenerator::cmInstallExportGenerator(
const char* filename, const char* name_space,
cmMakefile* mf)
:cmInstallGenerator(destination, configurations, component)
- ,Name(name)
+ ,ExportSet(exportSet)
,FilePermissions(file_permissions)
,FileName(filename)
,Namespace(name_space)
,Makefile(mf)
{
this->EFGen = new cmExportInstallFileGenerator(this);
+ exportSet->AddInstallation(this);
}
//----------------------------------------------------------------------------
@@ -113,16 +115,12 @@ void cmInstallExportGenerator::ComputeTempDir()
//----------------------------------------------------------------------------
void cmInstallExportGenerator::GenerateScript(std::ostream& os)
{
- // Get the export set requested.
- ExportSet const* exportSet =
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
- ->GetExportSet(this->Name.c_str());
-
// Skip empty sets.
- if(!exportSet)
+ if(ExportSet->GetTargetExports()->empty())
{
cmOStringStream e;
- e << "INSTALL(EXPORT) given unknown export \"" << this->Name << "\"";
+ e << "INSTALL(EXPORT) given unknown export \""
+ << ExportSet->GetName() << "\"";
cmSystemTools::Error(e.str().c_str());
return;
}
@@ -137,8 +135,6 @@ void cmInstallExportGenerator::GenerateScript(std::ostream& os)
this->MainImportFile += this->FileName;
// Generate the import file for this export set.
- this->EFGen->SetName(this->Name.c_str());
- this->EFGen->SetExportSet(exportSet);
this->EFGen->SetExportFile(this->MainImportFile.c_str());
this->EFGen->SetNamespace(this->Namespace.c_str());
if(this->ConfigurationTypes->empty())