Add some dependency information to avoid pointlessly rebuilding ffmpeg
This commit is contained in:
parent
06aaaff16b
commit
d70094917b
1 changed files with 48 additions and 6 deletions
|
@ -66,7 +66,33 @@
|
||||||
</CfgArgs>
|
</CfgArgs>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Target Name="Configure">
|
<ItemGroup>
|
||||||
|
<ConfigureInput Include="$(FfmpegSrcDir)\configure" />
|
||||||
|
|
||||||
|
<ConfigureOutput Include="$(AegisubObjectDir)config.*" />
|
||||||
|
<ConfigureOutput Include="$(AegisubObjectDir)Makefile" />
|
||||||
|
<ConfigureOutput Include="$(AegisubObjectDir)libavutil\avconfig.h" />
|
||||||
|
|
||||||
|
<CompileInput Include="$(FfmpegSrcDir)\*.mak" />
|
||||||
|
<CompileInput Include="$(FfmpegSrcDir)\**\*.c" />
|
||||||
|
<CompileInput Include="$(FfmpegSrcDir)\**\*.asm" />
|
||||||
|
<CompileInput Include="$(FfmpegSrcDir)\**\Makefile" />
|
||||||
|
|
||||||
|
<CompileOutput Include="$(AegisubObjectDir)libavcodec\libavcodec.a" />
|
||||||
|
<CompileOutput Include="$(AegisubObjectDir)libavformat\libavformat.a" />
|
||||||
|
<CompileOutput Include="$(AegisubObjectDir)libavutil\libavutil.a" />
|
||||||
|
<CompileOutput Include="$(AegisubObjectDir)libswscale\libswscale.a" />
|
||||||
|
|
||||||
|
<InstallOutput Include="$(AegisubLibraryDir)libavcodec.a" />
|
||||||
|
<InstallOutput Include="$(AegisubLibraryDir)libavformat.a" />
|
||||||
|
<InstallOutput Include="$(AegisubLibraryDir)libavutil.a" />
|
||||||
|
<InstallOutput Include="$(AegisubLibraryDir)libswscale.a" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="Configure"
|
||||||
|
Inputs="@(ConfigureInput)"
|
||||||
|
Outputs="@(ConfigureOutput)"
|
||||||
|
>
|
||||||
<MsysPath ProjectDir="$(MSBuildThisFileDirectory)" Path="$(AegisubObjectDir)\temp">
|
<MsysPath ProjectDir="$(MSBuildThisFileDirectory)" Path="$(AegisubObjectDir)\temp">
|
||||||
<Output TaskParameter="Result" PropertyName="CfgPrefix" />
|
<Output TaskParameter="Result" PropertyName="CfgPrefix" />
|
||||||
</MsysPath>
|
</MsysPath>
|
||||||
|
@ -84,25 +110,41 @@
|
||||||
Arguments="$(CfgArgs) --prefix=$(CfgPrefix) --libdir=$(CfgLibPrefix) --incdir=$(CfgIncludePrefix)"
|
Arguments="$(CfgArgs) --prefix=$(CfgPrefix) --libdir=$(CfgLibPrefix) --incdir=$(CfgIncludePrefix)"
|
||||||
WorkingDirectory="$(AegisubObjectDir)"
|
WorkingDirectory="$(AegisubObjectDir)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- Ensure that Makefile has a recent modified time to avoid
|
||||||
|
rerunning configure pointlessly -->
|
||||||
|
<Touch Files="@(ConfigureOutput)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="Build">
|
<Target Name="Compile"
|
||||||
<Error Condition="!Exists('$(FfmpegSrcDir)')" Text="FFmpeg source not found at '$(FfmpegSrcDir)'" />
|
Inputs="@(ConfigureOutput);@(CompileInput)"
|
||||||
|
Outputs="@(CompileOutput)"
|
||||||
<CallTarget Targets="Configure" Condition="!Exists('$(AegisubObjectDir)\Makefile')" />
|
>
|
||||||
|
|
||||||
<ExecShellScript
|
<ExecShellScript
|
||||||
Command="make"
|
Command="make"
|
||||||
Arguments="-j$(NUMBER_OF_PROCESSORS)"
|
Arguments="-j$(NUMBER_OF_PROCESSORS)"
|
||||||
WorkingDirectory="$(AegisubObjectDir)"
|
WorkingDirectory="$(AegisubObjectDir)"
|
||||||
/>
|
/>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="Install"
|
||||||
|
Inputs="@(CompileOutput)"
|
||||||
|
Outputs="@(InstallOutput)"
|
||||||
|
>
|
||||||
<ExecShellScript
|
<ExecShellScript
|
||||||
Command="make install"
|
Command="make install"
|
||||||
WorkingDirectory="$(AegisubObjectDir)"
|
WorkingDirectory="$(AegisubObjectDir)"
|
||||||
/>
|
/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="Build">
|
||||||
|
<Error Condition="!Exists('$(FfmpegSrcDir)')" Text="FFmpeg source not found at '$(FfmpegSrcDir)'" />
|
||||||
|
|
||||||
|
<CallTarget Targets="Configure" />
|
||||||
|
<CallTarget Targets="Compile" />
|
||||||
|
<CallTarget Targets="Install" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
<Target Name="Clean">
|
<Target Name="Clean">
|
||||||
<RemoveDir Directories="$(AegisubObjectDir)" ContinueOnError="WarnAndContinue" />
|
<RemoveDir Directories="$(AegisubObjectDir)" ContinueOnError="WarnAndContinue" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
Loading…
Reference in a new issue