Aegisub/aegisub/build/Aegisub/Aegisub.targets

188 lines
7.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2011 Niels Martin Hansen
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Aegisub Group nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Aegisub Project http://www.aegisub.org/
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Build credit text -->
<ItemDefinitionGroup Condition="'$(AegisubBuildCredit)'==''">
<ClCompile>
<PreprocessorDefinitions>BUILD_CREDIT="$(AegisubBuildCredit)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- Update checker -->
<ItemDefinitionGroup Condition="'$(AegisubUseUpdateChecker)'=='true'">
<ClCompile>
<PreprocessorDefinitions>
WITH_UPDATE_CHECKER;
UPDATE_CHECKER_SERVER="$(UpdateCheckerServer)";
UPDATE_CHECKER_BASE_URL="$(UpdateCheckerURL)";
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- Automation Lua support -->
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>WITH_AUTO4_LUA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(AegisubContribBase)lua51\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<!-- Hunspell support -->
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>WITH_HUNSPELL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(AegisubContribBase)hunspell\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<!-- CSRI helper library support -->
<ItemDefinitionGroup Condition="'$(AegisubUseCsri)'=='HelperLibrary'">
<ClCompile>
<PreprocessorDefinitions>WITH_CSRI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- CSRI external library support -->
<ItemDefinitionGroup Condition="'$(AegisubUseCsri)'=='External'">
<ClCompile>
<PreprocessorDefinitions>WITH_CSRI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(CsriLibraryPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(CsriLibraryName);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- libass support -->
<ItemDefinitionGroup Condition="'$(AegisubUseLibass)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_LIBASS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- Freetype 2 support -->
<ItemDefinitionGroup Condition="'$(AegisubUseFreetype2)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_FREETYPE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- Fontconfig support -->
<ItemDefinitionGroup Condition="'$(AegisubUseFontconfig)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_FONTCONFIG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- FFmpegSource support -->
<ItemDefinitionGroup Condition="'$(AegisubUseFfms)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_FFMS2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- Avisynth support -->
<ItemDefinitionGroup Condition="'$(AegisubUseAvisynth)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_AVISYNTH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- FFTW support -->
<ItemDefinitionGroup Condition="'$(AegisubUseFftw)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_FFTW3;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- DirectSound support -->
<PropertyGroup>
<DirectXSDKDir Condition="'$(DirectXSDKDir)'==''">$(DXSDK_DIR)</DirectXSDKDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(AegisubUseDSound)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_DIRECTSOUND;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DXSDK_DIR)\Include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories Condition="'$(Platform)'=='Win32'">$(DirectXSDKDir)\Lib\x86\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories Condition="'$(Platform)'=='x64'">$(DirectXSDKDir)\Lib\x64\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dsound.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Target Name="AegisubCheckDirectXSDK" BeforeTargets="PrepareForBuild" >
<Error
Condition="'$(DirectXSDKDir)'=='' or !Exists('$(DirectXSDKDir)\Include\dsound.h')"
Text="DirectX SDK not found, check that the DXSDK_DIR environment is set. If you do not want to use DirectSound set the AegisubUseDSound property to false in a user config."
/>
</Target>
<ItemGroup Condition="'$(AegisubUseDSound)'=='true'">
<AegisubCheckDirectXSDK Include="dsound" />
</ItemGroup>
<!-- Special builds -->
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions Condition="'$(StartupLog)'=='true'">WITH_STARTUPLOG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- General configuration, always required libraries -->
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>
HAVE_LITTLE_ENDIAN;
__STDC_FORMAT_MACROS;
NOMINMAX;
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(SrcDir)include\;
$(SrcDir)msvc\;
$(AegisubContribBase)iconv\include;
$(AegisubSourceBase)libaegisub\include;
$(AegisubSourceBase)build;
$(AegisubSourceBase)include;
%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<!-- Add property pages -->
<ItemGroup>
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Aegisub.xml" />
<ProjectTools Include="AegisubConfig" />
</ItemGroup>
</Project>