mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 01:19:31 -05:00
objlib: Allow other libraries to link to OBJECT libraries.
Note: This only allows `OBJECT` libraries to be on the right-hand side of `target_link_libraries` but still does not link its object-files to the target on the left-hand side. Issue: #14778
This commit is contained in:
@@ -159,7 +159,9 @@ cmStateEnums::TargetType cmExportBuildFileGenerator::GetExportTargetType(
|
||||
{
|
||||
cmStateEnums::TargetType targetType = target->GetType();
|
||||
// An object library exports as an interface library if we cannot
|
||||
// tell clients where to find the objects.
|
||||
// tell clients where to find the objects. This is sufficient
|
||||
// to support transitive usage requirements on other targets that
|
||||
// use the object library.
|
||||
if (targetType == cmStateEnums::OBJECT_LIBRARY &&
|
||||
!this->LG->GetGlobalGenerator()->HasKnownObjectFileLocation(nullptr)) {
|
||||
targetType = cmStateEnums::INTERFACE_LIBRARY;
|
||||
|
||||
Reference in New Issue
Block a user