From f987806e57b39e4ee5f33625168b6b3db5e80a1b Mon Sep 17 00:00:00 2001
From: Andy Cedilnik <andy.cedilnik@kitware.com>
Date: Wed, 11 Feb 2004 08:28:59 -0500
Subject: [PATCH] ENH: On Cygwin shared libraries have only .dll file no .lib
 file, so when finding library on cygwin, search also for .dll. Also fix
 SimpleInstall test on cygwin

---
 SystemTools.cxx | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/SystemTools.cxx b/SystemTools.cxx
index 4808c1a0..df3be0d5 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -1241,6 +1241,14 @@ kwsys_stl::string SystemTools::FindLibrary(const char* name,
       {
       return SystemTools::CollapseFullPath(tryPath.c_str());
       }
+    tryPath = *p;
+    tryPath += "/lib";
+    tryPath += name;
+    tryPath += ".dll";
+    if(SystemTools::FileExists(tryPath.c_str()))
+      {
+      return SystemTools::CollapseFullPath(tryPath.c_str());
+      }
 #endif
     }
   
-- 
GitLab