2
0

libks.props 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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="libks-version.props" Condition=" '$(libksVersionImported)' == ''"/>
  5. <Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
  6. </ImportGroup>
  7. <PropertyGroup>
  8. <libksPropsImported>true</libksPropsImported>
  9. </PropertyGroup>
  10. <PropertyGroup Label="UserMacros">
  11. <libksDir>libks-$(libksVersion)</libksDir>
  12. </PropertyGroup>
  13. <!--
  14. Download Target.
  15. Name must be unique.
  16. By design, targets are executed only once per project.
  17. Usage:
  18. package: URI
  19. expectfileordirectory: Skips the download and extraction if exists
  20. outputfolder: Folder to store a downloaded file.
  21. By default "$(BaseDir)libs", if empty
  22. outputfilename: If not empty, overrides filename from URI.
  23. .exe files don't get extracted
  24. extractto: Folder to extract an archive to
  25. -->
  26. <Target Name="libksBinariesDownloadTarget" BeforeTargets="Build" DependsOnTargets="7za">
  27. <DownloadPackageTask
  28. package="http://files.freeswitch.org/windows/packages/libks/$(libksVersion)/libks-$(libksVersion)-binaries-$(Platform.ToLower())-$(Configuration.ToLower()).zip"
  29. expectfileordirectory="$(libksDir)\binaries\$(Platform)\$(Configuration)\ks.dll"
  30. outputfolder=""
  31. outputfilename=""
  32. extractto="$(BaseDir)"
  33. />
  34. </Target>
  35. <Target Name="libksHeadersDownloadTarget" BeforeTargets="Build" DependsOnTargets="7za">
  36. <DownloadPackageTask
  37. package="http://files.freeswitch.org/windows/packages/libks/$(libksVersion)/libks-$(libksVersion)-headers.zip"
  38. expectfileordirectory="$(libksDir)\src\include\libks\ks.h"
  39. outputfolder=""
  40. outputfilename=""
  41. extractto="$(BaseDir)"
  42. />
  43. </Target>
  44. <ItemDefinitionGroup>
  45. <ClCompile>
  46. <AdditionalIncludeDirectories>$(libksDir)\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  47. <PreprocessorDefinitions>__PRETTY_FUNCTION__=__FUNCSIG__;WIN32;_WINDOWS;SWCLT_VERSION_MAJOR=1;SWCLT_VERSION_MINOR=0;SWCLT_VERSION_REVISION=0;_WIN32_WINNT=0x0600;_WINSOCK_DEPRECATED_NO_WARNINGS=1;WIN32_LEAN_AND_MEAN=1;KS_PLAT_WIN=1;NOMAXMIN=1;_CRT_SECURE_NO_WARNINGS=1;SWCLT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  48. </ClCompile>
  49. <Link>
  50. <AdditionalLibraryDirectories>$(libksDir)\binaries\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
  51. <AdditionalDependencies>ks.lib;%(AdditionalDependencies)</AdditionalDependencies>
  52. </Link>
  53. </ItemDefinitionGroup>
  54. </Project>