Add msbuild build system for fribidi

Thankfully the release tarball comes with pre-built versions of
the generated files.
This commit is contained in:
Thomas Goyne 2014-05-08 14:44:12 -07:00
parent 2e40f2b246
commit 36d9a3c490
4 changed files with 56 additions and 90 deletions

View File

@ -15,7 +15,6 @@
advapi32.lib;
wsock32.lib;
opengl32.lib;
fribidi.lib;
%(AdditionalDependencies)
</AdditionalDependencies>
</Link>

View File

@ -0,0 +1,20 @@
#ifndef FRIBIDI_CONFIG_H
#define FRIBIDI_CONFIG_H
#define FRIBIDI "fribidi"
#define FRIBIDI_NAME "GNU FriBidi"
#define FRIBIDI_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?product=fribidi"
#define FRIBIDI_VERSION "0.19.6"
#define FRIBIDI_MAJOR_VERSION 0
#define FRIBIDI_MINOR_VERSION 19
#define FRIBIDI_MICRO_VERSION 6
#define FRIBIDI_INTERFACE_VERSION 3
#define FRIBIDI_INTERFACE_VERSION_STRING "3"
#define FRIBIDI_CHARSETS 0
#define FRIBIDI_USE_GLIB 0
#define FRIBIDI_SIZEOF_INT 4
#define HAVE_STRINGIZE 1
#endif

View File

@ -2,8 +2,8 @@
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{FB8E8D19-A4D6-4181-943C-282075F49B41}</ProjectGuid>
<Keyword>MakeFileProj</Keyword>
<ConfigurationType>Makefile</ConfigurationType>
<RootNamespace>fribidi</RootNamespace>
<AegisubProjectType>lib</AegisubProjectType>
</PropertyGroup>
<!-- Aegisub project configuration -->
@ -11,10 +11,26 @@
<Import Project="$(MSBuildThisFileDirectory)..\aegisub.props" />
</ImportGroup>
<!-- Project specific configuration -->
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>
$(FribidiSrcDir)\lib;
$(MSBuildThisFileDirectory);
%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
FRIBIDI_ENTRY=;
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- Download fribidi -->
<UsingTask TaskName="TarballProject" AssemblyFile="$(AegisubBinaryDir)BuildTasks.dll" />
<Target
Name="Download"
BeforeTargets="ClCompile"
Inputs="$(FribidiSrcDir)aegisub.hash"
Outputs="$(FribidiSrcDir)nonexistent-file"
>
@ -25,90 +41,21 @@
/>
</Target>
<!-- Build it -->
<PropertyGroup Label="ConfigArgs">
<Cflags>-nologo -DFRIBIDI_ENTRY=\"\"</Cflags>
<CfgDebug Condition="'$(Configuration)' == 'Debug'">--enable-debug CFLAGS="-MDd $(Cflags)"</CfgDebug>
<CfgDebug Condition="'$(Configuration)' == 'Release'">--disable-debug CFLAGS="-MD $(Cflags)"</CfgDebug>
<CfgArgs>
--enable-static
--disable-shared
--disable-dependency-tracking
--without-glib
$(CfgDebug)
</CfgArgs>
<AbsSrcDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)$(FribidiSrcDir)'))</AbsSrcDir>
</PropertyGroup>
<!-- Source files -->
<ItemGroup>
<AutomakeFiles Include="$(AbsSrcDir)\**\*.am" />
<SourceFiles Include="$(AbsSrcDir)\**\*.c" />
<SourceFiles Include="$(AbsSrcDir)\**\*.h" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-arabic.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-bidi-types.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-bidi.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-deprecated.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-joining-types.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-joining.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-mem.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-mirroring.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-run.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi-shape.c" />
<ClCompile Include="$(FribidiSrcDir)\lib\fribidi.c" />
<InstallHeader Include="$(FribidiSrcDir)\lib\*.h;$(MSBuildThisFileDirectory)fribidi-config.h">
<Destination>fribidi\</Destination>
</InstallHeader>
</ItemGroup>
<Target Name="Configure"
Inputs="$(AbsSrcDir)\configure"
Outputs="$(AegisubObjectDir)Makefile"
>
<MsysPath Path="$(AegisubObjectDir)\temp">
<Output TaskParameter="Result" PropertyName="CfgPrefix" />
</MsysPath>
<MsysPath Path="$(MSBuildThisFileDirectory)../../include">
<Output TaskParameter="Result" PropertyName="CfgIncludePrefix" />
</MsysPath>
<MsysPath Path="$(AegisubLibraryDir)">
<Output TaskParameter="Result" PropertyName="CfgLibPrefix" />
</MsysPath>
<ExecShellScript
Command="$(AbsSrcDir)\configure"
Arguments="$(CfgArgs) --prefix=$(CfgPrefix) --libdir=$(CfgLibPrefix) --includedir=$(CfgIncludePrefix)"
WorkingDirectory="$(AegisubObjectDir)"
Configuration="@(ExecShellScript)"
/>
<!-- fribidi defines the symbols to export twice, which causes errors -->
<UpdateFile File="$(AegisubObjectDir)lib\Makefile" Find=" %24(am__append_1)" Replacement="" />
<!-- We only want the library and the docs want c2man, so remove
unused stuff from SUBDIRS -->
<UpdateFile File="$(AegisubObjectDir)Makefile" Find=" bin doc test" Replacement="" />
</Target>
<Target Name="Compile"
Inputs="$(AegisubObjectDir)Makefile;@(SourceFiles)"
Outputs="$(AegisubObjectDir)lib\.libs\fribidi.lib"
>
<ExecShellScript
Command="make"
Arguments=" "
WorkingDirectory="$(AegisubObjectDir)"
Configuration="@(ExecShellScript)"
/>
<Touch Files="$(AegisubObjectDir)lib\.libs\fribidi.lib" />
</Target>
<Target Name="Install"
Inputs="$(AegisubObjectDir)lib\.libs\fribidi.lib"
Outputs="$(AegisubLibraryDir)fribidi.lib"
>
<ExecShellScript
Command="make install"
WorkingDirectory="$(AegisubObjectDir)"
Configuration="@(ExecShellScript)"
/>
</Target>
<Target Name="Build">
<CallTarget Targets="Download;Configure;Compile;Install" />
</Target>
<Target Name="Clean">
<RemoveDir Directories="$(AegisubObjectDir)" ContinueOnError="WarnAndContinue" />
</Target>
<Target Name="Rebuild">
<CallTarget Targets="Clean;Build" />
</Target>
</Project>

View File

@ -356,7 +356,7 @@
<ClInclude Include="$(IcuSrcDir)\common\uvectr64.h" />
<ClInclude Include="$(IcuSrcDir)\common\wintz.h" />
<InstallHeader Include="$(IcuSrcDir)\common\unicode\*.h">
<Destination>unicode</Destination>
<Destination>unicode\</Destination>
</InstallHeader>
</ItemGroup>
<ItemGroup>
@ -681,7 +681,7 @@
<ClInclude Include="$(IcuSrcDir)\i18n\uspoof_impl.h" />
<ClInclude Include="$(IcuSrcDir)\i18n\uspoof_wsconf.h" />
<InstallHeader Include="$(IcuSrcDir)\i18n\unicode\*.h">
<Destination>unicode</Destination>
<Destination>unicode\</Destination>
</InstallHeader>
</ItemGroup>
<ItemGroup>
@ -689,4 +689,4 @@
<Project>{fcaed410-90ef-4ef9-916c-4b86dc13a3cf}</Project>
</ProjectReference>
</ItemGroup>
</Project>
</Project>