forked from charlesw/tesseract-vs2012
-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.proj
97 lines (87 loc) · 3.7 KB
/
build.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Package" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SourceDir>$(MSBuildProjectDirectory)</SourceDir>
<BuildDir>$(MSBuildProjectDirectory)\build</BuildDir>
<ReleaseDir>$(MSBuildProjectDirectory)\release</ReleaseDir>
<ZLibDir>$(MSBuildProjectDirectory)\zlib</ZLibDir>
<LibJpegDir>$(MSBuildProjectDirectory)\libjpeg</LibJpegDir>
<LibPngDir>$(MSBuildProjectDirectory)\libpng</LibPngDir>
<LibGifDir>$(MSBuildProjectDirectory)\giflib</LibGifDir>
<LibTiffDir>$(MSBuildProjectDirectory)\libtiff\libtiff</LibTiffDir>
<LibLeptDir>$(MSBuildProjectDirectory)\liblept</LibLeptDir>
</PropertyGroup>
<ItemGroup>
<Template Include="$(SourceDir)\AssemblyVersionInfo.template.cs" />
<Flavor Include="$(SourceDir)\Tesseract.sln">
<Configuration>DLL_Debug</Configuration>
<Platform>Win32</Platform>
</Flavor>
<Flavor Include="$(SourceDir)\Tesseract.sln">
<Configuration>DLL_Release</Configuration>
<Platform>Win32</Platform>
</Flavor>
<Flavor Include="$(SourceDir)\Tesseract.sln">
<Configuration>DLL_Debug</Configuration>
<Platform>x64</Platform>
</Flavor>
<Flavor Include="$(SourceDir)\Tesseract.sln">
<Configuration>DLL_Release</Configuration>
<Platform>x64</Platform>
</Flavor>
<Flavor Include="$(SourceDir)\Tesseract.sln">
<Configuration>LIB_Debug</Configuration>
<Platform>Win32</Platform>
</Flavor>
<Flavor Include="$(SourceDir)\Tesseract.sln">
<Configuration>LIB_Release</Configuration>
<Platform>Win32</Platform>
</Flavor>
<Flavor Include="$(SourceDir)\Tesseract.sln">
<Configuration>LIB_Debug</Configuration>
<Platform>x64</Platform>
</Flavor>
<Flavor Include="$(SourceDir)\Tesseract.sln">
<Configuration>LIB_Release</Configuration>
<Platform>x64</Platform>
</Flavor>
<Header Include="$(ZLibDir)\include\zconf.h" />
<Header Include="$(ZLibDir)\include\zlib.h" />
<Header Include="$(LibPngDir)\include\png.h" />
<Header Include="$(LibPngDir)\include\pngconf.h" />
<Header Include="$(LibJpegDir)\include\jconfig.h" />
<Header Include="$(LibJpegDir)\include\jerror.h" />
<Header Include="$(LibJpegDir)\include\jmorecfg.h" />
<Header Include="$(LibJpegDir)\include\jpeglib.h" />
<Header Include="$(LibTiffDir)\include\tif_config.h" />
<Header Include="$(LibTiffDir)\include\tiff.h" />
<Header Include="$(LibTiffDir)\include\tiffconf.h" />
<Header Include="$(LibTiffDir)\include\tiffio.h" />
<Header Include="$(LibTiffDir)\include\tiffvers.h" />
<Header Include="$(LibGifDir)\include\gif_lib.h" />
<LeptHeader Include="$(LibLeptDir)\include\*.h" />
</ItemGroup>
<Target Name="ExpandFlavors">
<CreateItem Include="@(Flavor)" AdditionalMetadata="Properties=Configuration=%(Flavor.Configuration)%3BPlatform=%(Flavor.Platform)">
<Output TaskParameter="Include" ItemName="ProjectToBuild" />
</CreateItem>
</Target>
<Target Name="Clean" DependsOnTargets="ExpandFlavors">
<MSBuild Projects="@(ProjectToBuild)" Targets="Clean" />
<RemoveDir Directories="$(BuildDir)" />
</Target>
<Target Name="Build" DependsOnTargets="ExpandFlavors">
<MSBuild Projects="@(ProjectToBuild)" Targets="Build" />
<ItemGroup>
<LibFile Include="$(BuildDir)\lib\**\*.dll;
$(BuildDir)\lib\**\*.lib;"/>
</ItemGroup>
</Target>
<Target Name="Package" DependsOnTargets="Build">
<RemoveDir Directories='$(ReleaseDir)'/>
<MakeDir Directories='$(ReleaseDir)'/>
<Copy SourceFiles="@(Header)" DestinationFolder="$(ReleaseDir)\include" />
<Copy SourceFiles="@(LeptHeader)" DestinationFolder="$(ReleaseDir)\include\leptonica" />
<Copy SourceFiles="@(LibFile)" DestinationFolder="$(ReleaseDir)\lib\%(RecursiveDir)" />
</Target>
</Project>