2017-06-02 18:32:21 -04:00
|
|
|
<?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="lua-version.props" Condition=" '$(LuaVersionImported)' == '' "/>
|
2018-03-30 13:04:34 -04:00
|
|
|
<Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
|
2017-06-02 18:32:21 -04:00
|
|
|
</ImportGroup>
|
|
|
|
<PropertyGroup Label="UserMacros">
|
|
|
|
<LuaLibDir>$(SolutionDir)libs\lua-$(LuaVersion)</LuaLibDir>
|
|
|
|
</PropertyGroup>
|
2018-03-30 13:04:34 -04:00
|
|
|
|
|
|
|
<!--
|
|
|
|
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="luaBinariesDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
|
|
|
|
<DownloadPackageTask
|
|
|
|
package="http://files.freeswitch.org/windows/packages/lua/$(luaVersion)/lua-$(luaVersion)-binaries-$(Platform.ToLower())-$(Configuration.ToLower()).zip"
|
|
|
|
expectfileordirectory="$(LuaLibDir)\binaries\$(Platform)\$(Configuration)\lua53.dll"
|
|
|
|
outputfolder=""
|
|
|
|
outputfilename=""
|
|
|
|
extractto="$(BaseDir)libs\"
|
|
|
|
/>
|
|
|
|
</Target>
|
|
|
|
<Target Name="luaHeadersDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
|
|
|
|
<DownloadPackageTask
|
|
|
|
package="http://files.freeswitch.org/windows/packages/lua/$(luaVersion)/lua-$(luaVersion)-headers.zip"
|
|
|
|
expectfileordirectory="$(LuaLibDir)\include\lua.h"
|
|
|
|
outputfolder=""
|
|
|
|
outputfilename=""
|
|
|
|
extractto="$(BaseDir)libs\"
|
|
|
|
/>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="luacopyTarget" BeforeTargets="CustomBuild" DependsOnTargets="luaBinariesDownloadTarget">
|
|
|
|
<Message Text="Copying lua libraries to the freeswitch output folder." Importance="High" />
|
|
|
|
<ItemGroup>
|
|
|
|
<luaFiles Include="$(LuaLibDir)\binaries\$(Platform)\$(Configuration)\*.dll"/>
|
|
|
|
</ItemGroup>
|
|
|
|
<Copy Condition="!exists('$(BaseDir)\$(Platform)\$(Configuration)\lua53.dll')"
|
|
|
|
SourceFiles="@(luaFiles)"
|
|
|
|
DestinationFiles="@(luaFiles->'$(BaseDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)')"
|
|
|
|
/>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
2017-06-02 18:32:21 -04:00
|
|
|
<ItemDefinitionGroup>
|
|
|
|
<ClCompile>
|
2018-03-30 13:04:34 -04:00
|
|
|
<AdditionalIncludeDirectories>$(LuaLibDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
2017-06-02 18:32:21 -04:00
|
|
|
</ClCompile>
|
2018-03-30 13:04:34 -04:00
|
|
|
<Link>
|
|
|
|
<AdditionalLibraryDirectories>$(LuaLibDir)\binaries\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
|
|
<AdditionalDependencies>lua53.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
|
|
</Link>
|
2017-06-02 18:32:21 -04:00
|
|
|
</ItemDefinitionGroup>
|
|
|
|
</Project>
|