]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11101: [mod_cv] Add mod_cv to the Windows build.
authorAndrey Volk <andywolk@gmail.com>
Mon, 9 Apr 2018 23:12:07 +0000 (02:12 +0300)
committerMuteesa Fred <muteesafred@hotmail.com>
Tue, 24 Jul 2018 07:21:50 +0000 (07:21 +0000)
Freeswitch.2015.sln
libs/.gitignore
src/mod/applications/mod_cv/mod_cv.2015.vcxproj [new file with mode: 0644]
w32/opencv-version.props [new file with mode: 0644]
w32/opencv.props [new file with mode: 0644]

index f0529beaca3a140a1460f3067fea8a4808aa6aeb..add8584eaca4e91c57d843b5be670c6a38a147a4 100644 (file)
@@ -638,6 +638,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_odbc_cdr", "src\mod\eve
 EndProject\r
 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}"\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_cv", "src\mod\applications\mod_cv\mod_cv.2015.vcxproj", "{40C4E2A2-B49B-496C-96D6-C04B890F7F88}"\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                All|Win32 = All|Win32\r
@@ -2942,6 +2944,18 @@ Global
                {2CA661A7-01DD-4532-BF88-B6629DFB544A}.Release|Win32.Build.0 = Release|Win32\r
                {2CA661A7-01DD-4532-BF88-B6629DFB544A}.Release|x64.ActiveCfg = Release|x64\r
                {2CA661A7-01DD-4532-BF88-B6629DFB544A}.Release|x64.Build.0 = Release|x64\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.All|Win32.ActiveCfg = Release|Win32\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.All|Win32.Build.0 = Release|Win32\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.All|x64.ActiveCfg = Release|x64\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.All|x64.Build.0 = Release|x64\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Debug|Win32.Build.0 = Debug|Win32\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Debug|x64.ActiveCfg = Debug|x64\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Debug|x64.Build.0 = Debug|x64\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Release|Win32.ActiveCfg = Release|Win32\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Release|Win32.Build.0 = Release|Win32\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Release|x64.ActiveCfg = Release|x64\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
@@ -3174,5 +3188,6 @@ Global
                {C955E1A9-C12C-4BAD-AC32-8D53D9268AF7} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}\r
                {096C9A84-55B2-4F9B-97E5-0FDF116FD25F} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}\r
                {2CA661A7-01DD-4532-BF88-B6629DFB544A} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}\r
+               {40C4E2A2-B49B-496C-96D6-C04B890F7F88} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}\r
        EndGlobalSection\r
 EndGlobal\r
index f66304d9f752e0ec2264e4c6caf16869c2b161f7..8555f1a4f12f865282ea15fe65995159c4a95afa 100644 (file)
@@ -856,3 +856,5 @@ pcre-*/
 pcre-*
 libsndfile-*/
 libsndfile-*
+opencv-*/
+opencv-*
diff --git a/src/mod/applications/mod_cv/mod_cv.2015.vcxproj b/src/mod/applications/mod_cv/mod_cv.2015.vcxproj
new file mode 100644 (file)
index 0000000..279dba9
--- /dev/null
@@ -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>
\ No newline at end of file
diff --git a/w32/opencv-version.props b/w32/opencv-version.props
new file mode 100644 (file)
index 0000000..681e44a
--- /dev/null
@@ -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>
diff --git a/w32/opencv.props b/w32/opencv.props
new file mode 100644 (file)
index 0000000..ef415cb
--- /dev/null
@@ -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>
\ No newline at end of file