summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 94bb8e1..a2ceeb4 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("$<COMPILE_ONLY:", model->GetName(), '>'),
+ GENERAL_LibraryType);
+
// Apply usage requirements to the target.
usage.ApplyToTarget(tgt);