From 6223d6008587e1661e2f5aa34008bf473faf591e Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 12 Feb 2004 09:13:31 -0500 Subject: [PATCH] Fix install test fail on mingw --- Source/kwsys/SystemTools.cxx | 8 ++++++++ Tests/SimpleInstall/CMakeLists.txt | 4 ++-- Tests/SimpleInstallS2/CMakeLists.txt | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index ac5c1b0f7..82acc9317 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1249,6 +1249,14 @@ kwsys_stl::string SystemTools::FindLibrary(const char* name, { return SystemTools::CollapseFullPath(tryPath.c_str()); } + tryPath = *p; + tryPath += "/"; + tryPath += name; + tryPath += ".dll"; + if(SystemTools::FileExists(tryPath.c_str())) + { + return SystemTools::CollapseFullPath(tryPath.c_str()); + } #endif } diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index e601af464..4a315a185 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -31,9 +31,9 @@ IF(STAGE2) SET(t1NAMES test1 test1${CMAKE_DEBUG_POSTFIX}) SET(t2NAMES test2 test2${CMAKE_DEBUG_POSTFIX}) - IF(WIN32 AND UNIX) + IF(CYGWIN OR MINGW) SET(LIBPATHS ${LIBPATHS} "${CMAKE_INSTALL_PREFIX}/bin") - ENDIF(WIN32 AND UNIX) + ENDIF(CYGWIN OR MINGW) MESSAGE("Search for library in: ${LIBPATHS}") FIND_LIBRARY(TEST1_LIBRARY NAMES ${t1NAMES} diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index e601af464..4a315a185 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -31,9 +31,9 @@ IF(STAGE2) SET(t1NAMES test1 test1${CMAKE_DEBUG_POSTFIX}) SET(t2NAMES test2 test2${CMAKE_DEBUG_POSTFIX}) - IF(WIN32 AND UNIX) + IF(CYGWIN OR MINGW) SET(LIBPATHS ${LIBPATHS} "${CMAKE_INSTALL_PREFIX}/bin") - ENDIF(WIN32 AND UNIX) + ENDIF(CYGWIN OR MINGW) MESSAGE("Search for library in: ${LIBPATHS}") FIND_LIBRARY(TEST1_LIBRARY NAMES ${t1NAMES}