Aegisub/aegisub/build/msbuild/directx.props
Niels Martin Hansen 73905fb1b5 Add some DirectX detection.
Originally committed to SVN as r5180.
2011-01-11 22:04:47 +00:00

31 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PropertySheetDisplayName>DirectSound support</_PropertySheetDisplayName>
</PropertyGroup>
<PropertyGroup>
<DirectXSDKDir Condition="'$(DirectXSDKDir)'==''">$(DXSDK_DIR)</DirectXSDKDir>
<IncludePath>$(DXSDK_DIR)\Include;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Platform)'=='Win32'">$(DirectXSDKDir)\Lib\x86;$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Platform)'=='x64'" >$(DirectXSDKDir)\Lib\x64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>dsound.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Target
Name="AegisubCheckDirectXSDK"
BeforeTargets="PrepareForBuild"
>
<Error
Condition="'$(DirectXSDKDir)'=='' or !Exists('$(DirectXSDKDir)\Include\dsound.h')"
Text="DirectX SDK not found, check that the DXSDK_DIR environment is set. If you do not want to use DirectSound set the AegisubUseDSound property to false in a user config."
/>
</Target>
<ItemGroup>
<AegisubCheckDirectXSDK Include="dsound" />
</ItemGroup>
</Project>