|
@@ -1469,9 +1469,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
|
|
|
gt, linkBuild.OrderOnlyDeps, config, fileConfig, DependOnTargetArtifact);
|
|
|
|
|
|
// Add order-only dependencies on versioning symlinks of shared libs we link.
|
|
|
- if (!this->GeneratorTarget->IsDLLPlatform()) {
|
|
|
- if (cmComputeLinkInformation* cli =
|
|
|
- this->GeneratorTarget->GetLinkInformation(config)) {
|
|
|
+ // If our target is not producing a runtime binary, it doesn't need the
|
|
|
+ // symlinks (anything that links to the target might, but that consumer will
|
|
|
+ // get its own order-only dependency).
|
|
|
+ if (!gt->IsDLLPlatform() && gt->IsRuntimeBinary()) {
|
|
|
+ if (cmComputeLinkInformation* cli = gt->GetLinkInformation(config)) {
|
|
|
for (auto const& item : cli->GetItems()) {
|
|
|
if (item.Target &&
|
|
|
item.Target->GetType() == cmStateEnums::SHARED_LIBRARY &&
|