diff options
author | Brad King <brad.king@kitware.com> | 2015-02-11 16:48:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-11 20:14:01 (GMT) |
commit | 7607c3d16aa0636458c909f4036e4b0d91581b30 (patch) | |
tree | d5701c5955ea15ce600ffb66925196e6b7f7f000 /Source | |
parent | ebd556caa9e1fc92e00c8e401b145c531390e854 (diff) | |
download | CMake-7607c3d16aa0636458c909f4036e4b0d91581b30.zip CMake-7607c3d16aa0636458c909f4036e4b0d91581b30.tar.gz CMake-7607c3d16aa0636458c909f4036e4b0d91581b30.tar.bz2 |
cmInstallGenerator: Pass destination explicitly to AddInstallRule
This will allow specific invocations to transform the destination
before AddInstallRule uses it.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmInstallDirectoryGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmInstallExportGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmInstallFilesGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmInstallGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmInstallGenerator.h | 4 | ||||
-rw-r--r-- | Source/cmInstallTargetGenerator.cxx | 4 |
6 files changed, 14 insertions, 7 deletions
diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 8c13bab..7593380 100644 --- a/Source/cmInstallDirectoryGenerator.cxx +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -44,7 +44,9 @@ cmInstallDirectoryGenerator::GenerateScriptActions(std::ostream& os, { // Write code to install the directories. const char* no_rename = 0; - this->AddInstallRule(os, cmInstallType_DIRECTORY, + this->AddInstallRule(os, + this->Destination, + cmInstallType_DIRECTORY, this->Directories, this->Optional, this->FilePermissions.c_str(), diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 77af6c2..38c80df 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -185,7 +185,8 @@ cmInstallExportGenerator::GenerateScriptConfigs(std::ostream& os, files.push_back(i->second); std::string config_test = this->CreateConfigTest(i->first); os << indent << "if(" << config_test << ")\n"; - this->AddInstallRule(os, cmInstallType_FILES, files, false, + this->AddInstallRule(os, this->Destination, + cmInstallType_FILES, files, false, this->FilePermissions.c_str(), 0, 0, 0, indent.Next()); os << indent << "endif()\n"; @@ -224,6 +225,7 @@ void cmInstallExportGenerator::GenerateScriptActions(std::ostream& os, // Install the main export file. std::vector<std::string> files; files.push_back(this->MainImportFile); - this->AddInstallRule(os, cmInstallType_FILES, files, false, + this->AddInstallRule(os, this->Destination, + cmInstallType_FILES, files, false, this->FilePermissions.c_str(), 0, 0, 0, indent); } diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index 91b102a..28c27c2 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -57,6 +57,7 @@ void cmInstallFilesGenerator::AddFilesInstallRule( // Write code to install the files. const char* no_dir_permissions = 0; this->AddInstallRule(os, + this->Destination, (this->Programs ? cmInstallType_PROGRAMS : cmInstallType_FILES), diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index 3ae8975..2e1c5f0 100644 --- a/Source/cmInstallGenerator.cxx +++ b/Source/cmInstallGenerator.cxx @@ -37,6 +37,7 @@ cmInstallGenerator void cmInstallGenerator ::AddInstallRule( std::ostream& os, + std::string const& dest, cmInstallType type, std::vector<std::string> const& files, bool optional /* = false */, @@ -60,7 +61,6 @@ void cmInstallGenerator case cmInstallType_FILES: stype = "FILE"; break; } os << indent; - std::string const& dest = this->Destination; if (cmSystemTools::FileIsFullPath(dest.c_str())) { os << "list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES\n"; diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index 1e87bda..c4191e4 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -40,7 +40,9 @@ public: virtual ~cmInstallGenerator(); void AddInstallRule( - std::ostream& os, cmInstallType type, + std::ostream& os, + std::string const& dest, + cmInstallType type, std::vector<std::string> const& files, bool optional = false, const char* permissions_file = 0, diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index a22b123..7ab88f1 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -323,8 +323,8 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, const char* no_dir_permissions = 0; const char* no_rename = 0; bool optional = this->Optional || this->ImportLibrary; - this->AddInstallRule(os, type, filesFrom, - optional, + this->AddInstallRule(os, this->Destination, + type, filesFrom, optional, this->FilePermissions.c_str(), no_dir_permissions, no_rename, literal_args.c_str(), indent); |