mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 05:39:57 -05:00
Merge branch 'fix-static-private-non-target-depends' into release
This commit is contained in:
@@ -772,6 +772,27 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
|
||||
lastPos = endPos;
|
||||
}
|
||||
|
||||
pos = 0;
|
||||
lastPos = pos;
|
||||
while (errorString.empty() &&
|
||||
(pos = input.find("$<LINK_ONLY:", lastPos)) != input.npos)
|
||||
{
|
||||
std::string::size_type nameStartPos = pos + sizeof("$<LINK_ONLY:") - 1;
|
||||
std::string::size_type endPos = input.find(">", nameStartPos);
|
||||
if (endPos == input.npos)
|
||||
{
|
||||
errorString = "$<LINK_ONLY:...> expression incomplete";
|
||||
break;
|
||||
}
|
||||
std::string libName = input.substr(nameStartPos, endPos - nameStartPos);
|
||||
if (cmGeneratorExpression::IsValidTargetName(libName) &&
|
||||
this->AddTargetNamespace(libName, target, missingTargets))
|
||||
{
|
||||
input.replace(nameStartPos, endPos - nameStartPos, libName);
|
||||
}
|
||||
lastPos = nameStartPos + libName.size() + 1;
|
||||
}
|
||||
|
||||
this->ReplaceInstallPrefix(input);
|
||||
|
||||
if (!errorString.empty())
|
||||
|
||||
@@ -432,11 +432,8 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
|
||||
{
|
||||
std::string configLib = this->Target
|
||||
->GetDebugGeneratorExpressions(lib, llt);
|
||||
if (cmGeneratorExpression::IsValidTargetName(configLib))
|
||||
{
|
||||
configLib = "$<LINK_ONLY:$<TARGET_NAME:" + configLib + ">>";
|
||||
}
|
||||
else if (cmGeneratorExpression::Find(configLib) != std::string::npos)
|
||||
if (cmGeneratorExpression::IsValidTargetName(lib)
|
||||
|| cmGeneratorExpression::Find(lib) != std::string::npos)
|
||||
{
|
||||
configLib = "$<LINK_ONLY:" + configLib + ">";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user