signalwire-client-c.props 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <ImportGroup Label="PropertySheets">
  4. <Import Project="signalwire-client-c-version.props" Condition=" '$(signalwire-client-cVersionImported)' == ''"/>
  5. </ImportGroup>
  6. <PropertyGroup>
  7. <signalwire-client-cPropsImported>true</signalwire-client-cPropsImported>
  8. </PropertyGroup>
  9. <PropertyGroup Label="UserMacros">
  10. <signalwire-client-cDir>$(BaseDir)libs\signalwire-client-c-$(signalwire-client-cVersion)</signalwire-client-cDir>
  11. </PropertyGroup>
  12. <!--
  13. Download Target.
  14. Name must be unique.
  15. By design, targets are executed only once per project.
  16. Usage:
  17. package: URI
  18. expectfileordirectory: Skips the download and extraction if exists
  19. outputfolder: Folder to store a downloaded file.
  20. By default "$(BaseDir)libs", if empty
  21. outputfilename: If not empty, overrides filename from URI.
  22. .exe files don't get extracted
  23. extractto: Folder to extract an archive to
  24. -->
  25. <Target Name="signalwire-client-cBinariesDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
  26. <DownloadPackageTask
  27. package="http://files.freeswitch.org/windows/packages/signalwire-client-c/$(signalwire-client-cVersion)/signalwire-client-c-$(signalwire-client-cVersion)-binaries-$(Platform.ToLower())-$(Configuration.ToLower()).zip"
  28. expectfileordirectory="$(signalwire-client-cDir)\binaries\$(Platform)\$(Configuration)\signalwire_client.dll"
  29. outputfolder=""
  30. outputfilename=""
  31. extractto="$(BaseDir)libs\"
  32. />
  33. </Target>
  34. <Target Name="signalwire-client-cHeadersDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
  35. <DownloadPackageTask
  36. package="http://files.freeswitch.org/windows/packages/signalwire-client-c/$(signalwire-client-cVersion)/signalwire-client-c-$(signalwire-client-cVersion)-headers.zip"
  37. expectfileordirectory="$(signalwire-client-cDir)\include\signalwire-client-c\client.h"
  38. outputfolder=""
  39. outputfilename=""
  40. extractto="$(BaseDir)libs\"
  41. />
  42. </Target>
  43. <Target Name="signalwire-client-ccopyTarget" BeforeTargets="CustomBuild" DependsOnTargets="signalwire-client-cBinariesDownloadTarget">
  44. <Message Text="Copying signalwire-client-c libraries to the freeswitch output folder." Importance="High" />
  45. <ItemGroup>
  46. <signalwire-client-cFiles Include="$(signalwire-client-cDir)\binaries\$(Platform)\$(Configuration)\*.dll"/>
  47. </ItemGroup>
  48. <Copy Condition="!exists('$(BaseDir)\$(Platform)\$(Configuration)\signalwire_client.dll')"
  49. SourceFiles="@(signalwire-client-cFiles)"
  50. DestinationFiles="@(signalwire-client-cFiles->'$(BaseDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)')"
  51. />
  52. </Target>
  53. <ItemDefinitionGroup>
  54. <ClCompile>
  55. <AdditionalIncludeDirectories>$(signalwire-client-cDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  56. <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
  57. </ClCompile>
  58. <Link>
  59. <AdditionalLibraryDirectories>$(signalwire-client-cDir)\binaries\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
  60. <AdditionalDependencies>signalwire_client.lib;%(AdditionalDependencies)</AdditionalDependencies>
  61. </Link>
  62. </ItemDefinitionGroup>
  63. </Project>