diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 94bb8e1295..a2ceeb4293 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -8373,6 +8373,10 @@ bool cmGeneratorTarget::DiscoverSyntheticTargets(cmSyntheticTargetCache& cache, // generation. tgt->CopyImportedCxxModulesProperties(model); + tgt->AddLinkLibrary(*mf, + cmStrCat("$GetName(), '>'), + GENERAL_LibraryType); + // Apply usage requirements to the target. usage.ApplyToTarget(tgt);