Aegisub/build/respack.targets
Thomas Goyne d3a4bed994 Port respack to lua
Simplifies the build system a little by cutting down on the number of
helpers that need to be built.
2014-05-08 10:39:18 -07:00

27 lines
1.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MiniLuaCommand>$(AegisubBinaryDir)luajit-minilua$(AegisubPlatformSuffix)</MiniLuaCommand>
<ResPackCommand>$(AegisubSourceBase)tools\respack.lua</ResPackCommand>
</PropertyGroup>
<Target
Name="ResPackGenerate"
BeforeTargets="ClCompile"
Inputs="@(ResPack)"
Outputs="%(ResPack.OutputDir)%(ResPack.OutputName).cpp;%(ResPack.OutputDir)%(ResPack.OutputName).h"
>
<Exec
Command="$(MiniLuaCommand) $(ResPackCommand) &quot;@(ResPack -> '%(FullPath)')&quot; &quot;%(ResPack.OutputDir)%(ResPack.OutputName).cpp&quot; &quot;%(ResPack.OutputDir)%(ResPack.OutputName).h&quot;"
WorkingDirectory="@(ResPack -> '%(RootDir)%(Directory)')"
/>
</Target>
<Target
Name="ResPackClean"
BeforeTargets="Clean"
DependsOnTargets="PrepareForBuild"
>
<Delete Files="%(ResPack.OutputDir)%(ResPack.OutputName).cpp;%(ResPack.OutputDir)%(ResPack.OutputName).h" />
</Target>
</Project>