Browse Source

cmLocalGenerator: Inline conversion into link computation

Make it possible to invoke this functionality independent of
cmLocalGenerator.
pull/275/head
Stephen Kelly 9 years ago
parent
commit
b3701f9a52
  1. 9
      Source/cmLocalGenerator.cxx

9
Source/cmLocalGenerator.cxx

@ -1407,7 +1407,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib)
#endif
// Normal behavior.
return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib);
std::string relLib = lib;
cmState::Directory stateDir = this->GetStateSnapshot().GetDirectory();
if (cmOutputConverter::ContainedInDirectory(
stateDir.GetCurrentBinary(), lib, stateDir)) {
relLib = cmOutputConverter::ForceToRelativePath(
stateDir.GetCurrentBinary(), lib);
}
return relLib;
}
/**

Loading…
Cancel
Save