Add some DirectX detection.

Originally committed to SVN as r5180.
This commit is contained in:
Niels Martin Hansen 2011-01-11 22:04:47 +00:00
parent 87ac25bfa7
commit 73905fb1b5
2 changed files with 32 additions and 0 deletions

View file

@ -11,5 +11,6 @@
<Import Project="$(MSBuildThisFileDirectory)standard-outdirs.props" /> <Import Project="$(MSBuildThisFileDirectory)standard-outdirs.props" />
<Import Project="$(MSBuildThisFileDirectory)ft2.props" Condition="'$(AegisubUseFreetype)' == 'true'" /> <Import Project="$(MSBuildThisFileDirectory)ft2.props" Condition="'$(AegisubUseFreetype)' == 'true'" />
<Import Project="$(MSBuildThisFileDirectory)wx.props" Condition="'$(AegisubUseWxWidgets)' == 'true'" /> <Import Project="$(MSBuildThisFileDirectory)wx.props" Condition="'$(AegisubUseWxWidgets)' == 'true'" />
<Import Project="$(MSBuildThisFileDirectory)directx.props" Condition="'$(AegisubUseDSound)' == 'true'" />
</ImportGroup> </ImportGroup>
</Project> </Project>

View file

@ -0,0 +1,31 @@
<?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>