cmTarget: copy link libraries from the right properties

This fixes transitive dependencies' usage requirements not appearing
when compiling synthetic targets.

See: https://discourse.cmake.org/t/9819
This commit is contained in:
Ben Boeckel authored and Brad King committed 2024-02-19 10:25:29 -05:00
1 parent d4a517f82a
commit 8b6fc81fc3
1 file changed
+1 -1
+1 -1
View File
@@ -1783,7 +1783,7 @@ void cmTarget::CopyImportedCxxModulesEntries(cmTarget const* tgt)
cmMakeRange(tgt->impl->ImportedCxxModulesCompileOptions.Entries));
this->impl->LinkLibraries.Entries.clear();
this->impl->LinkLibraries.CopyFromEntries(
cmMakeRange(tgt->impl->LinkLibraries.Entries));
cmMakeRange(tgt->impl->ImportedCxxModulesLinkLibraries.Entries));
// Copy the C++ module fileset entries from `tgt`'s `INTERFACE` to this
// target's `PRIVATE`.