From c99dcc30be3e4d5c31ebcf8e35f4073f0af0e83a Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Mon, 21 Aug 2006 17:47:51 -0400
Subject: BUG: Directory installation pattern matching should be case
 insensitive on some platforms.

---
 Source/cmFileCommand.cxx    | 7 +++++++
 Source/cmInstallCommand.cxx | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index ee83ea5..dd96db8 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -400,6 +400,13 @@ public:
   // Get the properties from rules matching this input file.
   MatchProperties CollectMatchProperties(const char* file)
     {
+    // Match rules are case-insensitive on some platforms.
+#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
+    std::string lower = cmSystemTools::LowerCase(file);
+    file = lower.c_str();
+#endif
+
+    // Collect properties from all matching rules.
     MatchProperties result;
     for(std::vector<MatchRule>::iterator mr = this->MatchRules.begin();
         mr != this->MatchRules.end(); ++mr)
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 0e05ab7..a5c0408 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -938,7 +938,12 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
     else if(doing_regex)
       {
       literal_args += " REGEX \"";
+    // Match rules are case-insensitive on some platforms.
+#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
+      std::string regex = cmSystemTools::LowerCase(args[i]);
+#else
       std::string regex = args[i];
+#endif
       cmSystemTools::ReplaceString(regex, "\\", "\\\\");
       literal_args += regex;
       literal_args += "\"";
-- 
cgit v0.12