BUG: Fix ComputeLinkInformation. When using a loader_flag link item the full per-configuration path should be used. The fullPathLibs returned should refer to the import library if it was used. Since the full paths are used for dependencies the executable used with loader_flag should be returned also.

This commit is contained in:
Brad King 2007-04-18 09:56:06 -04:00
parent 1b00feb0de
commit 47159b69be
1 changed files with 14 additions and 9 deletions

View File

@ -1712,25 +1712,30 @@ void cmLocalGenerator
impexe)) impexe))
{ {
// This is a CMake target. Ask the target for its real name. // This is a CMake target. Ask the target for its real name.
// Pass the full path to the target file but purposely leave std::string linkItem;
// off the per-configuration subdirectory. The link directory
// ordering knows how to deal with this.
std::string linkItem = tgt->GetDirectory(0, implib);
linkItem += "/";
linkItem += tgt->GetFullName(config, implib);
if(impexe && loader_flag) if(impexe && loader_flag)
{ {
// This link item is an executable that may provide symbols // This link item is an executable that may provide symbols
// used by this target. A special flag is needed on this // used by this target. A special flag is needed on this
// platform. Add it now. // platform. Add it now.
linkItem = loader_flag + std::string exe = tgt->GetFullPath(config, implib);
this->Convert(linkItem.c_str(), NONE, SHELL, false); linkItem += loader_flag;
linkItem += this->Convert(exe.c_str(), NONE, SHELL, false);
}
else
{
// Pass the full path to the target file but purposely leave
// off the per-configuration subdirectory. The link directory
// ordering knows how to deal with this.
linkItem += tgt->GetDirectory(0, implib);
linkItem += "/";
linkItem += tgt->GetFullName(config, implib);
} }
linkLibraries.push_back(linkItem); linkLibraries.push_back(linkItem);
// For full path, use the true location. // For full path, use the true location.
if(fullPathLibs) if(fullPathLibs)
{ {
fullPathLibs->push_back(tgt->GetFullPath(config)); fullPathLibs->push_back(tgt->GetFullPath(config, implib));
} }
} }
else else