Commit b3701f9a authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmLocalGenerator: Inline conversion into link computation

Make it possible to invoke this functionality independent of
cmLocalGenerator.
parent 06b71ff9
Pipeline #30064 passed with stage
......@@ -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;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment