forked from Mirrors/freeswitch
78 lines
3.8 KiB
XML
78 lines
3.8 KiB
XML
<?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="openssl-version.props" Condition=" '$(OpenSSLVersionImported)' == ''"/>
|
|
<Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
|
|
</ImportGroup>
|
|
<PropertyGroup>
|
|
<OpensslPropsImported>true</OpensslPropsImported>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<LibraryConfiguration Condition="$(Configuration.ToLower().Contains('debug'))">Debug</LibraryConfiguration>
|
|
<LibraryConfiguration Condition="$(Configuration.ToLower().Contains('release'))">Release</LibraryConfiguration>
|
|
</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="opensslbinariesTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
|
|
<DownloadPackageTask
|
|
package="http://files.freeswitch.org/windows/packages/openssl/$(OpenSSLVersion)/openssl-$(OpenSSLVersion)-binaries-$(Platform.ToLower())-$(LibraryConfiguration.ToLower()).zip"
|
|
expectfileordirectory="$(OpenSSLLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\openssl.exe"
|
|
outputfolder=""
|
|
outputfilename=""
|
|
extractto="$(BaseDir)libs"
|
|
/>
|
|
</Target>
|
|
|
|
<Target Name="opensslheadersTarget" BeforeTargets="CustomBuild" DependsOnTargets="opensslbinariesTarget">
|
|
<DownloadPackageTask
|
|
package="http://files.freeswitch.org/windows/packages/openssl/$(OpenSSLVersion)/openssl-$(OpenSSLVersion)-headers.zip"
|
|
expectfileordirectory="$(OpenSSLLibDir)\include\openssl\ssl.h"
|
|
outputfolder=""
|
|
outputfilename=""
|
|
extractto="$(BaseDir)libs"
|
|
/>
|
|
</Target>
|
|
|
|
<Target Name="opensslcopyTarget" BeforeTargets="CustomBuild" DependsOnTargets="opensslbinariesTarget">
|
|
<ItemGroup>
|
|
<opensslFiles Include="$(OpenSSLLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\*.*"/>
|
|
</ItemGroup>
|
|
<Copy Condition="!exists('$(BaseDir)\$(Platform)\$(LibraryConfiguration)\openssl.exe')"
|
|
SourceFiles="@(opensslFiles)"
|
|
DestinationFiles="@(opensslFiles->'$(BaseDir)\$(Platform)\$(LibraryConfiguration)\%(Filename)%(Extension)')"
|
|
/>
|
|
</Target>
|
|
|
|
<ItemDefinitionGroup>
|
|
<ClCompile>
|
|
<AdditionalIncludeDirectories>$(OpenSSLLibDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
<AdditionalIncludeDirectories Condition="'$(Platform)'=='Win32'">$(OpenSSLLibDir)\include_x86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
<AdditionalIncludeDirectories Condition="'$(Platform)'=='x64'">$(OpenSSLLibDir)\include_x64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
<PreprocessorDefinitions>HAVE_LIBCRYPTO;OPENSSL;HAVE_OPENSSL;HAVE_OPENSSL_DTLS_SRTP;HAVE_OPENSSL_DTLS;HAVE_OPENSSL_DTLSv1_2_method;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
</ClCompile>
|
|
<Link>
|
|
<AdditionalLibraryDirectories>$(OpenSSLLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
<AdditionalDependencies>ws2_32.lib;crypt32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
</Link>
|
|
</ItemDefinitionGroup>
|
|
</Project> |