Replace the post-build events with a new target with dep tracking and such

This commit is contained in:
Thomas Goyne 2012-11-12 16:20:27 -08:00
parent 6a0c790ff2
commit dbbb73651d
6 changed files with 46 additions and 26 deletions

View File

@ -43,4 +43,8 @@
AdditionalLibraryDirectories value gets cleared (but nothing else).
I'm not sure why. -->
<Import Project="$(MSBuildThisFileDirectory)wx.props" Condition="'$(AegisubUseWxWidgets)' == 'true'" />
<ImportGroup Label="Targets">
<Import Project="$(MSBuildThisFileDirectory)install.targets" />
</ImportGroup>
</Project>

View File

@ -68,15 +68,11 @@
</ClCompile>
</ItemDefinitionGroup>
<Target Name="CopyHeaders" AfterTargets="ClCompile">
<Copy
SourceFiles="$(FfmsSrcDir)\include\ffms.h;$(FfmsSrcDir)\include\ffmscompat.h"
DestinationFolder="$(AegisubSourceBase)include"
SkipUnchangedFiles="true"
/>
</Target>
<!-- Source files -->
<ItemGroup>
<InstallHeader Include="$(FfmsSrcDir)\include\ffms.h" />
<InstallHeader Include="$(FfmsSrcDir)\include\ffmscompat.h" />
</ItemGroup>
<ItemGroup>
<None Include="$(FfmsSrcDir)\src\avisynth\*.cpp" />
<None Include="$(FfmsSrcDir)\src\avisynth\*.h" />

View File

@ -54,15 +54,12 @@
<OpenMPSupport>true</OpenMPSupport>
<StructMemberAlignment>Default</StructMemberAlignment>
</ClCompile>
<PostBuildEvent>
<Command>
md $(AegisubSourceBase)\include 2&gt; NUL
copy $(FftwSrcDir)\api\fftw3.h $(AegisubSourceBase)\include
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<!-- Source files -->
<ItemGroup>
<InstallHeader Include="$(FftwSrcDir)\api\fftw3.h" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="config.h" />
</ItemGroup>

View File

@ -46,15 +46,14 @@
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
<PostBuildEvent>
<Command>
md $(AegisubSourceBase)\include\fontconfig 2&gt; NUL
copy $(FontconfigSrcDir)\fontconfig\*.h $(AegisubSourceBase)\include\fontconfig
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<!-- Source files -->
<ItemGroup>
<InstallHeader Include="$(FontconfigSrcDir)\fontconfig\*.h">
<Destination>fontconfig\</Destination>
</InstallHeader>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(FontconfigSrcDir)\win32\src\dirent.c" />
<ClCompile Include="$(FontconfigSrcDir)\src\fcatomic.c" />

View File

@ -45,15 +45,24 @@
<ResourceCompile>
<Culture>0x0409</Culture>
</ResourceCompile>
<PostBuildEvent>
<Command>
md $(AegisubSourceBase)\include 2&gt; NUL
xcopy /s /q /y $(Freetype2SrcDir)\include $(AegisubSourceBase)\include
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<!-- Source files -->
<ItemGroup>
<InstallHeader Include="$(Freetype2SrcDir)\include\ft2build.h" />
<InstallHeader Include="$(Freetype2SrcDir)\include\freetype\*.h">
<Destination>freetype\</Destination>
</InstallHeader>
<InstallHeader Include="$(Freetype2SrcDir)\include\freetype\config\*.h">
<Destination>freetype\config\</Destination>
</InstallHeader>
<InstallHeader Include="$(Freetype2SrcDir)\include\freetype\internal\*.h">
<Destination>freetype\internal\</Destination>
</InstallHeader>
<InstallHeader Include="$(Freetype2SrcDir)\include\freetype\internal\services*.h">
<Destination>freetype\internal\services\</Destination>
</InstallHeader>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(Freetype2SrcDir)\builds\win32\ftdebug.c" />
<ClCompile Include="$(Freetype2SrcDir)\src\autofit\autofit.c" />

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target
Name="InstallHeaders"
AfterTargets="ClCompile"
Inputs="@(InstallHeader)"
Outputs="$(AegisubSourceBase)include\%(InstallHeader.Destination)%(Filename)%(Extension)"
>
<Copy
SourceFiles="@(InstallHeader)"
DestinationFiles="$(AegisubSourceBase)include\%(InstallHeader.Destination)%(Filename)%(Extension)"
SkipUnchangedFiles="true"
/>
</Target>
</Project>