From 50a0f71120afe28c205bacab5a1350eb04815f3d Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 5 May 2006 14:57:19 -0400 Subject: ENH: Added CONFIGURATIONS option to INSTALL command to allow per-configuration install rules. --- Source/cmInstallGenerator.cxx | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'Source/cmInstallGenerator.cxx') diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index 44b6936524..797fc0203e 100644 --- a/Source/cmInstallGenerator.cxx +++ b/Source/cmInstallGenerator.cxx @@ -47,15 +47,18 @@ cmInstallGenerator } //---------------------------------------------------------------------------- -void cmInstallGenerator::AddInstallRule(std::ostream& os, - const char* dest, - int type, - const char* file, - bool optional /* = false */, - const char* properties /* = 0 */, - const char* permissions /* = 0 */, - const char* component /* = 0 */, - const char* rename /* = 0 */) +void cmInstallGenerator::AddInstallRule( + std::ostream& os, + const char* dest, + int type, + const char* file, + bool optional /* = false */, + const char* properties /* = 0 */, + const char* permissions /* = 0 */, + std::vector const& configurations /* = std::vector() */, + const char* component /* = 0 */, + const char* rename /* = 0 */ + ) { // Use the FILE command to install the file. std::string stype; @@ -87,6 +90,15 @@ void cmInstallGenerator::AddInstallRule(std::ostream& os, { os << " RENAME \"" << rename << "\""; } + if(!configurations.empty()) + { + os << " CONFIGURATIONS"; + for(std::vector::const_iterator c = configurations.begin(); + c != configurations.end(); ++c) + { + os << " \"" << *c << "\""; + } + } if(component && *component) { os << " COMPONENTS \"" << component << "\""; -- cgit v1.2.1