curl.props 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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="curl-version.props" Condition=" '$(curlVersionImported)' == '' "/>
  5. <Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
  6. <Import Project="openssl.props" Condition=" '$(OpensslPropsImported)' == '' "/>
  7. <Import Project="zlib.props" Condition=" '$(zlibImported)' == '' "/>
  8. </ImportGroup>
  9. <PropertyGroup>
  10. <CurlPropsImported>true</CurlPropsImported>
  11. </PropertyGroup>
  12. <PropertyGroup>
  13. <LibraryConfiguration Condition="$(Configuration.ToLower().Contains('debug'))">Debug</LibraryConfiguration>
  14. <LibraryConfiguration Condition="$(Configuration.ToLower().Contains('release'))">Release</LibraryConfiguration>
  15. </PropertyGroup>
  16. <PropertyGroup Label="UserMacros">
  17. <curlLibDir>$(SolutionDir)libs\curl-$(curlVersion)</curlLibDir>
  18. </PropertyGroup>
  19. <!--
  20. Download Target.
  21. Name must be unique.
  22. By design, targets are executed only once per project.
  23. Usage:
  24. package: URI
  25. expectfileordirectory: Skips the download and extraction if exists
  26. outputfolder: Folder to store a downloaded file.
  27. By default "$(BaseDir)libs", if empty
  28. outputfilename: If not empty, overrides filename from URI.
  29. .exe files don't get extracted
  30. extractto: Folder to extract an archive to
  31. -->
  32. <Target Name="curlBinariesDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
  33. <DownloadPackageTask
  34. package="http://files.freeswitch.org/windows/packages/curl/$(curlVersion)/curl-$(curlVersion)-binaries-$(Platform.ToLower())-$(LibraryConfiguration.ToLower()).zip"
  35. expectfileordirectory="$(curlLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\curl.lib"
  36. outputfolder=""
  37. outputfilename=""
  38. extractto="$(BaseDir)libs\"
  39. />
  40. </Target>
  41. <Target Name="curlHeadersDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
  42. <DownloadPackageTask
  43. package="http://files.freeswitch.org/windows/packages/curl/$(curlVersion)/curl-$(curlVersion)-headers.zip"
  44. expectfileordirectory="$(curlLibDir)\include\curl\curl.h"
  45. outputfolder=""
  46. outputfilename=""
  47. extractto="$(BaseDir)libs\"
  48. />
  49. </Target>
  50. <ItemDefinitionGroup>
  51. <ClCompile>
  52. <AdditionalIncludeDirectories>$(curlLibDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  53. <PreprocessorDefinitions>HAVE_CURL;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  54. </ClCompile>
  55. <Link>
  56. <AdditionalLibraryDirectories>$(curlLibDir)\binaries\$(Platform)\$(LibraryConfiguration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
  57. <AdditionalDependencies>curl.lib;Wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
  58. </Link>
  59. </ItemDefinitionGroup>
  60. </Project>