diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExportInstallFileGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmInstallCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmInstallExportGenerator.cxx | 13 | ||||
-rw-r--r-- | Source/cmInstallExportGenerator.h | 8 |
4 files changed, 17 insertions, 10 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index d55be11..7ffab0c 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -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)) { diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index e22dc42..333c2ff 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -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; diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 7f6aa4d..97b9405 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -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()) diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h index 3e078f2..885ed05 100644 --- a/Source/cmInstallExportGenerator.h +++ b/Source/cmInstallExportGenerator.h @@ -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; |