<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Label="Globals">
    <ProjectGuid>{8804F253-DA67-4CC4-926B-0CD2AEE5778D}</ProjectGuid>
    <RootNamespace>libass</RootNamespace>
  </PropertyGroup>

  <!-- Aegisub project configuration -->
  <PropertyGroup Label="AegisubConfiguration">
    <AegisubProjectType>lib</AegisubProjectType>
  </PropertyGroup>

  <ImportGroup Label="PropertySheets">
    <Import Project="$(MSBuildThisFileDirectory)..\aegisub.props" />
  </ImportGroup>
  <ImportGroup Label="Targets">
    <Import Project="$(MSBuildThisFileDirectory)..\yasm.targets" />
  </ImportGroup>

  <!-- Project specific configuration -->
  <ItemDefinitionGroup>
    <ClCompile>
      <AdditionalIncludeDirectories>
        $(LibassSrcDir)\libass;
        $(MSBuildThisFileDirectory);
        $(AegisubSourceBase)\include\fribidi;
        %(AdditionalIncludeDirectories)
      </AdditionalIncludeDirectories>
      <PreprocessorDefinitions>
        inline=__inline;
        FRIBIDI_ENTRY=;
        %(PreprocessorDefinitions)
      </PreprocessorDefinitions>
    </ClCompile>
    <InstallHeader>
      <HeaderRoot>$(LibassSrcDir)\libass</HeaderRoot>
      <Destination>ass\</Destination>
    </InstallHeader>
    <Yasm>
      <Config Condition="'$(Platform)'=='Win32'">%(Config) -DARCH_X86_64=0 -DPREFIX -DHAVE_ALIGNED_STACK=0</Config>
      <Config Condition="'$(Platform)'=='x64'">%(Config) -DARCH_X86_64=1 -DHAVE_ALIGNED_STACK=1</Config>
    </Yasm>
  </ItemDefinitionGroup>

  <!-- Source files -->
  <ItemGroup>
    <InstallHeader Include="$(LibassSrcDir)\libass\ass.h" />
    <InstallHeader Include="$(LibassSrcDir)\libass\ass_types.h" />
  </ItemGroup>
  <ItemGroup>
    <Yasm Include="$(LibassSrcDir)\libass\x86\be_blur.asm">
      <ExcludeFromBuild Condition="'$(Platform)'!='x64'">true</ExcludeFromBuild>
    </Yasm>
    <Yasm Include="$(LibassSrcDir)\libass\x86\blend_bitmaps.asm" />
    <Yasm Include="$(LibassSrcDir)\libass\x86\blur.asm" />
    <Yasm Include="$(LibassSrcDir)\libass\x86\cpuid.asm" />
    <Yasm Include="$(LibassSrcDir)\libass\x86\rasterizer.asm" />
    <None Include="$(LibassSrcDir)\libass\x86\x86inc.asm" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="$(LibassSrcDir)\libass\ass.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_bitmap.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_cache.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_cache_template.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_drawing.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_font.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_library.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_parse.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_render.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_shaper.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_types.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\ass_utils.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\x86\be_blur.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\x86\blend_bitmaps.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\x86\cpuid.h" />
    <ClInclude Include="$(LibassSrcDir)\libass\x86\rasterizer.h" />
    <ClInclude Include="$(MSBuildThisFileDirectory)config.h" />
    <ClInclude Include="$(MSBuildThisFileDirectory)strings.h" />
    <ClInclude Include="$(MSBuildThisFileDirectory)unistd.h" />
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="$(LibassSrcDir)\libass\ass.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_bitmap.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_blur.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_cache.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_drawing.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_font.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_fontselect.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_library.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_parse.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_rasterizer.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_rasterizer_c.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_render.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_render_api.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_shaper.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_string.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_strtod.c" />
    <ClCompile Include="$(LibassSrcDir)\libass\ass_utils.c" />
    <ClCompile Include="..\..\src\libass_gdi_fontselect.cpp" />
  </ItemGroup>

  <!-- Project References -->
  <ItemGroup>
    <ProjectReference Include="..\freetype2\freetype.vcxproj">
      <Project>{78b079bd-9fc7-4b9e-b4a6-96da0f00248b}</Project>
    </ProjectReference>
    <ProjectReference Include="..\fribidi\fribidi.vcxproj">
      <Project>{fb8e8d19-a4d6-4181-943c-282075f49b41}</Project>
    </ProjectReference>
  </ItemGroup>
</Project>