2
0

pcre.props 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <ImportGroup Label="PropertySheets">
  4. <Import Project="pcre-version.props" Condition=" '$(pcreVersionImported)' == ''"/>
  5. <Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
  6. </ImportGroup>
  7. <PropertyGroup Label="UserMacros" />
  8. <PropertyGroup>
  9. <pcrePropsImported>true</pcrePropsImported>
  10. </PropertyGroup>
  11. <PropertyGroup>
  12. <LibraryConfiguration Condition="$(Configuration.ToLower().Contains('debug'))">Debug</LibraryConfiguration>
  13. <LibraryConfiguration Condition="$(Configuration.ToLower().Contains('release'))">Release</LibraryConfiguration>
  14. <PCRELibraryFileName Condition=" '$(LibraryConfiguration)' == 'Debug' ">pcred</PCRELibraryFileName>
  15. <PCRELibraryFileName Condition=" '$(LibraryConfiguration)' == 'Release' ">pcre</PCRELibraryFileName>
  16. </PropertyGroup>
  17. <PropertyGroup Label="UserMacros">
  18. <pcreLibDir>$(BaseDir)libs\pcre-$(pcreVersion)</pcreLibDir>
  19. </PropertyGroup>
  20. <!--
  21. Download Target.
  22. Name must be unique.
  23. By design, targets are executed only once per project.
  24. Usage:
  25. package: URI
  26. expectfileordirectory: Skips the download and extraction if exists
  27. outputfolder: Folder to store a downloaded file.
  28. By default "$(BaseDir)libs", if empty
  29. outputfilename: If not empty, overrides filename from URI.
  30. .exe files don't get extracted
  31. extractto: Folder to extract an archive to
  32. -->
  33. <Target Name="pcreBinariesDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
  34. <DownloadPackageTask
  35. package="http://files.freeswitch.org/windows/packages/pcre/$(pcreVersion)/pcre-$(pcreVersion)-binaries-$(Platform.ToLower())-$(LibraryConfiguration.ToLower()).zip"
  36. expectfileordirectory="$(pcreLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\lib\$(PCRELibraryFileName).lib"
  37. outputfolder=""
  38. outputfilename=""
  39. extractto="$(BaseDir)libs\"
  40. />
  41. </Target>
  42. <Target Name="pcreHeadersDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
  43. <DownloadPackageTask
  44. package="http://files.freeswitch.org/windows/packages/pcre/$(pcreVersion)/pcre-$(pcreVersion)-headers.zip"
  45. expectfileordirectory="$(pcreLibDir)\include\pcre.h"
  46. outputfolder=""
  47. outputfilename=""
  48. extractto="$(BaseDir)libs\"
  49. />
  50. </Target>
  51. <Target Name="pcrecopyTarget" BeforeTargets="CustomBuild" DependsOnTargets="pcreBinariesDownloadTarget">
  52. <ItemGroup>
  53. <pcreFiles Include="$(pcreLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\bin\$(PCRELibraryFileName).dll" />
  54. </ItemGroup>
  55. <Copy Condition="!exists('$(BaseDir)$(Platform)\$(LibraryConfiguration)\$(PCRELibraryFileName).dll')"
  56. SourceFiles="@(pcreFiles)"
  57. DestinationFiles="@(pcreFiles->'$(BaseDir)$(Platform)\$(LibraryConfiguration)\%(Filename)%(Extension)')"
  58. />
  59. </Target>
  60. <ItemDefinitionGroup>
  61. <ClCompile>
  62. <AdditionalIncludeDirectories>$(BaseDir)libs\pcre-$(pcreVersion)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  63. <MultiProcessorCompilation>true</MultiProcessorCompilation>
  64. <PreprocessorDefinitions>;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  65. </ClCompile>
  66. <Link>
  67. <AdditionalLibraryDirectories>$(SolutionDir)libs\pcre-$(pcreVersion)\binaries\$(Platform)\$(LibraryConfiguration)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
  68. <AdditionalDependencies Condition=" '$(LibraryConfiguration)' == 'Debug' ">pcred.lib;%(AdditionalDependencies)</AdditionalDependencies>
  69. <AdditionalDependencies Condition=" '$(LibraryConfiguration)' == 'Release' ">pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
  70. </Link>
  71. </ItemDefinitionGroup>
  72. <ItemGroup />
  73. </Project>