From 2041f7c9bf0ccdf1afc1be829d00977a46f280bb Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 26 Apr 2024 20:14:10 -0400 Subject: cmGeneratorTarget: add the original target as a COMPILE_ONLY link Fixes: #25909 --- Source/cmGeneratorTarget.cxx | 4 ++++ 1 file changed, 4 insertions(+) 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("$GetName(), '>'), + GENERAL_LibraryType); + // Apply usage requirements to the target. usage.ApplyToTarget(tgt); -- cgit v0.12