diff options
author | Brad King <brad.king@kitware.com> | 2007-04-18 13:56:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-04-18 13:56:06 (GMT) |
commit | 47159b69be8ee0ed5a34378c46627ffa0edef054 (patch) | |
tree | 4a0d6dd37acfe64f95800eb5c5b1bb02dc40027f /Source/cmLocalGenerator.cxx | |
parent | 1b00feb0decb09e3f92299791ea53ebd0da55bd8 (diff) | |
download | CMake-47159b69be8ee0ed5a34378c46627ffa0edef054.zip CMake-47159b69be8ee0ed5a34378c46627ffa0edef054.tar.gz CMake-47159b69be8ee0ed5a34378c46627ffa0edef054.tar.bz2 |
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.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 10b855d..2200102 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1712,25 +1712,30 @@ void cmLocalGenerator impexe)) { // This is a CMake target. Ask the target for its real name. - // 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. - std::string linkItem = tgt->GetDirectory(0, implib); - linkItem += "/"; - linkItem += tgt->GetFullName(config, implib); + std::string linkItem; if(impexe && loader_flag) { // This link item is an executable that may provide symbols // used by this target. A special flag is needed on this // platform. Add it now. - linkItem = loader_flag + - this->Convert(linkItem.c_str(), NONE, SHELL, false); + std::string exe = tgt->GetFullPath(config, implib); + 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); // For full path, use the true location. if(fullPathLibs) { - fullPathLibs->push_back(tgt->GetFullPath(config)); + fullPathLibs->push_back(tgt->GetFullPath(config, implib)); } } else |