freeswitch/w32/lua.props

71 lines
3.0 KiB
Plaintext
Raw Normal View History

<?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)' == '' "/>
<Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<LuaLibDir>$(SolutionDir)libs\lua-$(LuaVersion)</LuaLibDir>
</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="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>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(LuaLibDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(LuaLibDir)\binaries\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>lua53.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>