7853e7abe2
Worth noting that this does NOT currently build, thanks to a few lines in libass that are not compatible with vc++. I'll bump the libass commit when MrSmile's pr gets merged and this is remedied. You can apply this commit to remedy that: 5317a8dd89
Also worth noting that while libass switched to nasm, I haven't done so here because it wasn't worth the effort, so I just made a questionable change to the yasm.targets to emulate nasm behavior
101 lines
3.2 KiB
XML
101 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<PropertyGroup>
|
|
<_PropertySheetDisplayName>Yasm compile targets</_PropertySheetDisplayName>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<BuildCompileTargets>
|
|
_YasmAssemble;
|
|
$(BuildCompileTargets)
|
|
</BuildCompileTargets>
|
|
</PropertyGroup>
|
|
<ItemDefinitionGroup>
|
|
<Yasm>
|
|
<InputRelativeSourceDir></InputRelativeSourceDir>
|
|
<Include></Include>
|
|
<ExcludeFromBuild>false</ExcludeFromBuild>
|
|
<Config Condition="'$(Platform)'=='Win32'">-m x86</Config>
|
|
<Config Condition="'$(Platform)'=='x64'">-m amd64</Config>
|
|
</Yasm>
|
|
</ItemDefinitionGroup>
|
|
|
|
<Target
|
|
Name="_YasmAssemble"
|
|
DependsOnTargets="ComputeYasmOutputs;YasmAssemble"
|
|
Condition="'@(Yasm)' != ''"
|
|
/>
|
|
|
|
<!-- See standard-outdirs.props for explanation of the logic here -->
|
|
<Target
|
|
Name="ComputeYasmOutputs"
|
|
Inputs="@(Yasm)"
|
|
Outputs="%(InputRelativeSourceDir)|%(RelativeDir)"
|
|
>
|
|
<CalculateOutputDir
|
|
Items="@(Yasm)"
|
|
SourceDir="%(InputRelativeSourceDir)"
|
|
DestinationDir=".\"
|
|
Condition="'%(Yasm.InputRelativeSourceDir)' != ''"
|
|
>
|
|
<Output ItemName="_Yasm" TaskParameter="Outputs" />
|
|
</CalculateOutputDir>
|
|
<ItemGroup>
|
|
<!-- If the items don't have the InputRelativeSourceDir metadata, still
|
|
copy them to _Yasm and add an OutputDir metadata to them. -->
|
|
<_Yasm Include="@(Yasm)" Condition="'%(Yasm.InputRelativeSourceDir)' == ''">
|
|
<OutputDir></OutputDir>
|
|
</_Yasm>
|
|
<!-- Remove items marked for exclusion (e.g. due to platform) -->
|
|
<_Yasm Remove="@(_Yasm->WithMetadataValue('ExcludeFromBuild','true'))" />
|
|
</ItemGroup>
|
|
</Target>
|
|
<Target
|
|
Name="ComputeYasmFinalOutputDir"
|
|
Inputs="@(_Yasm)"
|
|
Outputs="%(OutputDir)|%(RelativeDir)"
|
|
>
|
|
<ItemGroup>
|
|
<_Yasm>
|
|
<Include>%(Include) -I%(RootDir)%(Directory)..\</Include>
|
|
<OutputDir Condition="'%(OutputDir)' == '.\'"></OutputDir>
|
|
<RelativeOutputDir>%(OutputDir)</RelativeOutputDir>
|
|
<OutputDir>$(AegisubObjectDir)%(OutputDir)</OutputDir>
|
|
</_Yasm>
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target
|
|
Name="YasmCreateOutputDir"
|
|
DependsOnTargets="ComputeYasmFinalOutputDir"
|
|
Inputs="@(_Yasm)"
|
|
Outputs="@(_Yasm->'%(OutputDir)')"
|
|
>
|
|
<MakeDir
|
|
Directories="@(_Yasm->'%(OutputDir)')"
|
|
/>
|
|
</Target>
|
|
|
|
<Target
|
|
Name="YasmAssemble"
|
|
DependsOnTargets="ComputeYasmFinalOutputDir;YasmCreateOutputDir"
|
|
Inputs="@(_Yasm)"
|
|
Outputs="%(_Yasm.OutputDir)%(_Yasm.Filename).obj"
|
|
>
|
|
<Message
|
|
Importance="High"
|
|
Text="%(_Yasm.RelativeOutputDir)%(_Yasm.Filename)%(_Yasm.Extension)"
|
|
/>
|
|
<Exec
|
|
Command="Yasm -f win32 %(_Yasm.Config) %(_Yasm.Include) -o "%(_Yasm.OutputDir)%(_Yasm.Filename).obj" "%(_Yasm.FullPath)""
|
|
WorkingDirectory="%(_Yasm.OutputDir)"
|
|
/>
|
|
<ItemGroup>
|
|
<Link Include="%(_Yasm.OutputDir)%(_Yasm.Filename).obj" />
|
|
<Lib Include="%(_Yasm.OutputDir)%(_Yasm.Filename).obj" />
|
|
<ImpLib Include="%(_Yasm.OutputDir)%(_Yasm.Filename).obj" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
</Project>
|