summaryrefslogtreecommitdiffstats
path: root/Source/cmOrderLinkDirectories.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-04-05 15:05:06 (GMT)
committerBrad King <brad.king@kitware.com>2006-04-05 15:05:06 (GMT)
commit8e39418f6c6f9ed70adcefd3338ec85568cbee9c (patch)
tree58b34cda31b4f2abe0af8dde73d55cf27ac7172f /Source/cmOrderLinkDirectories.cxx
parent24f08322be0193b9e2deb83588fee341deecee48 (diff)
downloadCMake-8e39418f6c6f9ed70adcefd3338ec85568cbee9c.zip
CMake-8e39418f6c6f9ed70adcefd3338ec85568cbee9c.tar.gz
CMake-8e39418f6c6f9ed70adcefd3338ec85568cbee9c.tar.bz2
BUG: Fixed cmOrderLinkDirectories to deal with raw link items that do not yet exist and correct drive letter case to avoid duplicate paths on windows. Fixed cmLocalGenerator to pass CMake targets as full paths to cmOrderLinkDirectories to make sure the ordering will pick up the proper target libraries.
Diffstat (limited to 'Source/cmOrderLinkDirectories.cxx')
-rw-r--r--Source/cmOrderLinkDirectories.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/Source/cmOrderLinkDirectories.cxx b/Source/cmOrderLinkDirectories.cxx
index 5a3b405..1572827 100644
--- a/Source/cmOrderLinkDirectories.cxx
+++ b/Source/cmOrderLinkDirectories.cxx
@@ -258,12 +258,24 @@ void cmOrderLinkDirectories::SetLinkInformation(
for(std::vector<std::string>::const_iterator p = linkDirectories.begin();
p != linkDirectories.end(); ++p)
{
- if(this->DirectoryToAfterListEmitted.insert(*p).second)
+#ifdef _WIN32
+ std::string dir = *p;
+ // Avoid case problems for windows paths.
+ if(dir.size() > 2 && dir[1] == ':')
+ {
+ if(dir[0] >= 'A' && dir[0] <= 'Z')
+ {
+ dir[0] += 'a' - 'A';
+ }
+ }
+ dir = cmSystemTools::GetActualCaseForPath(dir.c_str());
+#endif
+ if(this->DirectoryToAfterListEmitted.insert(dir).second)
{
std::pair<cmStdString, std::vector<cmStdString> > dp;
- dp.first = *p;
+ dp.first = dir;
this->DirectoryToAfterList.push_back(dp);
- this->LinkPathSet.insert(*p);
+ this->LinkPathSet.insert(dir);
}
}
@@ -336,8 +348,8 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
}
if(!framework)
{
- cmSystemTools::SplitProgramPath(this->RawLinkItems[i].c_str(),
- dir, file);
+ dir = cmSystemTools::GetFilenamePath(this->RawLinkItems[i]);
+ file = cmSystemTools::GetFilenameName(this->RawLinkItems[i]);
#ifdef _WIN32
// Avoid case problems for windows paths.
if(dir.size() > 2 && dir[1] == ':')