forked from signalwire/freeswitch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pcre.props
85 lines (73 loc) · 3.94 KB
/
pcre.props
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="pcre-version.props" Condition=" '$(pcreVersionImported)' == ''"/>
<Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<pcrePropsImported>true</pcrePropsImported>
</PropertyGroup>
<PropertyGroup>
<LibraryConfiguration Condition="$(Configuration.ToLower().Contains('debug'))">Debug</LibraryConfiguration>
<LibraryConfiguration Condition="$(Configuration.ToLower().Contains('release'))">Release</LibraryConfiguration>
<PCRELibraryFileName Condition=" '$(LibraryConfiguration)' == 'Debug' ">pcred</PCRELibraryFileName>
<PCRELibraryFileName Condition=" '$(LibraryConfiguration)' == 'Release' ">pcre</PCRELibraryFileName>
</PropertyGroup>
<PropertyGroup Label="UserMacros">
<pcreLibDir>$(BaseDir)libs\pcre-$(pcreVersion)</pcreLibDir>
</PropertyGroup>
<!--
Download Target.
Name must be unique.
By design, targets are executed only once per project.
Usage:
package: URI
expectfileordirectory: Skips the download and extraction if exists
outputfolder: Folder to store a downloaded file.
By default "$(BaseDir)libs", if empty
outputfilename: If not empty, overrides filename from URI.
.exe files don't get extracted
extractto: Folder to extract an archive to
-->
<Target Name="pcreBinariesDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/pcre/$(pcreVersion)/pcre-$(pcreVersion)-binaries-$(Platform.ToLower())-$(LibraryConfiguration.ToLower()).zip"
expectfileordirectory="$(pcreLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\lib\$(PCRELibraryFileName).lib"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="pcreHeadersDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/pcre/$(pcreVersion)/pcre-$(pcreVersion)-headers.zip"
expectfileordirectory="$(pcreLibDir)\include\pcre.h"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="pcrecopyTarget" BeforeTargets="CustomBuild" DependsOnTargets="pcreBinariesDownloadTarget">
<ItemGroup>
<pcreFiles Include="$(pcreLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\bin\$(PCRELibraryFileName).dll" />
</ItemGroup>
<Copy Condition="!exists('$(BaseDir)$(Platform)\$(LibraryConfiguration)\$(PCRELibraryFileName).dll')"
SourceFiles="@(pcreFiles)"
DestinationFiles="@(pcreFiles->'$(BaseDir)$(Platform)\$(LibraryConfiguration)\%(Filename)%(Extension)')"
/>
</Target>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(BaseDir)libs\pcre-$(pcreVersion)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)libs\pcre-$(pcreVersion)\binaries\$(Platform)\$(LibraryConfiguration)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies Condition=" '$(LibraryConfiguration)' == 'Debug' ">pcred.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies Condition=" '$(LibraryConfiguration)' == 'Release' ">pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>