forked from signalwire/freeswitch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmariadb-connector-c.props
80 lines (67 loc) · 3.76 KB
/
mariadb-connector-c.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
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="mariadb-connector-c-version.props" Condition=" '$(mariadb-connector-cVersionImported)' == '' "/>
<Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
</ImportGroup>
<PropertyGroup>
<mariadb-connector-cPropsImported>true</mariadb-connector-cPropsImported>
</PropertyGroup>
<PropertyGroup Label="UserMacros">
<mariadb-connector-clibDir>$(BaseDir)libs\mariadb-connector-c-$(mariadb-connector-cVersion)</mariadb-connector-clibDir>
</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="mariadb-connector-cBinariesDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/mariadb-connector-c/$(mariadb-connector-cVersion)/mariadb-connector-c-$(mariadb-connector-cVersion)-binaries-$(Platform.ToLower())-$(Configuration.ToLower()).zip"
expectfileordirectory="$(mariadb-connector-clibDir)\binaries\$(Platform)\$(Configuration)\libmariadb.dll"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="mariadb-connector-cHeadersDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/mariadb-connector-c/$(mariadb-connector-cVersion)/mariadb-connector-c-$(mariadb-connector-cVersion)-headers.zip"
expectfileordirectory="$(mariadb-connector-clibDir)\include\mysql.h"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="mariadb-connector-ccopyTarget" AfterTargets="Build" DependsOnTargets="Build">
<ItemGroup>
<mariadb-connector-cFiles Include="$(mariadb-connector-clibDir)\binaries\$(Platform)\$(Configuration)\*.dll"/>
<libmariadb-plugins Include="$(mariadb-connector-clibDir)\binaries\$(Platform)\$(Configuration)\plugin\*.*" />
</ItemGroup>
<Copy Condition="!exists('$(BaseDir)\$(Platform)\$(Configuration)\libmariadb.dll')"
SourceFiles="@(mariadb-connector-cFiles)"
DestinationFiles="@(mariadb-connector-cFiles->'$(BaseDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)')"
/>
<Copy Condition="!exists('$(BaseDir)\$(Platform)\$(Configuration)\plugin\caching_sha2_password.dll')"
SourceFiles="@(libmariadb-plugins)"
DestinationFolder="$(BaseDir)\$(Platform)\$(Configuration)\libmariadb_plugin\"
/>
</Target>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(mariadb-connector-clibDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(mariadb-connector-clibDir)\binaries\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libmariadb.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>