Skip to content

Commit

Permalink
FS-11075: [mod_amqp] Add mod_amqp to the Windows build.
Browse files Browse the repository at this point in the history
  • Loading branch information
andywolk authored and Muteesa Fred committed Jul 24, 2018
1 parent 443166d commit fe9f271
Show file tree
Hide file tree
Showing 7 changed files with 260 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,5 @@ libs/ilbc-*/
libs/broadvoice-*/
libs/libcodec2-*/
libs/libsilk-*/

libs/rabbitmq-c-*/
libs/rabbitmq-c-*.zip
15 changes: 15 additions & 0 deletions Freeswitch.2015.sln
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download libcodec2", "libs\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download libsilk", "libs\win32\Download libsilk.2015.vcxproj", "{08782D64-E775-4E96-B707-CC633A226F32}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_amqp", "src\mod\event_handlers\mod_amqp\mod_amqp.2015.vcxproj", "{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
Expand Down Expand Up @@ -2906,6 +2908,18 @@ Global
{08782D64-E775-4E96-B707-CC633A226F32}.Release|Win32.Build.0 = Release|Win32
{08782D64-E775-4E96-B707-CC633A226F32}.Release|x64.ActiveCfg = Release|Win32
{08782D64-E775-4E96-B707-CC633A226F32}.Release|x64.Build.0 = Release|Win32
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.All|Win32.ActiveCfg = Release|Win32
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.All|Win32.Build.0 = Release|Win32
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.All|x64.ActiveCfg = Release|x64
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.All|x64.Build.0 = Release|x64
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.Debug|Win32.ActiveCfg = Debug|Win32
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.Debug|Win32.Build.0 = Debug|Win32
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.Debug|x64.ActiveCfg = Debug|x64
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.Debug|x64.Build.0 = Debug|x64
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.Release|Win32.ActiveCfg = Release|Win32
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.Release|Win32.Build.0 = Release|Win32
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.Release|x64.ActiveCfg = Release|x64
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -3136,5 +3150,6 @@ Global
{CB4E68A1-8D19-4B5E-87B9-97A895E1BA17} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{9CFA562C-C611-48A7-90A2-BB031B47FE6D} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{08782D64-E775-4E96-B707-CC633A226F32} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
EndGlobalSection
EndGlobal
151 changes: 151 additions & 0 deletions src/mod/event_handlers/mod_amqp/mod_amqp.2015.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>mod_amqp</ProjectName>
<RootNamespace>mod_amqp</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="..\..\..\..\w32\basedir.props" />
<Import Project="..\..\..\..\w32\rabbitmq-c.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\w32\module_release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\w32\module_debug.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\w32\module_release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\w32\module_debug.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="mod_amqp.c" />
<ClCompile Include="mod_amqp_command.c" />
<ClCompile Include="mod_amqp_connection.c" />
<ClCompile Include="mod_amqp_logging.c" />
<ClCompile Include="mod_amqp_producer.c" />
<ClCompile Include="mod_amqp_utils.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mod_amqp.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2015.vcxproj">
<Project>{202d7a4e-760d-4d0e-afa1-d7459ced30ff}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
3 changes: 3 additions & 0 deletions src/mod/event_handlers/mod_amqp/mod_amqp.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
#include <amqp.h>
#include <amqp_framing.h>
#include <amqp_tcp_socket.h>

#ifndef _MSC_VER
#include <strings.h>
#endif

#define MAX_LOG_MESSAGE_SIZE 1024
#define AMQP_MAX_HOSTS 4
Expand Down
8 changes: 8 additions & 0 deletions w32/Setup/Setup.2015.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,14 @@
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
<ProjectReference Include="..\..\src\mod\event_handlers\mod_amqp\mod_amqp.2015.vcxproj">
<Name>mod_amqp</Name>
<Project>{7ac7ab4f-5ef3-40a0-ad2b-cf4d9720fac3}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
<ProjectReference Include="..\..\src\mod\event_handlers\mod_cdr_csv\mod_cdr_csv.2015.vcxproj">
<Name>mod_cdr_csv</Name>
<Project>{44d7deaf-fda5-495e-8b9d-1439e4f4c21e}</Project>
Expand Down
19 changes: 19 additions & 0 deletions w32/rabbitmq-c-version.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="basedir.props" Condition=" '$(BaseDirImported)' == ''"/>
</ImportGroup>
<PropertyGroup Label="UserMacros">
<rabbitmq_cVersion>0.8.0</rabbitmq_cVersion>
</PropertyGroup>
<PropertyGroup>
<rabbitmq_cVersionImported>true</rabbitmq_cVersionImported>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup>
<BuildMacro Include="rabbitmq_cVersion">
<Value>$(rabbitmq_cVersion)</Value>
</BuildMacro>
</ItemGroup>
</Project>
62 changes: 62 additions & 0 deletions w32/rabbitmq-c.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?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="rabbitmq-c-version.props" Condition=" '$(rabbitmq_cVersionImported)' == '' "/>
<Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
</ImportGroup>

<PropertyGroup Label="UserMacros">
<rabbitmq_c_libDir>$(BaseDir)libs\rabbitmq-c-$(rabbitmq_cVersion)</rabbitmq_c_libDir>
</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="rabbitmq-c-binariesTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/rabbitmq-c/$(rabbitmq_cVersion)/rabbitmq-c-$(rabbitmq_cVersion)-binaries-$(Platform.ToLower())-$(Configuration.ToLower()).zip"
expectfileordirectory="$(rabbitmq_c_libDir)\binaries\$(Platform.ToLower())\$(Configuration.ToLower())\librabbitmq.4.lib"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs"
/>
</Target>

<Target Name="rabbitmq-c-headersTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/rabbitmq-c/$(rabbitmq_cVersion)/rabbitmq-c-$(rabbitmq_cVersion)-headers.zip"
expectfileordirectory="$(rabbitmq_c_libDir)\include\amqp.h"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs"
/>
</Target>

<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(rabbitmq_c_libDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(rabbitmq_c_libDir)\binaries\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>librabbitmq.4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>

</Project>

0 comments on commit fe9f271

Please sign in to comment.