cmInstallExportGenerator: Require cmLocalGenerator, not cmMakefile.
This commit is contained in:
parent
c259b83026
commit
1f39ee5beb
|
@ -72,8 +72,8 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
|
|||
|
||||
// Set an _IMPORT_PREFIX variable for import location properties
|
||||
// to reference if they are relative to the install prefix.
|
||||
std::string installPrefix =
|
||||
this->IEGen->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
|
||||
std::string installPrefix = this->IEGen->GetLocalGenerator()
|
||||
->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
|
||||
std::string const& expDest = this->IEGen->GetDestination();
|
||||
if(cmSystemTools::FileIsFullPath(expDest))
|
||||
{
|
||||
|
|
|
@ -1406,7 +1406,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
|||
ica.GetDestination().c_str(),
|
||||
ica.GetPermissions().c_str(), ica.GetConfigurations(),
|
||||
ica.GetComponent().c_str(), message, fname.c_str(),
|
||||
name_space.GetCString(), exportOld.IsEnabled(), this->Makefile);
|
||||
name_space.GetCString(), exportOld.IsEnabled());
|
||||
this->Makefile->AddInstallGenerator(exportGenerator);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -34,15 +34,14 @@ cmInstallExportGenerator::cmInstallExportGenerator(
|
|||
const char* component,
|
||||
MessageLevel message,
|
||||
const char* filename, const char* name_space,
|
||||
bool exportOld,
|
||||
cmMakefile* mf)
|
||||
bool exportOld)
|
||||
:cmInstallGenerator(destination, configurations, component, message)
|
||||
,ExportSet(exportSet)
|
||||
,FilePermissions(file_permissions)
|
||||
,FileName(filename)
|
||||
,Namespace(name_space)
|
||||
,ExportOld(exportOld)
|
||||
,Makefile(mf)
|
||||
,LocalGenerator(0)
|
||||
{
|
||||
this->EFGen = new cmExportInstallFileGenerator(this);
|
||||
exportSet->AddInstallation(this);
|
||||
|
@ -54,12 +53,18 @@ cmInstallExportGenerator::~cmInstallExportGenerator()
|
|||
delete this->EFGen;
|
||||
}
|
||||
|
||||
void cmInstallExportGenerator::Compute(cmLocalGenerator* lg)
|
||||
{
|
||||
this->LocalGenerator = lg;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmInstallExportGenerator::ComputeTempDir()
|
||||
{
|
||||
// Choose a temporary directory in which to generate the import
|
||||
// files to be installed.
|
||||
this->TempDir = this->Makefile->GetCurrentBinaryDirectory();
|
||||
this->TempDir =
|
||||
this->LocalGenerator->GetMakefile()->GetCurrentBinaryDirectory();
|
||||
this->TempDir += cmake::GetCMakeFilesDirectory();
|
||||
this->TempDir += "/Export";
|
||||
if(this->Destination.empty())
|
||||
|
|
|
@ -32,12 +32,14 @@ public:
|
|||
const char* component,
|
||||
MessageLevel message,
|
||||
const char* filename, const char* name_space,
|
||||
bool exportOld, cmMakefile* mf);
|
||||
bool exportOld);
|
||||
~cmInstallExportGenerator();
|
||||
|
||||
cmExportSet* GetExportSet() {return this->ExportSet;}
|
||||
|
||||
cmMakefile* GetMakefile() const { return this->Makefile; }
|
||||
void Compute(cmLocalGenerator* lg);
|
||||
|
||||
cmLocalGenerator* GetLocalGenerator() const { return this->LocalGenerator; }
|
||||
|
||||
const std::string& GetNamespace() const { return this->Namespace; }
|
||||
|
||||
|
@ -57,7 +59,7 @@ protected:
|
|||
std::string FileName;
|
||||
std::string Namespace;
|
||||
bool ExportOld;
|
||||
cmMakefile* Makefile;
|
||||
cmLocalGenerator* LocalGenerator;
|
||||
|
||||
std::string TempDir;
|
||||
std::string MainImportFile;
|
||||
|
|
Loading…
Reference in New Issue