DramaticShapeVoxelMod archival mirror · read-only
oxr/build/native/OpenXR.Loader.targets

OpenXR.Loader.targets

oxr/build/native/OpenXR.Loader.targets1.5 KB100644dc3b9661d8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <Choose>
        <When Condition="'$(ApplicationType)|$(ApplicationTypeRevision)' == 'Windows Store|10.0'">
            <PropertyGroup>
                <OpenXRLoaderBinaryRoot>$(OpenXRLoaderPackageRoot)native\$(Platform)_uwp\release</OpenXRLoaderBinaryRoot>
            </PropertyGroup>
        </When>
        <Otherwise>
            <PropertyGroup>
                <OpenXRLoaderBinaryRoot>$(OpenXRLoaderPackageRoot)native\$(Platform)\release</OpenXRLoaderBinaryRoot>
            </PropertyGroup>
        </Otherwise>
    </Choose>

    <ItemDefinitionGroup>
        <Link>
            <AdditionalDependencies>%(AdditionalDependencies);$(OpenXRLoaderBinaryRoot)\lib\openxr_loader.lib</AdditionalDependencies>
        </Link>
    </ItemDefinitionGroup>

    <!-- Copy the OpenXR loader DLL to the output directory and include in packaging -->
    <ItemGroup Condition="'$(OpenXRSkipLoaderCopy)'!='true'">
        <None Include="$(OpenXRLoaderBinaryRoot)\bin\openxr_loader.dll">
            <Link>%(Filename)%(Extension)</Link>
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
            <DeploymentContent>true</DeploymentContent>
        </None>
    </ItemGroup>

    <Target Name="EnsurePropsImported" BeforeTargets="PrepareForBuild">
        <Error Condition="'$(OpenXRLoaderPackageRoot)'==''" Text="OpenXRLoaderPackageRoot property missing. Project is malformed. Try removing and re-adding the NuGet reference." />
    </Target>

</Project>