FS-11101: [mod_cv] Add mod_cv to the Windows build.

This commit is contained in:
Andrey Volk 2018-04-10 02:12:07 +03:00 committed by Muteesa Fred
parent 727df6be1b
commit 184fbd6a9f
5 changed files with 247 additions and 0 deletions

View File

@ -638,6 +638,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_odbc_cdr", "src\mod\eve
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_cdr_sqlite", "src\mod\event_handlers\mod_cdr_sqlite\mod_cdr_sqlite.2015.vcxproj", "{2CA661A7-01DD-4532-BF88-B6629DFB544A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_cv", "src\mod\applications\mod_cv\mod_cv.2015.vcxproj", "{40C4E2A2-B49B-496C-96D6-C04B890F7F88}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@ -2942,6 +2944,18 @@ Global
{2CA661A7-01DD-4532-BF88-B6629DFB544A}.Release|Win32.Build.0 = Release|Win32
{2CA661A7-01DD-4532-BF88-B6629DFB544A}.Release|x64.ActiveCfg = Release|x64
{2CA661A7-01DD-4532-BF88-B6629DFB544A}.Release|x64.Build.0 = Release|x64
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.All|Win32.ActiveCfg = Release|Win32
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.All|Win32.Build.0 = Release|Win32
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.All|x64.ActiveCfg = Release|x64
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.All|x64.Build.0 = Release|x64
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Debug|Win32.ActiveCfg = Debug|Win32
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Debug|Win32.Build.0 = Debug|Win32
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Debug|x64.ActiveCfg = Debug|x64
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Debug|x64.Build.0 = Debug|x64
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Release|Win32.ActiveCfg = Release|Win32
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Release|Win32.Build.0 = Release|Win32
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Release|x64.ActiveCfg = Release|x64
{40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -3174,5 +3188,6 @@ Global
{C955E1A9-C12C-4BAD-AC32-8D53D9268AF7} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
{096C9A84-55B2-4F9B-97E5-0FDF116FD25F} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
{2CA661A7-01DD-4532-BF88-B6629DFB544A} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
{40C4E2A2-B49B-496C-96D6-C04B890F7F88} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
EndGlobalSection
EndGlobal

2
libs/.gitignore vendored
View File

@ -856,3 +856,5 @@ pcre-*/
pcre-*
libsndfile-*/
libsndfile-*
opencv-*/
opencv-*

View File

@ -0,0 +1,131 @@
<?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_cv</ProjectName>
<RootNamespace>mod_cv</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{40C4E2A2-B49B-496C-96D6-C04B890F7F88}</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" />
<ImportGroup Label="ExtensionSettings">
<Import Project="..\..\..\..\w32\opencv.props" Condition=" '$(opencvImported)' == '' "/>
</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>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="mod_cv.cpp" />
</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>

19
w32/opencv-version.props Normal file
View File

@ -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">
<opencvVersion>3.4.1</opencvVersion>
</PropertyGroup>
<PropertyGroup>
<opencvVersionImported>true</opencvVersionImported>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup>
<BuildMacro Include="opencvVersion">
<Value>$(opencvVersion)</Value>
</BuildMacro>
</ItemGroup>
</Project>

80
w32/opencv.props Normal file
View File

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<opencvImported>true</opencvImported>
</PropertyGroup>
<ImportGroup Label="PropertySheets">
<Import Project="opencv-version.props" Condition=" '$(opencvVersionImported)' == '' "/>
<Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
</ImportGroup>
<PropertyGroup>
<LibraryConfiguration Condition="$(Configuration.ToLower().Contains('debug'))">Debug</LibraryConfiguration>
<LibraryConfiguration Condition="$(Configuration.ToLower().Contains('release'))">Release</LibraryConfiguration>
<OpenCVLibraryFileName Condition=" '$(LibraryConfiguration)' == 'Debug' ">opencv_world341d</OpenCVLibraryFileName>
<OpenCVLibraryFileName Condition=" '$(LibraryConfiguration)' == 'Release' ">opencv_world341</OpenCVLibraryFileName>
</PropertyGroup>
<PropertyGroup Label="UserMacros">
<opencvLibDir>$(BaseDir)libs\opencv-$(opencvVersion)</opencvLibDir>
</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="opencvBinariesDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/opencv/$(opencvVersion)/opencv-$(opencvVersion)-binaries-$(Platform.ToLower())-$(LibraryConfiguration.ToLower()).zip"
expectfileordirectory="$(opencvLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\lib\$(OpenCVLibraryFileName).lib"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="opencvHeadersDownloadTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/opencv/$(opencvVersion)/opencv-$(opencvVersion)-headers.zip"
expectfileordirectory="$(opencvLibDir)\include\opencv\cv.h"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs\"
/>
</Target>
<Target Name="opencvcopyTarget" BeforeTargets="CustomBuild" DependsOnTargets="opencvBinariesDownloadTarget">
<ItemGroup>
<opencvFiles Include="$(opencvLibDir)\binaries\$(Platform)\$(LibraryConfiguration)\bin\*.dll" />
</ItemGroup>
<Copy Condition="!exists('$(BaseDir)$(Platform)\$(LibraryConfiguration)\$(OpenCVLibraryFileName).dll')"
SourceFiles="@(opencvFiles)"
DestinationFiles="@(opencvFiles->'$(BaseDir)$(Platform)\$(LibraryConfiguration)\%(Filename)%(Extension)')"
/>
</Target>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(opencvLibDir)\include\;$(opencvLibDir)\include\opencv\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)libs\opencv-$(opencvVersion)\binaries\$(Platform)\$(LibraryConfiguration)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(OpenCVLibraryFileName).lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>