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 2024-02-16 16:33:52 -05:00 committed by Brad King
parent d4a517f82a
commit 8b6fc81fc3

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`.