Skip to content

Commit

Permalink
Add Link and Include metadata to ProjectReference to determine if we …
Browse files Browse the repository at this point in the history
…add includes or link.
  • Loading branch information
wasabii committed May 31, 2024
1 parent 35320ba commit 2014afd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/IKVM.Clang.Sdk/targets/IKVM.Clang.Core.targets
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
<ItemDefinitionGroup>
<ProjectReference>
<ReferenceSourceTarget>ProjectReference</ReferenceSourceTarget>
<Include>True</Include>
<Link>True</Link>
</ProjectReference>
</ItemDefinitionGroup>

Expand Down Expand Up @@ -221,11 +223,11 @@

<Target Name="ImportProjectReferenceItems" DependsOnTargets="$(ImportProjectReferenceItemsDependsOn)">
<ItemGroup>
<IncludeDirectories Include="@(GetProjectReferenceOutputItems->'%(HeadersPath)')" />
<IncludeDirectories Include="@(GetProjectReferenceOutputItems->WithMetadataValue('Include', 'True')->'%(HeadersPath)')" />
<_LibraryDirectories Remove="@(_LibraryDirectories)" />
<_LibraryDirectories Include="@(GetProjectReferenceOutputItems->'%(LibraryPath)')" />
<_LibraryDirectories Include="@(GetProjectReferenceOutputItems->WithMetadataValue('Link', 'True')->'%(LibraryPath)')" />
<LibraryDirectories Include="@(_LibraryDirectories->'%(RootDir)%(Directory)')" />
<Dependencies Include="@(GetProjectReferenceOutputItems->'%(TargetName)')" />
<Dependencies Include="@(GetProjectReferenceOutputItems->WithMetadataValue('Link', 'True')->'%(TargetName)')" />
</ItemGroup>
</Target>

Expand Down

0 comments on commit 2014afd

Please sign in to comment.