summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 5196e4e..332098e 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -8383,6 +8383,10 @@ bool cmGeneratorTarget::DiscoverSyntheticTargets(cmSyntheticTargetCache& cache,
// generation.
tgt->CopyImportedCxxModulesProperties(model);
+ tgt->AddLinkLibrary(*mf,
+ cmStrCat("$<COMPILE_ONLY:", model->GetName(), '>'),
+ GENERAL_LibraryType);
+
// Apply usage requirements to the target.
usage.ApplyToTarget(tgt);